Cable connection to virtual devices #8876

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

Originally created by @jschewebbn on GitHub (Nov 23, 2023).

NetBox version

v3.6.5

Feature type

Change to existing functionality

Proposed functionality

When viewing the master device in a virtual chassis one can see all interfaces across all devices in the virtual chassis.
When connecting a cable from one device to a device in the virtual chassis it would be really nice to be able to see all interfaces across all devices in the virtual chassis.

I believe that in a previous version (before 3.6) one could get this functionality by selecting the master device for the cable connection and then the interfaces of all devices appeared. However I don't have old old version handy to test with.

Another possible implementation for this would be to allow one to select the virtual chassis as the termination device for a cable and that would show all of the interfaces across all devices in the chassis.

To me selecting the virtual chassis seems more intuitive for this functionality, however I'm not sure how difficult it is to support that. Selecting the master device is consistent with how viewing the master device shows all interfaces across all devices in the virtual chassis.

Use case

When I'm at the console of a switch I see interfaces named gi1/0/1 and gi2/0/1, with the second being on the second switch in the stack (virtual chassis). When I want to make a cable connection from a patch panel to the switch it would be nice to be able to select the switch stack (or master device) and then find both gi1/0/1 and gi2/0/1 rather than needing to select the right switch in the stack.

This is related to https://github.com/netbox-community/netbox/discussions/12525 where I've been looking into extending the virtual chassis support to support front ports and rear ports. I have started those changes and then realized that the cable connection functionality that I described here wasn't in the current version.

Database changes

No response

External dependencies

No response

Originally created by @jschewebbn on GitHub (Nov 23, 2023). ### NetBox version v3.6.5 ### Feature type Change to existing functionality ### Proposed functionality When viewing the master device in a virtual chassis one can see all interfaces across all devices in the virtual chassis. When connecting a cable from one device to a device in the virtual chassis it would be really nice to be able to see all interfaces across all devices in the virtual chassis. I believe that in a previous version (before 3.6) one could get this functionality by selecting the master device for the cable connection and then the interfaces of all devices appeared. However I don't have old old version handy to test with. Another possible implementation for this would be to allow one to select the virtual chassis as the termination device for a cable and that would show all of the interfaces across all devices in the chassis. To me selecting the virtual chassis seems more intuitive for this functionality, however I'm not sure how difficult it is to support that. Selecting the master device is consistent with how viewing the master device shows all interfaces across all devices in the virtual chassis. ### Use case When I'm at the console of a switch I see interfaces named gi1/0/1 and gi2/0/1, with the second being on the second switch in the stack (virtual chassis). When I want to make a cable connection from a patch panel to the switch it would be nice to be able to select the switch stack (or master device) and then find both gi1/0/1 and gi2/0/1 rather than needing to select the right switch in the stack. This is related to https://github.com/netbox-community/netbox/discussions/12525 where I've been looking into extending the virtual chassis support to support front ports and rear ports. I have started those changes and then realized that the cable connection functionality that I described here wasn't in the current version. ### Database changes _No response_ ### External dependencies _No response_
adam closed this issue 2025-12-29 20:42:26 +01:00
Author
Owner

@jschewebbn commented on GitHub (Nov 23, 2023):

I had forgotten how easy it was to bring up a development version. I just brought up version 3.5.9 and see that I'm able to see that when I create a cable connection from a patch panel to the master device in a virtual chassis I can see all interfaces for all devices in the virtual chassis. This no longer works in version 3.6.5.

@jschewebbn commented on GitHub (Nov 23, 2023): I had forgotten how easy it was to bring up a development version. I just brought up version 3.5.9 and see that I'm able to see that when I create a cable connection from a patch panel to the master device in a virtual chassis I can see all interfaces for all devices in the virtual chassis. This no longer works in version 3.6.5.
Author
Owner

@jschewebbn commented on GitHub (Nov 23, 2023):

I suspect this is the change in 3.6.0 that broke this functionality.
"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)."

Watching the access log on a developer version I see that when selecting the interfaces for a cable termination the URL "/api/dcim/interfaces/?brief=true&device_id=2&kind=physical" is visited. When I visit that URL in my browser I see only the interfaces for device 2. However when I change the URL to be "/api/dcim/interfaces/?brief=true&virtual_chassis_member_id=2&kind=physical" I see the interfaces for all members of the virtual chassis.

So it seems that changing the URL used to use the "virtual_chassis_member_id" filter instead of the "device_id" filter would bring back the functionality.

However I note that when using the device ID of a non-master device I also see all interfaces. While personally I'm OK with this, it is not consistent with the device view when one only sees all interfaces on the master device.

What would be the preference of the developer team on how this is resolved?

@jschewebbn commented on GitHub (Nov 23, 2023): I suspect this is the change in 3.6.0 that broke this functionality. "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)." Watching the access log on a developer version I see that when selecting the interfaces for a cable termination the URL "/api/dcim/interfaces/?brief=true&device_id=2&kind=physical" is visited. When I visit that URL in my browser I see only the interfaces for device 2. However when I change the URL to be "/api/dcim/interfaces/?brief=true&virtual_chassis_member_id=2&kind=physical" I see the interfaces for all members of the virtual chassis. So it seems that changing the URL used to use the "virtual_chassis_member_id" filter instead of the "device_id" filter would bring back the functionality. However I note that when using the device ID of a non-master device I also see all interfaces. While personally I'm OK with this, it is not consistent with the device view when one only sees all interfaces on the master device. What would be the preference of the developer team on how this is resolved?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8876