-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Interface-connections filter only searches lowest PK interface device #5627
Comments
Looks like you've encountered two different issues. I've opened #5639 to address the error when filtering by device name. |
These views are due to be removed under #5223 as they no longer serve much of a purpose (they predate cabling support). Not sure it's worth the effort pursuing this. |
We upgraded from v2.9.4 to v2.11.2 and are experiencing this issue as well. We are not getting an HTTP 500 error, but the response is an empty or incomplete list.
We are not able to consistently specify what is in the "interface_a" of a link, so this will return an incomplete result in most cases. The v2.11.2 instance is running a copy of the v2.9.4 database and manage.py migrate" has been run. In the UI we can see and trace all connections correctly in v2.11.2
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide. |
Maybe we should just remove the duplicate filtering from the interface connections view. That will return all end-to-end connections (typically doubling the number currently returned), but will ensure that filtering is applied consistently. |
Environment
Steps to Reproduce
API endpoint for listing interface connection seems to have broken between versions 2.9 and 2.10.
Expected Behavior
You could previously fetch device's interface connections with /api/dcim/interface-connections/?device=HOSTNAME or with /api/dcim/interface-connections/?device_id=1337 . API should return all connections where the device is a part of, no matter the end of cable the device is in (so both interface_a and interface_b). This behaviour is still standard in the web interface where all connections are shown under /dcim/devices/1337/interfaces/ .
Observed Behavior
Using the interface-connections endpoint with ?device=HOSTNAME returns ValueError with a HTTP status of 500 and the error message of "Field 'id' expected a number but got 'server01'."
Looking at the commits for 2.10 (this for example), it seems like searching with a name has been deprecated and you can actually use both device or device_id to list the connections when you specify the id. This however works only for listing connections that have their first end (interface_a) as that device. As I expect to use the API endpoint (and can use the web interface) to see all connections to and from that device, I consider this a bug.
The text was updated successfully, but these errors were encountered: