Prefix config context #4575

Closed
opened 2025-12-29 18:37:50 +01:00 by adam · 4 comments
Owner

Originally created by @Lombra on GitHub (Feb 17, 2021).

Environment

  • Python version: 3.9.1
  • NetBox version: 2.10.3

Proposed Functionality

Defining configuration context per prefix, inherited by devices which have an address in the prefix.

Use Case

Allows for defining configuration commonly shared within subnets, such as default gateway and DNS servers.

Database Changes

Adds config context field to prefix?

External Dependencies

N/A

Originally created by @Lombra on GitHub (Feb 17, 2021). ### Environment * Python version: 3.9.1 * NetBox version: 2.10.3 ### Proposed Functionality Defining configuration context per prefix, inherited by devices which have an address in the prefix. ### Use Case Allows for defining configuration commonly shared within subnets, such as default gateway and DNS servers. ### Database Changes Adds config context field to prefix? ### External Dependencies N/A
adam added the type: feature label 2025-12-29 18:37:50 +01:00
adam closed this issue 2025-12-29 18:37:50 +01:00
Author
Owner

@DanSheps commented on GitHub (Feb 18, 2021):

This is easily accomplished with custom fields, is there any reason why config contexts are needed?

@DanSheps commented on GitHub (Feb 18, 2021): This is easily accomplished with custom fields, is there any reason why config contexts are needed?
Author
Owner

@Lombra commented on GitHub (Feb 18, 2021):

I'm confused. Couldn't the same be said of any of the models that currently support config contexts?

Configuration is what I want to provide, so config context seemed like the appropriate field. As well, of course, it would work with hierarchical rendering.

@Lombra commented on GitHub (Feb 18, 2021): I'm confused. Couldn't the same be said of any of the models that currently support config contexts? Configuration is what I want to provide, so config context seemed like the appropriate field. As well, of course, it would work with hierarchical rendering.
Author
Owner

@Lombra commented on GitHub (Feb 21, 2021):

I see now that I imagined the relationship in the opposite direction. The prefix would be a property of the config context, rather than the other way around? I don't think it affects my request, however.

@Lombra commented on GitHub (Feb 21, 2021): I see now that I imagined the relationship in the opposite direction. The prefix would be a property of the config context, rather than the other way around? I don't think it affects my request, however.
Author
Owner

@jeremystretch commented on GitHub (Apr 13, 2021):

Defining configuration context per prefix, inherited by devices which have an address in the prefix.

This isn't really practical to implement. You're going to be much better off employing tags. If you'd like to discuss potential solutions further, please consider opening a discussion detailing exactly what you'd like to accomplish.

@jeremystretch commented on GitHub (Apr 13, 2021): > Defining configuration context per prefix, inherited by devices which have an address in the prefix. This isn't really practical to implement. You're going to be much better off employing tags. If you'd like to discuss potential solutions further, please consider opening a [discussion](https://github.com/netbox-community/netbox/discussions/new) detailing exactly what you'd like to accomplish.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4575