Search interfaces, front ports, rear ports, ... in hierarchical structured locations #5966

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

Originally created by @baschdello on GitHub (Jan 19, 2022).

NetBox version

v3.1.5

Feature type

Change to existing functionality

Proposed functionality

There exists site groups and locations which can be hierarchical ordered. For example a location tree can be:
block2
| --- rackrow3
| --- rackrow4
At the device search it is possible to select the parent location "block2" and netbox is listing all devices from racks appended to the child locations "rackrow3" and "rackrow4".
It will be useful to have the same filtering method at the Interface search. However if I want to list all interfaces located in parent location "block2" the result is empty. They will only be listed if selecting the child location "rackrow3" or "rackrow4" in location filter directly.
The same filtering functionality should be present at api calls.

Use case

This functionality adds some consistencies regarding the filtering function in UI because this filtering logic is already present at device filtering. Adding this filtering functionality at interfaces, front ports, rear ports, console ports, console server ports, power ports, power outlets will help to get a consistent filtering logic.

Another benefit at using api calls: it can simplify scripted cabling. If the interface of partner device (located in rackrow3) can not be found in the same row it is possible to jump to parent location "block2" and search the partner interface there (it is located in rackrow4). The benefit will be that there is no need to do a separate search for every child location.

Database changes

No response

External dependencies

No response

Originally created by @baschdello on GitHub (Jan 19, 2022). ### NetBox version v3.1.5 ### Feature type Change to existing functionality ### Proposed functionality There exists site groups and locations which can be hierarchical ordered. For example a location tree can be: block2 | --- rackrow3 | --- rackrow4 At the device search it is possible to select the parent location "block2" and netbox is listing all devices from racks appended to the child locations "rackrow3" and "rackrow4". It will be useful to have the same filtering method at the Interface search. However if I want to list all interfaces located in parent location "block2" the result is empty. They will only be listed if selecting the child location "rackrow3" or "rackrow4" in location filter directly. The same filtering functionality should be present at api calls. ### Use case This functionality adds some consistencies regarding the filtering function in UI because this filtering logic is already present at device filtering. Adding this filtering functionality at interfaces, front ports, rear ports, console ports, console server ports, power ports, power outlets will help to get a consistent filtering logic. Another benefit at using api calls: it can simplify scripted cabling. If the interface of partner device (located in rackrow3) can not be found in the same row it is possible to jump to parent location "block2" and search the partner interface there (it is located in rackrow4). The benefit will be that there is no need to do a separate search for every child location. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurestatus: needs ownerpending closure labels 2025-12-29 19:34:59 +01:00
adam closed this issue 2025-12-29 19:34:59 +01:00
Author
Owner

@baschdello commented on GitHub (Jan 19, 2022):

#8370

@baschdello commented on GitHub (Jan 19, 2022): #8370
Author
Owner

@DanSheps commented on GitHub (Jan 22, 2022):

To clarify, currently the interface search allows you to filter the location/site/etc but doesn't let you search for the parent location and show the child locations. Example:

Region: United States -> New York -> New York City
Site: Test
Location: Room: 250 -> Cage 10 -> Row 1
Rack: 2342
Device: Core Router
Interface: Eth1/10

You can search for "Row 1", "New York City" and get the interface, but not "New York" or "Cage 10" and return the interface Eth1/10

@DanSheps commented on GitHub (Jan 22, 2022): To clarify, currently the interface search allows you to filter the location/site/etc but doesn't let you search for the parent location and show the child locations. Example: Region: United States -> New York -> New York City Site: Test Location: Room: 250 -> Cage 10 -> Row 1 Rack: 2342 Device: Core Router Interface: Eth1/10 You can search for "Row 1", "New York City" and get the interface, but not "New York" or "Cage 10" and return the interface Eth1/10
Author
Owner

@baschdello commented on GitHub (Jan 22, 2022):

I tried it again because I did not use region filter before: if I use regions as filter options at the interface search it works well for parent and child regions. In your example "New York" will return interfaces and "New York City" will return interfaces. So filter option "region" seems to be correctly implemented here.
But using locations as filter options it works only with child location. In your example "Row 1" will result interfaces. But using the location "Cage 10" the result is empty.

@baschdello commented on GitHub (Jan 22, 2022): I tried it again because I did not use region filter before: if I use regions as filter options at the interface search it works well for parent and child regions. In your example "New York" will return interfaces and "New York City" will return interfaces. So filter option "region" seems to be correctly implemented here. But using locations as filter options it works only with child location. In your example "Row 1" will result interfaces. But using the location "Cage 10" the result is empty.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 24, 2022):

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.

@github-actions[bot] commented on GitHub (Mar 24, 2022): 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

@github-actions[bot] commented on GitHub (Jun 7, 2022):

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.

@github-actions[bot] commented on GitHub (Jun 7, 2022): 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

@github-actions[bot] commented on GitHub (Jul 7, 2022):

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.

@github-actions[bot] commented on GitHub (Jul 7, 2022): 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#5966