-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application
Milestone
Description
NetBox version
v3.6.6
Feature type
New functionality
Proposed functionality
Add the following query filters for cables:
circuitterminationconsoleportconsoleserverportfrontportinterfacepowerfeedpoweroutletpowerportrearport
These filters can be used to easily filter for cables by their terminating object(s). For example, GET /api/dcim/cables/?interface=123 will return the cable (if any) terminated to the interface with ID 123.
It should be possible to pass multiple values effecting a logical OR, to allow returning all cables attached to any of the specified terminations, e.g. GET /api/dcim/cables/?interface=123&interface=456&frontport=789.
Use case
This approach greatly simplifies filtering of cables by specific termination points. As noted in #14274, the current approach utilizing termination_type and termination_id filters is limited and error-prone.
Database changes
None
External dependencies
None
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application