Global VLAN/Prefix-Assignments not possible #2241

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

Originally created by @dxks on GitHub (Dec 21, 2018).

Environment

  • Python version: 3.6.6
  • NetBox version: 2.5.1

Steps to Reproduce

Create a global (w/o site) VLAN, VLAN-Group. You are now able to assign this VLAN to an interface in any site as the VLAN is global. This works fine and as expected.

After that try to create a prefix and assign it to the vlan. This is from the child prefixes view (netbox/ipam/prefixes/1/prefixes/) not possible as this causes an Error 400 after selecting the VLAN-Group or if the Prefix is assigned to a site unselecting the site:

GET /netbox/api/ipam/vlans/?site_id=0&group_id=1&limit=0&brief=1

HTTP 400 Bad Request
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
"site_id": [
"Select a valid choice. %(value)s is not one of the available choices."
]
}

Expected Behavior

It should be possible to assign a vlan to the prefix if it is global as VLANs/Prefixes cannot be assigned to Regions, nor the Sites are hierarchical.

Observed Behavior

No VLAN can be selected after selecting a global VLAN-Group.

Originally created by @dxks on GitHub (Dec 21, 2018). ### Environment * Python version: 3.6.6 * NetBox version: 2.5.1 ### Steps to Reproduce Create a global (w/o site) VLAN, VLAN-Group. You are now able to assign this VLAN to an interface in any site as the VLAN is global. This works fine and as expected. After that try to create a prefix and assign it to the vlan. This is from the child prefixes view (netbox/ipam/prefixes/1/prefixes/) not possible as this causes an Error 400 after selecting the VLAN-Group or if the Prefix is assigned to a site unselecting the site: GET /netbox/api/ipam/vlans/?site_id=0&group_id=1&limit=0&brief=1 HTTP 400 Bad Request Allow: GET, POST, HEAD, OPTIONS Content-Type: application/json Vary: Accept { "site_id": [ "Select a valid choice. %(value)s is not one of the available choices." ] } <!-- What did you expect to happen? --> ### Expected Behavior It should be possible to assign a vlan to the prefix if it is global as VLANs/Prefixes cannot be assigned to Regions, nor the Sites are hierarchical. ### Observed Behavior No VLAN can be selected after selecting a global VLAN-Group.
adam added the status: duplicate label 2025-12-29 17:24:01 +01:00
adam closed this issue 2025-12-29 17:24:01 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 21, 2018):

Same issue as #2704

@jeremystretch commented on GitHub (Dec 21, 2018): Same issue as #2704
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2241