Allow search of virtual-chassis using name or master #4442

Closed
opened 2025-12-29 18:36:01 +01:00 by adam · 1 comment
Owner

Originally created by @FragmentedPacket on GitHub (Jan 7, 2021).

Originally assigned to: @FragmentedPacket on GitHub.

Environment

  • Python version: 3.6
  • NetBox version: 2.9/2.10

Proposed Functionality

Allow users to GET /api/dcim/virtual-chassis using name or master.

Use Case

Since name is a required parameter, it would be nice to be able to search for the exact name or even master as well.

This would help find a VC that is more unique rather than falling back to the default q search.

https://github.com/netbox-community/netbox/blob/develop/netbox/dcim/filters.py#L1014

I can own the implementation as I spoke with @lampwins and he advised me where to look for the filtering.

Originally created by @FragmentedPacket on GitHub (Jan 7, 2021). Originally assigned to: @FragmentedPacket on GitHub. <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for proposing specific new features or enhancements. If you have a general idea or question, please start a discussion instead: https://github.com/netbox-community/netbox/discussions NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.6 * NetBox version: 2.9/2.10 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality Allow users to GET `/api/dcim/virtual-chassis` using `name` or `master`. <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case Since `name` is a required parameter, it would be nice to be able to search for the exact name or even `master` as well. This would help find a VC that is more unique rather than falling back to the default `q` search. https://github.com/netbox-community/netbox/blob/develop/netbox/dcim/filters.py#L1014 I can own the implementation as I spoke with @lampwins and he advised me where to look for the filtering.
adam added the status: acceptedtype: feature labels 2025-12-29 18:36:01 +01:00
adam closed this issue 2025-12-29 18:36:01 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 7, 2021):

Please be sure to extend the filterset tests appropriately as well.

@jeremystretch commented on GitHub (Jan 7, 2021): Please be sure to extend the filterset tests appropriately as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4442