Generic search #3218

Closed
opened 2025-12-29 18:26:49 +01:00 by adam · 3 comments
Owner

Originally created by @sebastienremaud on GitHub (Jan 24, 2020).

Environment

  • Python version: 3.5.3
  • NetBox version: 2.6.1

Proposed Functionality

We have 2 similar problems, the 2 problems are based on research
Often we do a site search. We have multiple sites with the same ID.
The site form is "CO-001-Paris1st"
CO-001-Paris2nd
CO-001-Paris4th
Lots of sites like that in Paris.
I would like to select all the sites in Paris to display the prefixes.
I can select them one by one with the CTRL key but it spends too much time.

My second problem is still in research:
Do a search with 3 bytes and have all my prefixes, I explain :
I have a lot of prefixes with 10.80.0.x and I want to display all my prefixes.
However if I search with 10.80.0 it only comes out on 10.80.0.0
I would like to come out all 10.80.0.x

It would be very comfortable to use an "*" to select everything that you want
eg: 10.80.0. * to search for all prefixes by indicating only the 3 bytes
and CO-001- * to search for all sites with this starting

Use Case

search from generic keyword

Database Changes

no

External Dependencies

no

Originally created by @sebastienremaud on GitHub (Jan 24, 2020). ### Environment * Python version: 3.5.3 * NetBox version: 2.6.1 ### Proposed Functionality We have 2 similar problems, the 2 problems are based on research Often we do a site search. We have multiple sites with the same ID. The site form is "CO-001-Paris1st" CO-001-Paris2nd CO-001-Paris4th Lots of sites like that in Paris. I would like to select all the sites in Paris to display the prefixes. I can select them one by one with the CTRL key but it spends too much time. My second problem is still in research: Do a search with 3 bytes and have all my prefixes, I explain : I have a lot of prefixes with 10.80.0.x and I want to display all my prefixes. However if I search with 10.80.0 it only comes out on 10.80.0.0 I would like to come out all 10.80.0.x It would be very comfortable to use an "*" to select everything that you want eg: 10.80.0. * to search for all prefixes by indicating only the 3 bytes and CO-001- * to search for all sites with this starting ### Use Case search from generic keyword ### Database Changes no ### External Dependencies no
adam closed this issue 2025-12-29 18:26:49 +01:00
Author
Owner

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

I would like to select all the sites in Paris to display the prefixes.

NetBox uses regions to group sites. You can create a region named Paris, assign all of the applicable sites, and then search prefixes by region very easily.

It would be very comfortable to use an "*" to select everything that you want

Wildcard search works very poorly for IP addresses due to the separators used in the address (dots for IPv4, colons for IPv6). NetBox provides the within and within_include search filters to match all prefixes within the specified network, .e.g. GET /ipam/prefixes/?within=10.16.0.0/20. (Note that there is no equivalent way to express this query using wildcards, because the /20 mask does not fall on a byte boundary.)

and CO-001- * to search for all sites with this starting

Searching for CO-001- will match all sites with names containing this string.

Hope that helps! If you require any further assistance, please post to our mailing list.

@jeremystretch commented on GitHub (Jan 24, 2020): > I would like to select all the sites in Paris to display the prefixes. NetBox uses regions to group sites. You can create a region named Paris, assign all of the applicable sites, and then search prefixes by region very easily. > It would be very comfortable to use an "*" to select everything that you want Wildcard search works very poorly for IP addresses due to the separators used in the address (dots for IPv4, colons for IPv6). NetBox provides the `within` and `within_include` search filters to match all prefixes within the specified network, .e.g. `GET /ipam/prefixes/?within=10.16.0.0/20`. (Note that there is no equivalent way to express this query using wildcards, because the /20 mask does not fall on a byte boundary.) > and CO-001- * to search for all sites with this starting Searching for `CO-001-` will match all sites with names containing this string. Hope that helps! If you require any further assistance, please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss).
Author
Owner

@sebastienremaud commented on GitHub (Feb 7, 2020):

NetBox uses regions to group sites. You can create a region named Paris, assign all of the applicable sites, and then search prefixes by region very easily.

I created region Paris, but in the prefixes search (right part); there is not Region field ?!

@sebastienremaud commented on GitHub (Feb 7, 2020): > NetBox uses regions to group sites. You can create a region named Paris, assign all of the applicable sites, and then search prefixes by region very easily. I created region Paris, but in the prefixes search (right part); there is not Region field ?!
Author
Owner

@jeremystretch commented on GitHub (Feb 7, 2020):

Please upgrade to the most recent release.

@jeremystretch commented on GitHub (Feb 7, 2020): Please upgrade to the most recent release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3218