[PR #4387] [MERGED] Fixes #3193: Fix cable tracing across multiple rear ports #12832

Closed
opened 2025-12-29 22:23:52 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4387
Author: @jeremystretch
Created: 3/19/2020
Status: Merged
Merged: 3/19/2020
Merged by: @jeremystretch

Base: developHead: 3193-cable-tracing


📝 Commits (4)

  • 40bfb55 Improved cable tracing logic
  • e143158 Remove unused follow_circuits arg for cable tracing
  • f1236e9 Tweak tracing logic to ensure consistent behavior
  • 8d38018 Rewrite and extend cabling logic tests

📊 Changes

6 files changed (+391 additions, -107 deletions)

View changed files

📝 netbox/dcim/api/views.py (+1 -1)
📝 netbox/dcim/models/__init__.py (+8 -8)
📝 netbox/dcim/models/device_components.py (+52 -31)
📝 netbox/dcim/signals.py (+11 -0)
📝 netbox/dcim/tests/test_models.py (+318 -66)
📝 netbox/dcim/views.py (+1 -1)

📄 Description

Fixes: #3193

This is my shot at fixing #3193, inspired by the work by @steffann in #3994. I like this approach better because we avoid recursion and in general I think it's much easier to follow the logic. I've also rewritten the original tests to be much more inclusive and robust.

Note: There still exists a bug in the cable tracing logic that prevents us from fully detecting all paths which traverse a rear port, but that will be addressed under a separate issue.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/4387 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 3/19/2020 **Status:** ✅ Merged **Merged:** 3/19/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `3193-cable-tracing` --- ### 📝 Commits (4) - [`40bfb55`](https://github.com/netbox-community/netbox/commit/40bfb553704b7eac53f05be75e86b7c30cb01e4e) Improved cable tracing logic - [`e143158`](https://github.com/netbox-community/netbox/commit/e143158f121c7d147bec820af227388deca6dfb5) Remove unused follow_circuits arg for cable tracing - [`f1236e9`](https://github.com/netbox-community/netbox/commit/f1236e9bf71b92e8fae7de99f85f4fb32615257e) Tweak tracing logic to ensure consistent behavior - [`8d38018`](https://github.com/netbox-community/netbox/commit/8d3801896f245a037406426e92bfc42a3a9f4c51) Rewrite and extend cabling logic tests ### 📊 Changes **6 files changed** (+391 additions, -107 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/api/views.py` (+1 -1) 📝 `netbox/dcim/models/__init__.py` (+8 -8) 📝 `netbox/dcim/models/device_components.py` (+52 -31) 📝 `netbox/dcim/signals.py` (+11 -0) 📝 `netbox/dcim/tests/test_models.py` (+318 -66) 📝 `netbox/dcim/views.py` (+1 -1) </details> ### 📄 Description ### Fixes: #3193 This is my shot at fixing #3193, inspired by the work by @steffann in #3994. I like this approach better because we avoid recursion and in general I think it's much easier to follow the logic. I've also rewritten the original tests to be much more inclusive and robust. Note: There still exists a bug in the cable tracing logic that prevents us from fully detecting all paths which traverse a rear port, but that will be addressed under a separate issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:23:52 +01:00
adam closed this issue 2025-12-29 22:23:52 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12832