Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add model-specific filters for cables #14434

Closed
jeremystretch opened this issue Dec 5, 2023 · 0 comments
Closed

Add model-specific filters for cables #14434

jeremystretch opened this issue Dec 5, 2023 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@jeremystretch
Copy link
Member

NetBox version

v3.6.6

Feature type

New functionality

Proposed functionality

Add the following query filters for cables:

  • circuittermination
  • consoleport
  • consoleserverport
  • frontport
  • interface
  • powerfeed
  • poweroutlet
  • powerport
  • rearport

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

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Dec 5, 2023
@jeremystretch jeremystretch self-assigned this Dec 27, 2023
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Dec 27, 2023
@jeremystretch jeremystretch added this to the v3.7 milestone Dec 27, 2023
jeremystretch added a commit that referenced this issue Dec 28, 2023
* Add termination object filters for cables

* Add tests for new filters
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

1 participant