netbox: Cable traces do not display `via` anymore

Environment

  • Python version: 3.7 (should be on any)
  • NetBox version: 2.8

Steps to Reproduce

  1. Disable any installed plugins by commenting out the PLUGINS setting in configuration.py.
  2. Add two devices with interfaces, let’s call them A and B.
  3. Create a circuit with two terminations, one on the A side and one on the Z side.
  4. Connect interfaces on device A to the A side of the circuit, and device B on the Z side.

Expected Behavior

Historically, the circuit termination was the connected endpoint, meaning that you were able to see the property via.

Here’s an interface connected before the update:

Bildschirmfoto 2020-05-11 um 12 51 32

This is the trace:

Bildschirmfoto 2020-05-11 um 12 52 02

Observed Behavior

Due to the new tracing logic, circuit terminations gets resolved in there, meaning that the template never ends up in the code path that renders the via, and only interfaces are the connected endpoints.

Here’s an interface connected after the update:

Bildschirmfoto 2020-05-11 um 12 52 11

Here’s the trace:

Bildschirmfoto 2020-05-11 um 12 52 17

This behavior change is a bit tricky to resolve, since it involves two parts of the Netbox code: the signal that handles cables and connected endpoints in netbox.dcim.signals:update_connected_endpoints, which after a bit of indirection calls trace, and the template netbox/templates/dcim/inc/interface, specifically the part that triggers on iface.connected_endpoint.term_side.

I hope that this is understandable. I’d be happy to provide any additional info that you might need.

Cheers

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 9
  • Comments: 17 (11 by maintainers)

Most upvoted comments

My intention is to require no manual action

I’m still working on this, but it’s harder than I thought so I need a bit more time.