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

#4900: New model for cable paths #5212

Merged
merged 67 commits into from
Oct 8, 2020
Merged

Conversation

jeremystretch
Copy link
Member

@jeremystretch jeremystretch commented Oct 5, 2020

Closes: #4900

  • Introduce a new CablePath model for recording the origin, destination, intermediate nodes, and status of each end-to-end path
  • Add a ForeignKey to CablePath on each of the seven path endpoint models
  • Drop the old fields for connected_endpoint and connection_status
  • Cache peer termination on CableTermination instances
  • Remove trace API endpoint from FrontPort and RearPort
  • Remove connection_status field from nested API serializers for device components
  • Add cable_peer field to API serializer for all CableTermination models
  • Overhaul cable tracing logic with the new trace_paths() utility function
  • Completely rewrite all cable path tests
  • Add the retrace_paths management command (temporarily?)

@jeremystretch jeremystretch changed the title #4900: New model for cable paths (DRAFT) #4900: New model for cable paths Oct 7, 2020
@jeremystretch jeremystretch marked this pull request as ready for review October 7, 2020 15:48
@jeremystretch
Copy link
Member Author

To avoid jamming any complex logic into schema migrations, I've opted to retain the trace_paths management command and call it within upgrade.sh. This will, by default, automatically create any missing CablePaths. In theory, this should be necessary only when upgrading to v2.10, however I've also included a --force option to force the recalculation of all CablePath objects should the need arise.

I'm still mulling options for conveying the presence of multiple cable paths through a RearPort with multiple FrontPorts mapped to it in the REST API. I've dropped the /trace/ endpoint from pass-through ports for now.

@jeremystretch jeremystretch merged commit 6470613 into develop-2.10 Oct 8, 2020
@jeremystretch jeremystretch deleted the 4900-cable-paths branch October 8, 2020 19:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants