Cannot add vlans to both vlan group (scope DCIM > site group) and site that belong to same site group #5834

Closed
opened 2025-12-29 19:33:19 +01:00 by adam · 1 comment
Owner

Originally created by @billybob83400 on GitHub (Dec 23, 2021).

NetBox version

3.1.1

Python version

3.8

Steps to Reproduce

1.Create site group
2. Create site
3. Create vlan group scope DCIM > site group
4. Create vlan and assign it vlan group + site in the same site group than the scope of the VG

Expected Behavior

Vlan created and belong to both vlan group and site.

Observed Behavior

Get an Error < VLAN is assigned to group XXXX (scope: YYYY ); cannot also assign to site ZZZZ. >

As a workaround, I can:

  1. Edit the vlan group to the specific scope DCIM > site (instead of scope group site)
  2. Create the vlan with the VG and site ( creation is validated)
  3. Go back to edit the VG and set it back to scope DCIM > site group

This is inconsistent behavior. It should either decline the edition of the scope due to vlan already assign or accept the creation of the vlan with the vlan group assigned

Originally created by @billybob83400 on GitHub (Dec 23, 2021). ### NetBox version 3.1.1 ### Python version 3.8 ### Steps to Reproduce 1.Create site group 2. Create site 3. Create vlan group scope DCIM > site group 4. Create vlan and assign it vlan group + site in the same site group than the scope of the VG ### Expected Behavior Vlan created and belong to both vlan group and site. ### Observed Behavior Get an Error < VLAN is assigned to group XXXX (scope: YYYY ); cannot also assign to site ZZZZ. > As a workaround, I can: 1. Edit the vlan group to the specific scope DCIM > site (instead of scope group site) 2. Create the vlan with the VG and site ( creation is validated) 3. Go back to edit the VG and set it back to scope DCIM > site group This is inconsistent behavior. It should either decline the edition of the scope due to vlan already assign or accept the creation of the vlan with the vlan group assigned
adam closed this issue 2025-12-29 19:33:19 +01:00
Author
Owner

@DanSheps commented on GitHub (Dec 23, 2021):

You can only assign to a scope or a site, not both. The error message is accurate.

@DanSheps commented on GitHub (Dec 23, 2021): You can only assign to a scope **or** a site, not both. The error message is accurate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5834