-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Open
Copy link
Labels
netboxstatus: needs triageThis issue is awaiting triage by a maintainerThis issue is awaiting triage by a maintainertype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application
Description
NetBox version
v4.4.2
Feature type
New functionality
Proposed functionality
Extend GraphQL query logic for prefixes to mirror the ability in "circuit terminations" to filter on Location, Site, Site-Group and Region.
My testing suggests it is as simple as updating the imports to include the relevant filters:
from dcim.graphql.filters import LocationFilter, RegionFilter, SiteFilter, SiteGroupFilter
And then adding the following:
_location: Annotated['LocationFilter', strawberry.lazy('dcim.graphql.filters')] | None = (
strawberry_django.filter_field(name='location')
)
_region: Annotated['RegionFilter', strawberry.lazy('dcim.graphql.filters')] | None = (
strawberry_django.filter_field(name='region')
)
_site_group: Annotated['SiteGroupFilter', strawberry.lazy('dcim.graphql.filters')] | None = (
strawberry_django.filter_field(name='site_group')
)
_site: Annotated['SiteFilter', strawberry.lazy('dcim.graphql.filters')] | None = (
strawberry_django.filter_field(name='site')
)
Use case
Allows the query of prefixes by location, site, site-group or region.
Database changes
No response
External dependencies
No response
Metadata
Metadata
Assignees
Labels
netboxstatus: needs triageThis issue is awaiting triage by a maintainerThis issue is awaiting triage by a maintainertype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application