Skip to content

Fixes #19379: allow standalone id in vlan-ids range list #20024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Jathn
Copy link
Contributor

@Jathn Jathn commented Aug 5, 2025

Fixes #19379: allow standalone id in vlan-ids range list

The changes made allow for VLAN id ranges to be created using both ranges, e.g. 10-15 and single numbers, e.g. 20 and any combination of these. I've also included broader test coverage and fixed a bug where the range "a-b" would previously break the UI.

Changes made:

  • Changed the instructions in NumericRangeArrayField to indicate that single numbers can be given.
  • Changed utility data function: string_to_ranges (utilities/data.py line 153) so that it properly handles all of these cases.
  • Improved test coverage of utilities.tests.test_data.RangeFunctionsTestCase.test_string_to_ranges

@jeremystretch jeremystretch requested review from a team and jeremystretch and removed request for a team August 5, 2025 19:05
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Jathn!

@jeremystretch jeremystretch merged commit 122f612 into netbox-community:main Aug 7, 2025
7 checks passed
@Jathn Jathn deleted the 19379-allow-vlan-id-without-range branch August 10, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to specify single VLAN IDs in range when creating a VLAN group
2 participants