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

Trace not working over a circuit #76

Closed
sliddjur opened this issue Mar 2, 2021 · 7 comments · Fixed by #104
Closed

Trace not working over a circuit #76

sliddjur opened this issue Mar 2, 2021 · 7 comments · Fixed by #104
Labels
type: bug Something isn't working as expected
Milestone

Comments

@sliddjur
Copy link

sliddjur commented Mar 2, 2021

Environment

  • Python version: from docker-compose
  • Nautobot version: 52847736a40e (v1.0.0b1)

Steps to Reproduce

  1. connect cable between interface and front port
  2. connect circuit between two rear ports
  3. connect another cable between remote front port and interface

Expected Behavior

I expecteded the connection trace to go over a circuit, which is described in the documentation https://nautobot.readthedocs.io/en/latest/core-functionality/devices/#cables

I expected the circuit to appear in cable overview as one single cable, however it appears as two cables.
See screenshot of what happened, and my paint-job as to what I wanted to achive.

Observed Behavior

When tracing the connection (cable id 411e2ca8-0e95-47a4-95ad-5ba3abb8a2e0), it stops at the circuit. Also the circuit appears as two cables in the cable overview.

image

@steffann
Copy link

steffann commented Mar 2, 2021

I obviously support this 🙂

Considering the experience I have with cable traces I'll happily volunteer to implement this.

andy-wm-arthur pushed a commit to dolthub/nautobot that referenced this issue Mar 2, 2021
@jathanism jathanism added the type: bug Something isn't working as expected label Mar 3, 2021
@jathanism
Copy link
Contributor

Thanks for the report! This will take a little time to triage, but I'll make sure we have a follow up soon.

@steffann Since you're already aware of the issue, your contribution would be welcome. Any context on this issue would be greatly appreciated!

@smk4664
Copy link
Contributor

smk4664 commented Mar 4, 2021

I was able to replicate this in my instance of Nautobot as well. Cable tracing will find all cables in a path until it hits a PathEndpoint. The CircuitTermination model inherits the PathEndpoint. In some cases, a Circuit could be considered an Endpoint, say DSL or Cable/Fiber Broadband. While in other instances such as Ethernet Private Line, Dark Fiber or Transit you would not want the Circuit to be a PathEndpoint.

@smk4664
Copy link
Contributor

smk4664 commented Mar 4, 2021

Well, I may or may not have been right, I now think it has more to do with the logic in CablePath.from_origin.

@steffann
Copy link

steffann commented Mar 4, 2021

Because the trace path is stored these days it should actually be easy to make the trace continue all the way to the end (through circuits). Then depending on what you want to show in the user interface and API you can choose to stop at the first circuit termination, or not. I actually had that implemented for Nautobot's predecessor, but it was decided that tracing through circuits was not a supported feature (although it worked find in 2.8/2.9) so breaking it in 2.10 was not a problem.

I never understood that decision and would be happy to extend the trace functionality to what it was in 2.9 and store the whole path in the cache, with the option to choose to stop at circuit terminations on retrieval.

@smk4664
Copy link
Contributor

smk4664 commented Mar 4, 2021

Thanks @steffann, that will help greatly.

@jathanism
Copy link
Contributor

Because the trace path is stored these days it should actually be easy to make the trace continue all the way to the end (through circuits). Then depending on what you want to show in the user interface and API you can choose to stop at the first circuit termination, or not. I actually had that implemented for Nautobot's predecessor, but it was decided that tracing through circuits was not a supported feature (although it worked find in 2.8/2.9) so breaking it in 2.10 was not a problem.

Hmm... Well let's do this. I'd love to see your solution if you've still got it hanging around. Thanks @steffann!

@jathanism jathanism added this to the v1.0.0 milestone Mar 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants