Allow Device Roles to have multiple parent roles #11510

Closed
opened 2025-12-29 21:46:13 +01:00 by adam · 1 comment
Owner

Originally created by @whtkam on GitHub (Aug 21, 2025).

NetBox version

v4.3.6

Feature type

Data model extension

Proposed functionality

Currently, a Device Role in NetBox can only be assigned a single parent role.
I would like to request the ability to assign multiple parent roles to a Device Role.

Use case

We have a parent device role Switch and another parent role Encryption.
A device that is an Encryption Switch logically belongs under both roles.
With the current model, it can only inherit from one parent role, which makes filtering less flexible.
If multiple parent roles were supported, the Encryption Switch would show up in both views when filtering by Switch or by Encryption.

A similar concept already exists with Contacts, where a single contact can belong to multiple groups. This flexible model would also be very useful for Device Roles.

This would improve classification and filtering, especially for devices that naturally span multiple categories.

Database changes

No response

External dependencies

No response

Originally created by @whtkam on GitHub (Aug 21, 2025). ### NetBox version v4.3.6 ### Feature type Data model extension ### Proposed functionality Currently, a Device Role in NetBox can only be assigned a single parent role. I would like to request the ability to assign multiple parent roles to a Device Role. ### Use case We have a parent device role Switch and another parent role Encryption. A device that is an Encryption Switch logically belongs under both roles. With the current model, it can only inherit from one parent role, which makes filtering less flexible. If multiple parent roles were supported, the Encryption Switch would show up in both views when filtering by Switch or by Encryption. A similar concept already exists with Contacts, where a single contact can belong to multiple groups. This flexible model would also be very useful for Device Roles. This would improve classification and filtering, especially for devices that naturally span multiple categories. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 21:46:13 +01:00
adam closed this issue 2025-12-29 21:46:13 +01:00
Author
Owner

@jnovinger commented on GitHub (Aug 21, 2025):

Thanks for the feature request, @whtkam . Unfortunately, django-mptt can't support multiple parents - it's fundamentally designed for single-parent hierarchical trees.

For devices spanning multiple categories like your "Encryption Switch," you have two good options:

  • use tags for flexible multi-category classification
  • leverage the existing device role hierarchy where "Encryption Switch" would be a child of either "Switch" or "Encryption" (whichever is more primary to your organization).
@jnovinger commented on GitHub (Aug 21, 2025): Thanks for the feature request, @whtkam . Unfortunately, django-mptt can't support multiple parents - it's fundamentally designed for single-parent hierarchical trees. For devices spanning multiple categories like your "Encryption Switch," you have two good options: - use tags for flexible multi-category classification - leverage the existing device role hierarchy where "Encryption Switch" would be a child of either "Switch" or "Encryption" (whichever is more primary to your organization).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11510