Closed ryanmerolle closed 4 years ago
Example: All compute leafs should be listed as network devices and all PDUs should be listed as power or datacenter devices.
It sounds like you're trying to encode additional information into a field with a set context. A hierarchy likely isn't the best way, as you will inevitably come across a situation where devices of the same functional role need to be grouped differently for some reason.
You have a few options:
@jeremystretch I agree with your assessment of my current options, I was thinking the same thing. My only hesitations:
The hierarchical inheritance/group of device role -> device type -> device makes sense to me. I just assumed either level above it in the model would be make sense or the adjusting the model to allow device role to have custom fields. That way, no user or workflow would set a device category during creation, it would just be set for them when they selected the device role.
One additional option would be to scrap my current device roles. The roles are quite useful for me with future automation, but the reality is that if I make them more high level for the downstream systems to filter by, then that solves the problem. It just eliminates more granular data I could use for configuration generation or other workflows in my specific network focus.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.
This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Environment
NA Feature Request
Proposed Functionality
It would be useful to either setup a Device Category hierarchy to Device Roles so we can group Network, Datacenter, Server/Compute, Storage and other Device Categories to Device Roles. If this is not an easy feature request, then allowed custom fields to be added to Device Roles would also work.
Use Case
With netbox set as my infra source of truth, I am using it to provide our business application monitoring tools context about our infra in order to enrich alerting. The device roles are super useful, but it would be nice to have one more level to group these roles into categories. The only other way is to apply these categories to the device types via custom categories which is a level lower than we would want to. Example: All compute leafs should be listed as network devices and all PDUs should be listed as power or datacenter devices. To do this on each model of a device labeled as a PDU device role does not seem logical.
Database Changes
External Dependencies
Update objects int he hierarchy to show their device category where the device role is also showed. Not as important as long as we can query the API for this linkage.