Filter connected interfaces - Netbox-2.10 #4348

Closed
opened 2025-12-29 18:35:05 +01:00 by adam · 4 comments
Owner

Originally created by @Radi85 on GitHub (Dec 11, 2020).

Environment

  • Python version: 3.7.8
  • NetBox version: 2.10-beta3

Steps to Reproduce

  1. /api/dcim/interfaces/?connected_endpoint_reachable=true

Expected Behavior

The interfaces should be filtered and a list of only connected interfaces should be returned according to the release-notes/version-2.10.md

Observed Behavior

The interfaces are not filtered and all entries are returned.

after inverstigating the code, I found that using connected instead of connected_endpoint_reachable gives the expected result.

Originally created by @Radi85 on GitHub (Dec 11, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reporting reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, please start a discussion instead: https://github.com/netbox-community/netbox/discussions Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.7.8 * NetBox version: 2.10-beta3 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. `/api/dcim/interfaces/?connected_endpoint_reachable=true` <!-- What did you expect to happen? --> ### Expected Behavior The interfaces should be filtered and a list of only **connected** interfaces should be returned according to the [release-notes/version-2.10.md](https://github.com/netbox-community/netbox/blob/develop-2.10/docs/release-notes/version-2.10.md#rest-api-changes) <!-- What happened instead? --> ### Observed Behavior The interfaces are not filtered and all entries are returned. after inverstigating the [code](https://github.com/netbox-community/netbox/blob/develop-2.10/netbox/dcim/filters.py#L760-L769), I found that using `connected` instead of `connected_endpoint_reachable` gives the expected result.
adam added the pending closurebeta labels 2025-12-29 18:35:05 +01:00
adam closed this issue 2025-12-29 18:35:05 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 11, 2020):

NetBox version: 2.10

Please indicate the specific version of NetBox you are running. (NetBox v2.10.0 has not yet been released.)

@jeremystretch commented on GitHub (Dec 11, 2020): > NetBox version: 2.10 Please indicate the specific version of NetBox you are running. (NetBox v2.10.0 has not yet been released.)
Author
Owner

@Radi85 commented on GitHub (Dec 12, 2020):

We are currently using up to date develop-2.10 branch 43d7d55 which is supposed to be in v2.10-beta3.

@Radi85 commented on GitHub (Dec 12, 2020): We are currently using up to date `develop-2.10` branch `43d7d55` which is supposed to be in `v2.10-beta3`.
Author
Owner

@jeremystretch commented on GitHub (Dec 14, 2020):

The interfaces should be filtered and a list of only connected interfaces should be returned according to the release-notes/version-2.10.md

connected_endpoint_reachable is a field of the serialized object, not a filter. Per the REST API documentation, the available filters are cabled and connected; the later indicates whether and end-to-end path exists.

@jeremystretch commented on GitHub (Dec 14, 2020): > The interfaces should be filtered and a list of only connected interfaces should be returned according to the release-notes/version-2.10.md `connected_endpoint_reachable` is a field of the serialized object, not a filter. Per the REST API documentation, the available filters are `cabled` and `connected`; the later indicates whether and end-to-end path exists.
Author
Owner

@DanSheps commented on GitHub (Dec 14, 2020):

Looks like this is resolved. Going to mark this as pending closure.

@DanSheps commented on GitHub (Dec 14, 2020): Looks like this is resolved. Going to mark this as pending closure.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4348