Introduction of Device Role Groups #10578

Closed
opened 2025-12-29 21:33:20 +01:00 by adam · 3 comments
Owner

Originally created by @jonzey0 on GitHub (Dec 17, 2024).

Originally assigned to: @arthanson on GitHub.

NetBox version

v4.1.7

Feature type

Data model extension

Triage priority

N/A

Proposed functionality

Currently all Device Roles are in a "flat" hierarchy. In order to segregate the Device Roles based on function, you may need multiple roles of a similar type if you want to segregate them accordingly.

I'm proposing that Device Role Groups be introduced to provide a level of hierarchy to Device Roles, much in a similar way to how Tenant Groups provide a similar function to how Tenants can be grouped.

Use case

In an environment where there are a lot of different device roles, it may be useful to be able to group them much like in the same way Tenants and Tenant Groups, or Contacts and Contact Groups are grouped today.

I can envisage that (for example) you may have a "Rack Infrastructure" Device Role Group which then has roles specific for "Patch Panel", "Power" etc.

Another example may be Network Switches, where you may want to segregate the Device Role based on function, while keeping them all under a Network Switch parent group.

Database changes

Not a DB expert, but I suspect it would likely require the Device Role field to be changed to accommodate this function and the introduction of a non-mandatory Device Role Group field as well.

External dependencies

No response

Originally created by @jonzey0 on GitHub (Dec 17, 2024). Originally assigned to: @arthanson on GitHub. ### NetBox version v4.1.7 ### Feature type Data model extension ### Triage priority N/A ### Proposed functionality Currently all Device Roles are in a "flat" hierarchy. In order to segregate the Device Roles based on function, you may need multiple roles of a similar type if you want to segregate them accordingly. I'm proposing that Device Role Groups be introduced to provide a level of hierarchy to Device Roles, much in a similar way to how Tenant Groups provide a similar function to how Tenants can be grouped. ### Use case In an environment where there are a lot of different device roles, it may be useful to be able to group them much like in the same way Tenants and Tenant Groups, or Contacts and Contact Groups are grouped today. I can envisage that (for example) you may have a "Rack Infrastructure" Device Role Group which then has roles specific for "Patch Panel", "Power" etc. Another example may be Network Switches, where you may want to segregate the Device Role based on function, while keeping them all under a Network Switch parent group. ### Database changes Not a DB expert, but I suspect it would likely require the Device Role field to be changed to accommodate this function and the introduction of a non-mandatory Device Role Group field as well. ### External dependencies _No response_
adam added the status: acceptedtype: featurecomplexity: medium labels 2025-12-29 21:33:20 +01:00
adam closed this issue 2025-12-29 21:33:20 +01:00
Author
Owner

@ITJamie commented on GitHub (Dec 17, 2024):

This would be great for filtering devices down to just "networking" devices.

Would you in-visage it as group > role or could it be like locations where it could be deeply nested

Group > group > device role

It would be nice to have "networking" then "switches" as a sub group for example which then multiple roles inside switches "access switches" "management switches" etc.

@ITJamie commented on GitHub (Dec 17, 2024): This would be great for filtering devices down to just "networking" devices. Would you in-visage it as group > role or could it be like locations where it could be deeply nested Group > group > device role It would be nice to have "networking" then "switches" as a sub group for example which then multiple roles inside switches "access switches" "management switches" etc.
Author
Owner

@jonzey0 commented on GitHub (Dec 17, 2024):

This would be great for filtering devices down to just "networking" devices.

Would you in-visage it as group > role or could it be like locations where it could be deeply nested

Group > group > device role

It would be nice to have "networking" then "switches" as a sub group for example which then multiple roles inside switches "access switches" "management switches" etc.

Yeah, the Sub-Group option is what I had in mind. Depending on the use case then the user can segregate them as they see fit in the tree structure.

Can see that being the most flexible outcome, with this all being optional anyway, much like Location Groups today are an optional field.

@jonzey0 commented on GitHub (Dec 17, 2024): > This would be great for filtering devices down to just "networking" devices. > > Would you in-visage it as group > role or could it be like locations where it could be deeply nested > > Group > group > device role > > It would be nice to have "networking" then "switches" as a sub group for example which then multiple roles inside switches "access switches" "management switches" etc. Yeah, the Sub-Group option is what I had in mind. Depending on the use case then the user can segregate them as they see fit in the tree structure. Can see that being the most flexible outcome, with this all being optional anyway, much like Location Groups today are an optional field.
Author
Owner

@jeremystretch commented on GitHub (Feb 11, 2025):

I think this is actually a duplicate of #6290, but I'm going to keep this one instead because it has a more detailed implementation proposal.

@jeremystretch commented on GitHub (Feb 11, 2025): I think this is actually a duplicate of #6290, but I'm going to keep this one instead because it has a more detailed implementation proposal.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10578