Config Context assignment based on Device Type #3843

Closed
opened 2025-12-29 18:31:34 +01:00 by adam · 3 comments
Owner

Originally created by @robertpenz on GitHub (Jul 8, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.6.9
  • NetBox version: 2.8.5

Proposed Functionality

Add a dropdown box for device type for config context assignment.

Use Case

We've switches/routers from multiple vendors and use config context based on platform heavily, but some devices types of the same platform don't support a feature. We now want to override the config context for them based on that. So the platform has the feature enable and then platform + device types does disable it. Also enabling the feature only for platform + device types does not work current as we can't select device types.

Database Changes

no

External Dependencies

no

Originally created by @robertpenz on GitHub (Jul 8, 2020). Originally assigned to: @jeremystretch on GitHub. <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.6.9 * NetBox version: 2.8.5 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality Add a dropdown box for device type for config context assignment. <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case We've switches/routers from multiple vendors and use config context based on platform heavily, but some devices types of the same platform don't support a feature. We now want to override the config context for them based on that. So the platform has the feature enable and then platform + device types does disable it. Also enabling the feature only for platform + device types does not work current as we can't select device types. <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes no <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies no
adam added the status: acceptedtype: feature labels 2025-12-29 18:31:34 +01:00
adam closed this issue 2025-12-29 18:31:34 +01:00
Author
Owner

@stale[bot] commented on GitHub (Jul 22, 2020):

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.

@stale[bot] commented on GitHub (Jul 22, 2020): 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](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@jeremystretch commented on GitHub (Oct 22, 2020):

A reminder, per the contributing guide:

Note that comments with no substance other than a "+1" will be deleted. Please use GitHub's reactions feature to indicate your support.

@jeremystretch commented on GitHub (Oct 22, 2020): A reminder, per the [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md): > Note that comments with no substance other than a "+1" will be deleted. Please use GitHub's reactions feature to indicate your support.
Author
Owner

@jqueuniet commented on GitHub (Nov 24, 2020):

I'd like to add my support to this enhancement, with a different use case.

  • Serial console configuration. Some hardware needs COM2/ttyS1, other needs COM1/ttyS0, many of our devices don't support changing the serial port and thus, we can't standardize over one or the other.
  • Installation devices for unattended installs, especially for storage servers with loads of block devices. /dev/sda might not always be the answer and the specifics are going to be very tied to hardware parameters (number of controllers, PCI slot usage, etc).

Of course, we could use tags for this, but as this use cases are very common this means handing thousands of tags based on device types and basically duplicating the information of the latter. We can't use the platform for this either, as it is already used to store the operating system installed, and here too would mean duplicating the information of device types.

@jqueuniet commented on GitHub (Nov 24, 2020): I'd like to add my support to this enhancement, with a different use case. * Serial console configuration. Some hardware needs COM2/ttyS1, other needs COM1/ttyS0, many of our devices don't support changing the serial port and thus, we can't standardize over one or the other. * Installation devices for unattended installs, especially for storage servers with loads of block devices. `/dev/sda` might not always be the answer and the specifics are going to be very tied to hardware parameters (number of controllers, PCI slot usage, etc). Of course, we could use tags for this, but as this use cases are very common this means handing thousands of tags based on device types and basically duplicating the information of the latter. We can't use the platform for this either, as it is already used to store the operating system installed, and here too would mean duplicating the information of device types.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3843