Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device-specific configuration context #2392

Closed
ngrundler opened this issue Aug 24, 2018 · 5 comments · Fixed by #2445
Closed

Device-specific configuration context #2392

ngrundler opened this issue Aug 24, 2018 · 5 comments · Fixed by #2445
Labels
status: accepted This issue has been accepted for implementation

Comments

@ngrundler
Copy link

Environment

  • Python version: 3.5.4
  • NetBox version: 2.4.4

Proposed Functionality

Configuration contexts are an incredibly useful feature, but as with any standards that we try and apply with a broad brush, there are always exceptions. Our environment is very diverse, and in order to meet the needs of a particular tenant or user group, we are forced to adjust a template or standard to accommodate a request that often impacts only a single device. Extending configuration contexts to a specific device or set of devices would allow us to keep track of these snowflakes. Tagging can solve some of these requests, but often the changes are complex enough that having a configuration context would be more desirable.

Use Case

Some examples I've run into include a user, ssh-key, and permission settings on a single device, a unique login banner, or even enabling a particular protocol required to interoperate with a downstream device. This could also be useful for device-specific hardware settings, e.g. setting the pic-mode for various Juniper devices. Being able to encode this kind of information in an single, external source of authority is very important for us as we try to automate our environment. Right now we're keeping this device-specific information in a separate git repo, but it would be really nice to be able to put all of this in Netbox.

Database Changes

Unknown

External Dependencies

None that I can think of

@lampwins lampwins added status: accepted This issue has been accepted for implementation type: minor feature labels Aug 24, 2018
@lampwins
Copy link
Contributor

This is feasible and has been brought up by a few others already in the mailing list and the NTC slack. I am labeling it as a minor feature because we will need to think carefully through the implications to the data model and avoid scope creep.

My initial impression is that we will allow a single ConfigContext object to be assigned to a Device instance. This particular ConfigContext object will automatically be weighted such that is takes precedence over any other rendered ConfigContexts for the device. Thoughts on this?

@ngrundler
Copy link
Author

+1

Just to confirm, other config contexts would still be inherited based on site/tenant etc, but any overlapping values in the device instance context would automatically "win"? That is basically exactly what we're looking for on my end.

@lampwins
Copy link
Contributor

@ngrundler correct, that is the basic idea.

@sdktr
Copy link
Contributor

sdktr commented Aug 28, 2018

Why the difference in the 'weighting' for this specific mapping? In general I propose that the priority for conflicting objects from multiple ConfigContext should be:

  • weights (higher value wins)
  • order according to this (or another fixed) list as tiebreaker (lower in the list wins)
    -- TenantGroup
    -- Tenant
    -- Region
    -- Site
    -- Roles
    -- Platform
    -- Device

@ebusto
Copy link

ebusto commented Aug 28, 2018

Similarly, it would be helpful to have device type configuration contexts.

This would allow administrators to store BIOS, iLO/DRAC, and other configuration data that makes sense to handle on a per-model basis.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants