Skip to content
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 allow duplicate connections to be created #2514

Closed
kmiller7851 opened this issue Oct 11, 2018 · 1 comment
Closed

Interface Connections allow duplicate connections to be created #2514

kmiller7851 opened this issue Oct 11, 2018 · 1 comment
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@kmiller7851
Copy link

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)

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Oct 16, 2018
@jeremystretch
Copy link
Member

jeremystretch commented 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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants