Unable to specify single VLAN IDs in range when creating a VLAN group #11111

Closed
opened 2025-12-29 21:40:27 +01:00 by adam · 5 comments
Owner

Originally created by @harryajc on GitHub (May 2, 2025).

Originally assigned to: @Jathn on GitHub.

NetBox version

v4.2.6

Feature type

Change to existing functionality

Proposed functionality

When selecting Vlan IDs within a Vlan Group add the option of single vlan IDs rather than just ranges

Use case

For adding a single vlan id 1900 currently requires 1900-1900,

allow the use of just 1900,

Database changes

No response

External dependencies

No response

Originally created by @harryajc on GitHub (May 2, 2025). Originally assigned to: @Jathn on GitHub. ### NetBox version v4.2.6 ### Feature type Change to existing functionality ### Proposed functionality When selecting Vlan IDs within a Vlan Group add the option of single vlan IDs rather than just ranges ### Use case For adding a single vlan id 1900 currently requires 1900-1900, allow the use of just 1900, ### Database changes _No response_ ### External dependencies _No response_
adam added the type: bugstatus: acceptedcomplexity: low labels 2025-12-29 21:40:27 +01:00
adam closed this issue 2025-12-29 21:40:27 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 2, 2025):

allow the use of just 1900,

This is a description of the functionality. What is your use case?

@jeremystretch commented on GitHub (May 2, 2025): > allow the use of just 1900, This is a description of the functionality. What is your use case?
Author
Owner

@harryajc commented on GitHub (May 8, 2025):

Hi @jeremystretch,

Sorry for the delay, when adding a vlan ID that aren't continuous you have to specify each one as a range, it doesn't allow just specifying them individually.
e.g. this works
Image

But this doesn't

Image

@harryajc commented on GitHub (May 8, 2025): Hi @jeremystretch, Sorry for the delay, when adding a vlan ID that aren't continuous you have to specify each one as a range, it doesn't allow just specifying them individually. e.g. this works ![Image](https://github.com/user-attachments/assets/88e6648b-0b8d-466a-9589-4a6c1ed45c8b) But this doesn't ![Image](https://github.com/user-attachments/assets/e2caec6d-3c8a-43a3-8da7-a756575a44e4)
Author
Owner

@jeremystretch commented on GitHub (May 8, 2025):

Ok, that's much different than how I interpreted your initial post. It sounded like you wanted to create a group with only one VLAN ID.

FWIW I'd consider this a bug rather than a feature request: Rack reservations, for instance, can specify individual units in this manner, so I'd expect it to be consistent for other models. The rack reservation form uses NumericArrayField whereas the VLAN group form uses NumericRangeArrayField; the later should probably be changed.

@jeremystretch commented on GitHub (May 8, 2025): Ok, that's much different than how I interpreted your initial post. It sounded like you wanted to create a group with only one VLAN ID. FWIW I'd consider this a bug rather than a feature request: Rack reservations, for instance, can specify individual units in this manner, so I'd expect it to be consistent for other models. The rack reservation form uses `NumericArrayField` whereas the VLAN group form uses `NumericRangeArrayField`; the later should probably be changed.
Author
Owner

@Jathn commented on GitHub (Jul 28, 2025):

Hello,
I could have a go at this one.

@Jathn commented on GitHub (Jul 28, 2025): Hello, I could have a go at this one.
Author
Owner

@jeremystretch commented on GitHub (Jul 28, 2025):

Thanks @Jathn, I've assigned this to you!

@jeremystretch commented on GitHub (Jul 28, 2025): Thanks @Jathn, I've assigned this to you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11111