-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Enable many-to-many site assignment for VLAN groups #5284
Comments
This is perfect, and should honestly be extend to vlans and prefixes |
@anubisg1 that wouldn't make any sense. a prefix can be assigned to only one L2 and/or L3 domain. |
@jeremystretch prefix can only be assigned to a L2 (vlan) or a L3 (vrf) domain. A vlan, especially in DC environments, can exist across multiple physical sites. This means that the same vlan (and the same IP subnet) actually exists on 2 (ore more) sites at the same time. netbox fits perfectly for DCIM (Data Center Inventory Management) part, as a physical box can exist either here or there, but we really struggle to model DC networks and overlays. maybe the simplest way would be to have the possibility to have an "overlay" object. i don't know exactly, but the problem remains, once a vlan moves outside of a physical site, the whole model breaks down |
Implementing this feature would obviate the need for mapping VLANs to multiple sites. It would also be unnecessary to map prefixes to multiple sites because we can infer that from their association to the multi-site L2 domain. |
If the overlay/underlay is an object, we associate its scope to devices and interfaces. (Terminology: underlay = ex. Shortest Path Bridging, Overlay= ex. Vxlan). The site an overlay/underlay is present in, should automatically be known(via the meta-data of the device attached to the overlay) and should not be manually associated with an overlay, IMO. |
After giving this some more thought, I wonder if it might be better to change the This approach would allow us to provide more flexibility around the establishment of a L2 domain while avoiding the headaches that come with many-to-many relationships. |
Closes #5284: Allow VLANGroup assignment beyond sites
Environment
Proposed Functionality
Convert the current ForeignKey field assigning a VLANGroup to a site to a ManyToManyField, to allow the assignment of a VLANGroup to multiple sites.
Use Case
This change will allow the tracking of discrete L2 domain which extend beyond a single site. Today, this can be modeled only with the coarseness of a "global" VLANGroup (one which is not assigned to any site).
IMO this approach is preferable to allowing many-to-many assignment directly between VLANs and sites, because it provides a layer of abstraction for the domain. A user can add many VLANs to a multi-site VLANGroup without needing to ensure the correct multi-site assignment of each VLAN.
Database Changes
Change
VLANGroup.site
from a ForeignKey to a ManyToManyField, which results in the introduction of an intermediate table. The actual database migration would probably involve creating a newsites
field, replicating all existing relations, and finally deleting the currentsite
field.External Dependencies
None
The text was updated successfully, but these errors were encountered: