Assign configuration context to VLAN #4866

Closed
opened 2025-12-29 19:21:23 +01:00 by adam · 8 comments
Owner

Originally created by @jcralbino on GitHub (May 4, 2021).

NetBox version

v2.11.2

Feature type

Change to existing functionality

Proposed functionality

In order to improve the automation capability for the VLAN in a SDN environment it is interesting to provide more details than the ones provided by the object itself.

Using a configuration context mapping, would simplify this as it will provide a structure information related to a L2 domain.

Use case

For ACI configuration and related SDN Environment, a VLAN is mapped to a L2 Bridge domain according to specific configuration parameters.

A configuration context would allow to use netbox to document the required configuration for this VLAN/L2 domain.

Database changes

Probably creating one additional entry in the VLAN model to allow a mapping to a configuration context.

External dependencies

none

Originally created by @jcralbino on GitHub (May 4, 2021). ### NetBox version v2.11.2 ### Feature type Change to existing functionality ### Proposed functionality In order to improve the automation capability for the VLAN in a SDN environment it is interesting to provide more details than the ones provided by the object itself. Using a configuration context mapping, would simplify this as it will provide a structure information related to a L2 domain. ### Use case For ACI configuration and related SDN Environment, a VLAN is mapped to a L2 Bridge domain according to specific configuration parameters. A configuration context would allow to use netbox to document the required configuration for this VLAN/L2 domain. ### Database changes Probably creating one additional entry in the VLAN model to allow a mapping to a configuration context. ### External dependencies none
adam added the type: featurepending closure labels 2025-12-29 19:21:23 +01:00
adam closed this issue 2025-12-29 19:21:23 +01:00
Author
Owner

@jcralbino commented on GitHub (Jun 2, 2021):

@jeremystretch i believe that this is something we can add maintaining the principle behind configuration context

Do you prefer If a discussion for this is opened before ?

@jcralbino commented on GitHub (Jun 2, 2021): @jeremystretch i believe that this is something we can add maintaining the principle behind configuration context Do you prefer If a discussion for this is opened before ?
Author
Owner

@jeremystretch commented on GitHub (Jun 2, 2021):

Unfortunately I don't think this would be feasible, as there is (intentionally) no relationship from devices/VMs directly to VLANs. This precludes us from rendering config contexts as part of a device/VM queryset, which is a crucial function of the feature.

@jeremystretch commented on GitHub (Jun 2, 2021): Unfortunately I don't think this would be feasible, as there is (intentionally) no relationship from devices/VMs directly to VLANs. This precludes us from rendering config contexts as part of a device/VM queryset, which is a crucial function of the feature.
Author
Owner

@jcralbino commented on GitHub (Jun 3, 2021):

Thanks for your feedback.
Indeed I missed that concept of configuration context, but it is true that the object where they are used is mainly with devices.

So for this specific use case it should a completely new configuration context object, like VLAN configuration context.

The principle behind should be to use this to improve the automation of a l2 broadcast domains ( VLAN, VXLAN,..) across different switches .

@jcralbino commented on GitHub (Jun 3, 2021): Thanks for your feedback. Indeed I missed that concept of configuration context, but it is true that the object where they are used is mainly with devices. So for this specific use case it should a completely new configuration context object, like VLAN configuration context. The principle behind should be to use this to improve the automation of a l2 broadcast domains ( VLAN, VXLAN,..) across different switches .
Author
Owner

@jeremystretch commented on GitHub (Jun 3, 2021):

Can you elaborate on your use case here? Specifically, why wouldn't a custom field on the VLAN and/or VLANGroup model work for this?

@jeremystretch commented on GitHub (Jun 3, 2021): Can you elaborate on your use case here? Specifically, why wouldn't a custom field on the VLAN and/or VLANGroup model work for this?
Author
Owner

@jcralbino commented on GitHub (Jun 4, 2021):

In my perception this object is used to represent a layer 2 broadcast domain. In this case we can assume the following

  • legacy environment where this was implemented by setting a VLAN id, name, and description. To automate this simple layer 2 environment the information in netbox is enough, and configuration can be automated easily.

  • newer environment, maybe mostly datacenter SDN oriented. In here VLANs may be used to represent the connection with the dc access layer to servers. Transport of this data plane domain (VLANs if you will, or bridge domain ) in the datacenter environment are transported using a layer 3 protocol. VXLAN is one example.
    For this SDN environment additional fields are required for simplifying the automation of the configuration across the datacenter using netbox.
    My proposal Is that this can be Automated using a similar design as it was done for the device configuration context, using a free form JSON Structure for the VLAN configuration context, but then here we will assign it to a VLAN object.
    The VLAN configuration context will then be assigned based in VLAN groups to the corresponding object.

Using a custom field for this will mean that legacy vlans objects ( placed outside this VLAN group) are having a database field that is not going to be used.

@jcralbino commented on GitHub (Jun 4, 2021): In my perception this object is used to represent a layer 2 broadcast domain. In this case we can assume the following - legacy environment where this was implemented by setting a VLAN id, name, and description. To automate this simple layer 2 environment the information in netbox is enough, and configuration can be automated easily. - newer environment, maybe mostly datacenter SDN oriented. In here VLANs may be used to represent the connection with the dc access layer to servers. Transport of this data plane domain (VLANs if you will, or bridge domain ) in the datacenter environment are transported using a layer 3 protocol. VXLAN is one example. For this SDN environment additional fields are required for simplifying the automation of the configuration across the datacenter using netbox. My proposal Is that this can be Automated using a similar design as it was done for the device configuration context, using a free form JSON Structure for the VLAN configuration context, but then here we will assign it to a VLAN object. The VLAN configuration context will then be assigned based in VLAN groups to the corresponding object. Using a custom field for this will mean that legacy vlans objects ( placed outside this VLAN group) are having a database field that is not going to be used.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 4, 2021):

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.

@github-actions[bot] commented on GitHub (Aug 4, 2021): 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

@jcralbino commented on GitHub (Sep 1, 2021):

@jeremystretch

From your previous comments I understood that the issue was related with the way the current model for device is made, where the local context is tied to that model.

Do you see the value of having another field associated with the vlan to improve the way new networks are represented in netbox, after my detailed use case ?

I have seen in the past request to model l2vpn( that are nothing more than an extended layer 2) that can be also accomplished using this local context that will provide configuration details while using the current vlan fields( name, vlan role,..) we can model this l2 network constructs in netbox better.

@jcralbino commented on GitHub (Sep 1, 2021): @jeremystretch From your previous comments I understood that the issue was related with the way the current model for device is made, where the local context is tied to that model. Do you see the value of having another field associated with the vlan to improve the way new networks are represented in netbox, after my detailed use case ? I have seen in the past request to model l2vpn( that are nothing more than an extended layer 2) that can be also accomplished using this local context that will provide configuration details while using the current vlan fields( name, vlan role,..) we can model this l2 network constructs in netbox better.
Author
Owner

@jeremystretch commented on GitHub (Oct 1, 2021):

As I noted above, the proposed feature is not technically feasible given the current data model.

@jeremystretch commented on GitHub (Oct 1, 2021): As I noted above, the proposed feature is not technically feasible given the current data model.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4866