Interface Connections allow duplicate connections to be created #2063

Closed
opened 2025-12-29 17:21:55 +01:00 by adam · 1 comment
Owner

Originally created by @kmiller7851 on GitHub (Oct 11, 2018).

Environment

  • Python version: 3.5.3
  • NetBox version: 2.4.6

Steps to Reproduce

1)Create 3 devices with network connections with at least one physical network port each (device A, Device B, Device C)

2)Create an interface connection from device A port 1 to device B port 1, with device A port 1 being the 'A side' of the connection, and device B port 1 being the 'B side' of the connection.

3)Create an interface connection from Device C port 1 to device A port 1, with Device C port 1 as the 'A side' of the connection, and device A port 1 as the 'B side' of the connection.

Expected Behavior

After device A has a port connection already on it, it should become unavailable/error out on attempting to add another connection to it.

Observed Behavior

The 'duplicate' connection successfully creates. In previous versions, any interface with a connection on it was 'greyed' out, however it now looks like any interface with/without a connection is able to be chosen, and will succeed in creating a new connection if it is on the other side than its current connection(aka now an interface allows 2 connections, as long as one connection it is on the A side, and the other it is on the B side)

Originally created by @kmiller7851 on GitHub (Oct 11, 2018). ### Environment * Python version: 3.5.3 * NetBox version: 2.4.6 ### Steps to Reproduce 1)Create 3 devices with network connections with at least one physical network port each (device A, Device B, Device C) 2)Create an interface connection from device A port 1 to device B port 1, with device A port 1 being the 'A side' of the connection, and device B port 1 being the 'B side' of the connection. 3)Create an interface connection from Device C port 1 to device A port 1, with Device C port 1 as the 'A side' of the connection, and device A port 1 as the 'B side' of the connection. ### Expected Behavior After device A has a port connection already on it, it should become unavailable/error out on attempting to add another connection to it. ### Observed Behavior The 'duplicate' connection successfully creates. In previous versions, any interface with a connection on it was 'greyed' out, however it now looks like any interface with/without a connection is able to be chosen, and will succeed in creating a new connection if it is on the other side than its current connection(aka now an interface allows 2 connections, as long as one connection it is on the A side, and the other it is on the B side)
adam added the type: bugstatus: accepted labels 2025-12-29 17:21:55 +01:00
adam closed this issue 2025-12-29 17:21:56 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 16, 2018):

There are two problems here.

First, #2487 introduced a bug where the is_connected attribute is no longer included in the list of interfaces returned by the API. This attribute is used to render connected interfaces as disabled in the form widget.

Second, the InterfaceConnection model is missing validation for this inside its clean() method.

@jeremystretch commented on GitHub (Oct 16, 2018): There are two problems here. First, #2487 introduced a bug where the `is_connected` attribute is no longer included in the list of interfaces returned by the API. This attribute is used to render connected interfaces as disabled in the form widget. Second, the InterfaceConnection model is missing validation for this inside its `clean()` method.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2063