API Get to pull interfaces from VC doesn't return all interfaces #8840

Closed
opened 2025-12-29 20:41:56 +01:00 by adam · 2 comments
Owner

Originally created by @apmillett on GitHub (Nov 15, 2023).

NetBox version

v3.6.5

Python version

3.8

Steps to Reproduce

Execute GET to https:///api/dcim/interfaces/?device=<master_device_in_vc>&format=json&limit=1000

Expected Behavior

Output returns all interfaces in Virtual Chassis (i.e in a two switch Juniper EX VC, interfaces ge-0/0/0-ge-0/0/23 and ge-1/0/0-ge-1/0/23).

Observed Behavior

Only Master member interfaces returned (ge-0/0/0-ge-0/0/23). It worked in 3.5.4 which is the release upgraded from.

In the WebUI, the Master of the VC displays all interfaces, but a GET to the API doesn't. It only displays the interfaces attached to that device in the cluster.

API-JSON.json

Screenshot 2023-11-15 at 13 17 24
Originally created by @apmillett on GitHub (Nov 15, 2023). ### NetBox version v3.6.5 ### Python version 3.8 ### Steps to Reproduce Execute GET to https://<host>/api/dcim/interfaces/?device=<master_device_in_vc>&format=json&limit=1000 ### Expected Behavior Output returns all interfaces in Virtual Chassis (i.e in a two switch Juniper EX VC, interfaces ge-0/0/0-ge-0/0/23 and ge-1/0/0-ge-1/0/23). ### Observed Behavior Only Master member interfaces returned (ge-0/0/0-ge-0/0/23). It worked in 3.5.4 which is the release upgraded from. In the WebUI, the Master of the VC displays all interfaces, but a GET to the API doesn't. It only displays the interfaces attached to that device in the cluster. [API-JSON.json](https://github.com/netbox-community/netbox/files/13365139/API-JSON.json) <img width="972" alt="Screenshot 2023-11-15 at 13 17 24" src="https://github.com/netbox-community/netbox/assets/71007537/e2d116e5-5b92-4419-a8d3-e0499c15e3fa">
adam closed this issue 2025-12-29 20:41:56 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 28, 2023):

Per the v3.6 release notes:

The device and device_id filter for interfaces will no longer include interfaces from virtual chassis peers. Two new filters, virtual_chassis_member and virtual_chassis_member_id, have been introduced to match all interfaces belonging to the specified device's virtual chassis (if any).

@jeremystretch commented on GitHub (Nov 28, 2023): Per the [v3.6 release notes](https://docs.netbox.dev/en/stable/release-notes/version-3.6/#breaking-changes): > The `device` and `device_id` filter for interfaces will no longer include interfaces from virtual chassis peers. Two new filters, `virtual_chassis_member` and `virtual_chassis_member_id`, have been introduced to match all interfaces belonging to the specified device's virtual chassis (if any).
Author
Owner

@apmillett commented on GitHub (Nov 28, 2023):

Thank you. I will add the logic to our Ansible integration to detect VC members, and query for the virtual_chassis_member_id to pull the interfaces list.

Sorry for not seeing this in the release notes!

@apmillett commented on GitHub (Nov 28, 2023): Thank you. I will add the logic to our Ansible integration to detect VC members, and query for the virtual_chassis_member_id to pull the interfaces list. Sorry for not seeing this in the release notes!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8840