-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Environment
- Python version: 3.6.9
- NetBox version: 2.9.7
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 new sites field, replicating all existing relations, and finally deleting the current site field.
External Dependencies
None