-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Deployment Type
NetBox Cloud
NetBox Version
v4.3.7
Python Version
3.10
Steps to Reproduce
- Add a new VLAN Group with one or more child VLAN ID ranges (something like "5-6,10-20,30-35" or "1-4094")
- Add one or more VLANs that corresponds to the last VLAN ID in one or more of those ranges. Make sure that they are assigned to that new VLAN Group. So for "5-6,10-20,30-35" add VLANs 6, 20, 35, for "1-4094" add 4094, etc.
- Open the VLAN Group, go to the VLANs tab. Notice that NetBox shows "0 VLANs available" after the last defined VLAN in those ranges.
Expected Behavior
NetBox should only display "x VLANs Available" if there is at least 1 or more availble VLANs ID at the end a range, matching the behavior with IP addresses in a prefix.
Observed Behavior
The VLANs table in the VLAN Group contains an entry that displays "0 VLANs available" at the end of a range if the last VLAN in the range exists. While this is technically true, this can be confusing for a user -- at a quick glance a user may believe there is room for another VLAN, when in actuality this is not true. Furthermore, if the user clicks the "0 VLANs available" button, NetBox will try to add the next VLAN sequentially, which falls outside of the VLAN range. If the user then tries to save this page then they will get an error that this VLAN is outside of the range.
Here I created a VLAN Group with range of "5,10,15,20,25" and created and associated the five VLANs:
