Skip to content

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
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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