Circuit termination connected endpoint does not show up in API response #4126

Closed
opened 2025-12-29 18:33:19 +01:00 by adam · 4 comments
Owner

Originally created by @ggidofalvy-tc on GitHub (Sep 22, 2020).

Environment

  • Python version: 3.7.3
  • NetBox version: 2.9.3

Steps to Reproduce

  1. Create circuit
  2. Create A-side termination
  3. Connect A-side termination to arbitrary interface on a device
  4. Create Z-side termination
  5. Connect Z-side termination to arbitrary interface on a device
  6. Check web interface + API result of circuit

Expected Behavior

The web interface and the API shows the connected interfaces/devices on both A and Z sides.

Observed Behavior

The web interface shows the connected interfaces/devices on both A and Z sides; however, the API only shows the A side as connected.

Deleting the terminations and creating the Z-side termination first, then the A-side termination leads to the A-side termination not showing any connected endpoints when queried through the API.

NetBox UI correctly shows the connections
NetBox API does not!

Swapping terminations leads to the API showing the A-side as having nothing connected to it.

NetBox UI correctly shows the connections after swap
NetBox API still doesn't, now the A-side is affected...

The actual circuit terminations created are also affected by this issue.

c5

The 'fix' for this issue did not fix the problem with the model itself, it is a mere workaround, querying the attached cable (and not the connected_endpoint, which can be null).

Originally created by @ggidofalvy-tc on GitHub (Sep 22, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.7.3 * NetBox version: 2.9.3 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. Create circuit 2. Create A-side termination 3. Connect A-side termination to arbitrary interface on a device 4. Create Z-side termination 5. Connect Z-side termination to arbitrary interface on a device 6. Check web interface + API result of circuit <!-- What did you expect to happen? --> ### Expected Behavior The web interface and the API shows the connected interfaces/devices on both A and Z sides. <!-- What happened instead? --> ### Observed Behavior The web interface shows the connected interfaces/devices on both A and Z sides; however, the API only shows the A side as connected. Deleting the terminations and creating the Z-side termination first, then the A-side termination leads to the A-side termination not showing any connected endpoints when queried through the API. ![NetBox UI correctly shows the connections](https://user-images.githubusercontent.com/69459847/93906788-e8728980-fcfc-11ea-934e-f0b263338e08.PNG) ![NetBox API does not!](https://user-images.githubusercontent.com/69459847/93906845-fa542c80-fcfc-11ea-96ae-f1afff52c7b0.png) Swapping terminations leads to the API showing the A-side as having nothing connected to it. ![NetBox UI correctly shows the connections after swap](https://user-images.githubusercontent.com/69459847/93907243-60d94a80-fcfd-11ea-9a00-6e6c21350d16.PNG) ![NetBox API still doesn't, now the A-side is affected...](https://user-images.githubusercontent.com/69459847/93907258-66369500-fcfd-11ea-931f-c53cacfeed94.png) The actual circuit terminations created are also affected by this issue. ![c5](https://user-images.githubusercontent.com/69459847/93907494-ae55b780-fcfd-11ea-835c-6a7c1d9dbfca.png) The ['fix' for this issue](https://github.com/netbox-community/netbox/commit/1d0b27c99e166744f9732441a17f7d7fb88f7407) did not fix the problem with the model itself, it is a mere workaround, querying the attached cable (and not the connected_endpoint, which can be null).
adam added the status: duplicate label 2025-12-29 18:33:19 +01:00
adam closed this issue 2025-12-29 18:33:19 +01:00
Author
Owner

@ggidofalvy-tc commented on GitHub (Sep 22, 2020):

Seems to be a duplicate of #4851 ?

Also only affects new circuits. The issue began after updating from v2.7.10.

@ggidofalvy-tc commented on GitHub (Sep 22, 2020): Seems to be a duplicate of #4851 ? Also only affects new circuits. The issue began after updating from v2.7.10.
Author
Owner

@ggidofalvy-tc commented on GitHub (Sep 22, 2020):

For "end-user" developers who ran into this issue: A workaround is to query the cable within the circuit termination, then use the termination within the cable that isn't the original circuit termination (this is what the previous fix essentially did).

@ggidofalvy-tc commented on GitHub (Sep 22, 2020): For "end-user" developers who ran into this issue: A workaround is to query the cable within the circuit termination, then use the termination within the cable that isn't the original circuit termination (this is what the previous fix essentially did).
Author
Owner

@ggidofalvy-tc commented on GitHub (Sep 23, 2020):

Doing another reproduction pass revealed that there are some cases when both circuit terminations show their connected_endpoint as null, even when both are connected.

@ggidofalvy-tc commented on GitHub (Sep 23, 2020): Doing another reproduction pass revealed that there are some cases when both circuit terminations show their `connected_endpoint` as null, even when both are connected.
Author
Owner

@jeremystretch commented on GitHub (Oct 15, 2020):

This appears to be the same issue described in #4925.

@jeremystretch commented on GitHub (Oct 15, 2020): This appears to be the same issue described in #4925.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4126