Allow Device role to assign Device Types/Models #1841

Closed
opened 2025-12-29 17:19:40 +01:00 by adam · 7 comments
Owner

Originally created by @a31amit on GitHub (Jul 13, 2018).

Issue type

[X] Feature request
[ ] Bug report
[ ] Documentation
[ ] Housekeeping

Environment

  • Python version:
  • NetBox version:

Description

Please allow Device Roles to be assign on Device Types. A common example, that we have multiple model of PDU, UPS from various vendor. Though Both UPS and PDU is PDU flag true but it would really good to know how many model we have for UPS and PDU. Surely this would be the case for other roles as well.

As of now, It seems netbox only allow device role to assign to devices itself, where we can also see model. But this would help to know role of device types as well which doesn't have any devices associate.

Originally created by @a31amit on GitHub (Jul 13, 2018). <!-- Before opening a new issue, please search through the existing issues to see if your topic has already been addressed. Note that you may need to remove the "is:open" filter from the search bar to include closed issues. Check the appropriate type for your issue below by placing an x between the brackets. For assistance with installation issues, or for any other issues other than those listed below, please raise your topic for discussion on our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please note that issues which do not fall under any of the below categories will be closed. Due to an excessive backlog of feature requests, we are not currently accepting any proposals which extend NetBox's feature scope. Do not prepend any sort of tag to your issue's title. An administrator will review your issue and assign labels as appropriate. ---> ### Issue type [X] Feature request <!-- An enhancement of existing functionality --> [ ] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> [ ] Housekeeping <!-- Changes pertaining to the codebase itself --> <!-- Please describe the environment in which you are running NetBox. (Be sure to verify that you are running the latest stable release of NetBox before submitting a bug report.) If you are submitting a bug report and have made any changes to the code base, please first validate that your bug can be recreated while running an official release. --> ### Environment * Python version: <!-- 3.5.4 --> * NetBox version: <!-- 2.3.5 --> <!-- BUG REPORTS must include: * A list of the steps needed for someone else to reproduce the bug * A description of the expected and observed behavior * Any relevant error messages (screenshots may also help) FEATURE REQUESTS must include: * A detailed description of the proposed functionality * A use case for the new feature * A rough description of any necessary changes to the database schema * Any relevant third-party libraries which would be needed --> ### Description Please allow Device Roles to be assign on Device Types. A common example, that we have multiple model of PDU, UPS from various vendor. Though Both UPS and PDU is PDU flag true but it would really good to know how many model we have for UPS and PDU. Surely this would be the case for other roles as well. As of now, It seems netbox only allow device role to assign to devices itself, where we can also see model. But this would help to know role of device types as well which doesn't have any devices associate.
adam closed this issue 2025-12-29 17:19:40 +01:00
Author
Owner

@mmahacek commented on GitHub (Jul 14, 2018):

It would be nice to be able to assign a Device Role to a device type to help populate the field on the device, but then have the flexibility to edit the device role later. The value would be copied to the device instance rather than linked back to the device type.

@mmahacek commented on GitHub (Jul 14, 2018): It would be nice to be able to assign a Device Role to a device type to help populate the field on the device, but then have the flexibility to edit the device role later. The value would be copied to the device instance rather than linked back to the device type.
Author
Owner

@jeremystretch commented on GitHub (Jul 16, 2018):

This breaks down when you consider general purpose hardware: Many types of device serve multiple roles. For example, a Dell server might be classified as a hypervisor, application server, DNS server, etc. I don't think trying to establish a link between device type and device role is worth the headache.

@jeremystretch commented on GitHub (Jul 16, 2018): This breaks down when you consider general purpose hardware: Many types of device serve multiple roles. For example, a Dell server might be classified as a hypervisor, application server, DNS server, etc. I don't think trying to establish a link between device type and device role is worth the headache.
Author
Owner

@mmahacek commented on GitHub (Jul 16, 2018):

I wouldn’t see it as a hard link but more of a way to pre-populate the most common option. The device could then be changed after creation, but there is a base role set by default from on the device type.

@mmahacek commented on GitHub (Jul 16, 2018): I wouldn’t see it as a hard link but more of a way to pre-populate the most common option. The device could then be changed after creation, but there is a base role set by default from on the device type.
Author
Owner

@a31amit commented on GitHub (Jul 16, 2018):

I agree with your point that hypervisor or application server doesn't make sense, maybe those will be solved later with enhancement of tags https://github.com/digitalocean/netbox/issues/132

However netbox does similar for VM's by enable vm role flag assignment for VM. this can be solved by similar with enable flag for device types. Unless this is requires a lot of engineering hours.

@a31amit commented on GitHub (Jul 16, 2018): I agree with your point that hypervisor or application server doesn't make sense, maybe those will be solved later with enhancement of tags https://github.com/digitalocean/netbox/issues/132 However netbox does similar for VM's by enable vm role flag assignment for VM. this can be solved by similar with enable flag for device types. Unless this is requires a lot of engineering hours.
Author
Owner

@lampwins commented on GitHub (Jul 16, 2018):

Would this not already be covered in https://github.com/digitalocean/netbox/issues/1364 or is there something new being requested here?

@lampwins commented on GitHub (Jul 16, 2018): Would this not already be covered in https://github.com/digitalocean/netbox/issues/1364 or is there something new being requested here?
Author
Owner

@mmahacek commented on GitHub (Jul 16, 2018):

I think this sounds like a DeviceTemplate would cover my use case scenario.

@mmahacek commented on GitHub (Jul 16, 2018): I think this sounds like a DeviceTemplate would cover my use case scenario.
Author
Owner

@jeremystretch commented on GitHub (Jul 18, 2018):

Yeah, I think #1364 offers a much more elegant solution.

@jeremystretch commented on GitHub (Jul 18, 2018): Yeah, I think #1364 offers a much more elegant solution.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1841