Prefix no vlans when selected site (vlan groups) #8066

Closed
opened 2025-12-29 20:31:53 +01:00 by adam · 3 comments
Owner

Originally created by @MarcHagen on GitHub (May 15, 2023).

NetBox version

v3.5.1

Python version

3.10

Steps to Reproduce

  1. Create site
  2. Create vlan group with Scope type DCIM > Site
  3. Create vlans select newly created vlan group
  4. Create prefix, select created site, select created vlan

Expected Behavior

Vlans in vlan groups associated to that site should be displayed and selectable.

Observed Behavior

No vlans are shown.

Additional info

Removing the site selection all vlans are show.

Vlans that are assigned to a site are shown. (with or without group)

The vlan group / site selection seems a or or because the selector boxed are in different tabs:
image
It implies to me that you "should" only select 1 of the 2.
Seems logical because vlan groups are scoped to a multitude of levels (site, location, rack)

Originally created by @MarcHagen on GitHub (May 15, 2023). ### NetBox version v3.5.1 ### Python version 3.10 ### Steps to Reproduce 1. Create site 2. Create vlan group with Scope type `DCIM > Site` 3. Create vlans select newly created vlan group 4. Create prefix, select created site, select created vlan ### Expected Behavior Vlans in vlan groups associated to that site should be displayed and selectable. ### Observed Behavior No vlans are shown. ### Additional info Removing the site selection all vlans are show. Vlans that are assigned to a site are shown. (with or without group) The vlan group / site selection seems a or or because the selector boxed are in different tabs: ![image](https://github.com/netbox-community/netbox/assets/980978/0379d849-b97a-4e60-a663-0cd678693459) It implies _to me_ that you "should" only select 1 of the 2. Seems logical because vlan groups are scoped to a multitude of levels (site, location, rack)
adam added the type: bugstatus: duplicate labels 2025-12-29 20:31:53 +01:00
adam closed this issue 2025-12-29 20:31:53 +01:00
Author
Owner

@dhenschen commented on GitHub (May 18, 2023):

@MarcHagen, I can confirm the observed behavior in my testing. When creating a VLAN and assigning it to a VLAN group, it does not automatically get assigned to the site of the VLAN group.

Thoughts on the Prefix Add Form

In the context of https://github.com/netbox-community/netbox/issues/12622, I've been examining how the prefix filtering works. Currently, there is no way to filter by a VLAN group when creating a prefix. However, this functionality does exist when importing a prefix. Considering this inconsistency, would it be beneficial to be able to specify a VLAN group during prefix creation as well? As mentioned by @DanSheps in https://github.com/netbox-community/netbox/issues/12622#issuecomment-1549694473, implementing a VLAN selector could make searching and choosing VLANs more user-friendly.

Thoughts on VLAN Creation

Should the tabbed Assignment field be modified to allow users to input both a Group and a Site? This enhancement could provide more flexibility and convenience in the VLAN assignment process. A question for discussion might be if this change should attempt to prevent mismatches between a VLAN Group's site and the user selected site for a VLAN.

@dhenschen commented on GitHub (May 18, 2023): @MarcHagen, I can confirm the observed behavior in my testing. When creating a VLAN and assigning it to a VLAN group, it does not automatically get assigned to the site of the VLAN group. ## Thoughts on the Prefix Add Form In the context of https://github.com/netbox-community/netbox/issues/12622, I've been examining how the prefix filtering works. Currently, there is no way to filter by a VLAN group when creating a prefix. However, this functionality does exist when importing a prefix. Considering this inconsistency, would it be beneficial to be able to specify a VLAN group during prefix creation as well? As mentioned by @DanSheps in https://github.com/netbox-community/netbox/issues/12622#issuecomment-1549694473, implementing a VLAN selector could make searching and choosing VLANs more user-friendly. ## Thoughts on VLAN Creation Should the tabbed Assignment field be modified to allow users to input both a Group and a Site? This enhancement could provide more flexibility and convenience in the VLAN assignment process. A question for discussion might be if this change should attempt to prevent mismatches between a VLAN Group's site and the user selected site for a VLAN.
Author
Owner

@MarcHagen commented on GitHub (May 23, 2023):

How i interpret the functionality is you can create a VLAN Group, assign that to a site. Create VLANS "objects" and assign those to the VLAN Group. This allows the VLANs to be moved easily from site to site, but not locking VLANs to a specific site?

If that is not correct, then there needs to be way better documentation on how to use vlan groups and why you can assign them to sites (and possible other attributes)

@MarcHagen commented on GitHub (May 23, 2023): How i interpret the functionality is you can create a VLAN Group, assign that to a site. Create VLANS "objects" and assign those to the VLAN Group. This allows the VLANs to be moved easily from site to site, but not locking VLANs to a specific site? If that is not correct, then there needs to be way better documentation on how to use vlan groups and why you can assign them to sites (and possible other attributes)
Author
Owner

@DanSheps commented on GitHub (May 23, 2023):

Duplicate of #12622

@DanSheps commented on GitHub (May 23, 2023): Duplicate of #12622
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8066