Allow filtering VLANs list by minimum/maximum VLAN ID #4293

Closed
opened 2025-12-29 18:34:27 +01:00 by adam · 6 comments
Owner

Originally created by @PieterL75 on GitHub (Nov 23, 2020).

Environment

  • Python version:
  • NetBox version: v2.9.9

Proposed Functionality

I would like to be able to search for a 'range of' vlans.
example : 3000-3500 or 3[0-5]00
and then see what vlans are in use/available in that range.

Use Case

Our VLANs are 'logically' split up in different purposes (ex: 1-10: reserved; 10-999: Infra; 1000-2000: customers; 3000-3500: storage)
When provisioning VLANs, the new vlan has to come out of that range, and not the first available.

Originally created by @PieterL75 on GitHub (Nov 23, 2020). ### Environment * Python version: * NetBox version: v2.9.9 ### Proposed Functionality I would like to be able to search for a 'range of' vlans. example : 3000-3500 or 3[0-5]00 and then see what vlans are in use/available in that range. ### Use Case Our VLANs are 'logically' split up in different purposes (ex: 1-10: reserved; 10-999: Infra; 1000-2000: customers; 3000-3500: storage) When provisioning VLANs, the new vlan has to come out of that range, and not the first available.
adam added the type: featurestatus: needs ownerpending closure labels 2025-12-29 18:34:27 +01:00
adam closed this issue 2025-12-29 18:34:27 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 23, 2020):

This is already possible using the vid__gte and vid__lte filters. For example, GET /api/ipam/vlans/?vid__gte=3000&vid__lte=3500 will return VLANs with a VID of 3000-3500, inclusive.

@jeremystretch commented on GitHub (Nov 23, 2020): This is already possible using the `vid__gte` and `vid__lte` filters. For example, `GET /api/ipam/vlans/?vid__gte=3000&vid__lte=3500` will return VLANs with a VID of 3000-3500, inclusive.
Author
Owner

@PieterL75 commented on GitHub (Nov 24, 2020):

I see that is an inherited functionality from the django enabled queries..
Good to see that it is possible in the API.

Should it be possible to extend the GUI also with this functionality ? I rather think of regex-like filters.

@PieterL75 commented on GitHub (Nov 24, 2020): I see that is an inherited functionality from the django enabled queries.. Good to see that it is possible in the API. Should it be possible to extend the GUI also with this functionality ? I rather think of regex-like filters.
Author
Owner

@jeremystretch commented on GitHub (Nov 24, 2020):

Regex is not ideal for bounding numerical ranges. What if I want to show VLANs 123 through 456? Discrete min/max values are much easier to work with.

@jeremystretch commented on GitHub (Nov 24, 2020): Regex is not ideal for bounding numerical ranges. What if I want to show VLANs 123 through 456? Discrete min/max values are much easier to work with.
Author
Owner

@jeremystretch commented on GitHub (Dec 16, 2020):

I'll mark this as needs owner in case someone would like to take on the work of adding less than/greater than filter widgets to the VLAN list view. However, the scope of this issue should not be construed to include the introduction of any new filters.

@jeremystretch commented on GitHub (Dec 16, 2020): I'll mark this as `needs owner` in case someone would like to take on the work of adding less than/greater than filter widgets to the VLAN list view. However, the scope of this issue should not be construed to include the introduction of any new filters.
Author
Owner

@stale[bot] commented on GitHub (Jan 31, 2021):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@stale[bot] commented on GitHub (Jan 31, 2021): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@stale[bot] commented on GitHub (Feb 18, 2021):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@stale[bot] commented on GitHub (Feb 18, 2021): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4293