Uniformed scoping for vlans, clusters and prefixes #9343

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

Originally created by @voolean on GitHub (Mar 11, 2024).

NetBox version

v3.5.9

Feature type

Change to existing functionality

Proposed functionality

Some virtual objects like prefixes and clusters are bound to a site because they're using SITE assignments only.

Other objects like `vlan-group, bgp, bgp-pool are using scope assignments.

My proposed solution: Uniform virtual object scoping mechanism and apply scoping to vlans/cluster/prefix as well to support much more use-cases

Use case

We have to migrate our sites to child-regions (or site-groups) but the virtual objects mentioned above are bound to a site only. When we want to migrate sites we have to move the prefix assignments as well. We can not assign these virtual objects to a region.

Database changes

unsure

External dependencies

none

Originally created by @voolean on GitHub (Mar 11, 2024). ### NetBox version v3.5.9 ### Feature type Change to existing functionality ### Proposed functionality Some virtual objects like `prefixes` and `clusters` are bound to a site because they're using **SITE assignments** only. Other objects like `vlan-group, ~~bgp, bgp-pool~~ are using **scope assignments**. My proposed solution: Uniform virtual object scoping mechanism and apply scoping to vlans/cluster/prefix as well to support much more use-cases ### Use case We have to migrate our `sites` to `child-regions` (or site-groups) but the virtual objects mentioned above are bound to a site only. When we want to migrate sites we have to move the prefix assignments as well. We can not assign these virtual objects to a region. ### Database changes unsure ### External dependencies none
adam added the type: featurestatus: duplicate labels 2025-12-29 20:48:50 +01:00
adam closed this issue 2025-12-29 20:48:51 +01:00
Author
Owner
@voolean commented on GitHub (Mar 11, 2024): - [#netbox slack thread](https://netdev-community.slack.com/archives/C01P0FRSXRV/p1709899390646309) - [Allow prefixes to be assigned to a site group or region ](https://github.com/netbox-community/netbox/issues/6414) - [Allow cluster to be assigned to a site group](https://github.com/netbox-community/netbox/issues/9969) - [Assign virtualization Clusters to a Location](https://github.com/netbox-community/netbox/issues/7699) - [Support assigning prefixes/VLANs to locations](https://github.com/netbox-community/netbox/issues/6746)
Author
Owner

@jeremystretch commented on GitHub (Mar 11, 2024):

Other objects like vlan-group,bgp, bgp-pool are using scope assignments.

There is no BGP or BGP pool model in NetBox; you're likely confusing these with models provided by a plugin.

My proposed solution: Uniform virtual object scoping mechanism and apply scoping to vlans/cluster/prefix as well to support much more use-cases

This is going to need much more detail to become an actionable feature request. Please invest some more effort to draft a specific implementation instead of just linking to previous discussions.

@jeremystretch commented on GitHub (Mar 11, 2024): > Other objects like vlan-group,bgp, bgp-pool are using scope assignments. There is no BGP or BGP pool model in NetBox; you're likely confusing these with models provided by a plugin. > My proposed solution: Uniform virtual object scoping mechanism and apply scoping to vlans/cluster/prefix as well to support much more use-cases This is going to need _much_ more detail to become an actionable feature request. Please invest some more effort to draft a specific implementation instead of just linking to previous discussions.
Author
Owner

@voolean commented on GitHub (Mar 11, 2024):

Thanks Jeremy, I apologize for the confusion. I mistakenly associated BGP with another project.

I included links to previous discussions and issues mainly for reference, even though some of them may be outdated. Daniel Sheppard mentioned that this is something you're already looking into. I would be glad to provide additional details and elaborate.

Regarding the dynamic scoping for a prefix, I'm unsure about its functionality or specific implementation details. Instead of assigning a prefix to the site as...

"site": { "id": 1, .. },

..I suggest making the following change:

"scope_type": "dcim.region",
"scope_id": 1,
"scope": {  "id": 1, ... },
@voolean commented on GitHub (Mar 11, 2024): Thanks Jeremy, I apologize for the confusion. I mistakenly associated BGP with another project. I included links to previous discussions and issues mainly for reference, even though some of them may be outdated. Daniel Sheppard mentioned that this is something you're already looking into. I would be glad to provide additional details and elaborate. Regarding the dynamic scoping for a prefix, I'm unsure about its functionality or specific implementation details. Instead of assigning a prefix to the site as... `"site": { "id": 1, .. },` ..I suggest making the following change: ``` "scope_type": "dcim.region", "scope_id": 1, "scope": { "id": 1, ... }, ```
Author
Owner

@jeremystretch commented on GitHub (Apr 3, 2024):

These concerns will be addressed under #6746 when/if that gets implemented, so I'm going to close this out as a duplicate.

@jeremystretch commented on GitHub (Apr 3, 2024): These concerns will be addressed under #6746 when/if that gets implemented, so I'm going to close this out as a duplicate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9343