[PR #3994] [CLOSED] 3193 front rear mapping #12724

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3994
Author: @steffann
Created: 1/23/2020
Status: Closed

Base: developHead: 3193-front-rear-mapping


📝 Commits (4)

  • 0117555 New trace method that takes 1-to-1 front/rear ports and nested sets of front/rear ports into account
  • e590059 Add tests for new trace method
  • 044397c Improve example
  • d3d6361 Add diagram to test and remove unused bits

📊 Changes

3 files changed (+418 additions, -44 deletions)

View changed files

📝 netbox/circuits/models.py (+3 -0)
📝 netbox/dcim/models/device_components.py (+90 -44)
netbox/dcim/tests/test_traces.py (+325 -0)

📄 Description

Fixes: #3193

I reimplemented CircuitTermination.trace() to properly deal with rear ports that have 1 position and front port (just continue with the next cable) and with nested front/rear ports. This supports scenarios like:

Intf <-> FP                               FP <-> Intf
         ^                                 ^
       [mux1]                           [mux4]
         v                                 v
         RP <-> FP                 FP <-> RP
                ^                   ^
              [mux2]             [mux3]
                v                   v
                RP <-> Circuit <-> RP

🔄 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/3994 **Author:** [@steffann](https://github.com/steffann) **Created:** 1/23/2020 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `3193-front-rear-mapping` --- ### 📝 Commits (4) - [`0117555`](https://github.com/netbox-community/netbox/commit/011755507231673a495f8a7b9c07d00033aec594) New trace method that takes 1-to-1 front/rear ports and nested sets of front/rear ports into account - [`e590059`](https://github.com/netbox-community/netbox/commit/e590059d455835e7c58dda2bcce8376cb6d33594) Add tests for new trace method - [`044397c`](https://github.com/netbox-community/netbox/commit/044397c75ce8f98a3e786e3adf673e7cee61f9d2) Improve example - [`d3d6361`](https://github.com/netbox-community/netbox/commit/d3d6361fb6ad6040c83d6989ade63c99f540fd4a) Add diagram to test and remove unused bits ### 📊 Changes **3 files changed** (+418 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/models.py` (+3 -0) 📝 `netbox/dcim/models/device_components.py` (+90 -44) ➕ `netbox/dcim/tests/test_traces.py` (+325 -0) </details> ### 📄 Description ### Fixes: #3193 I reimplemented `CircuitTermination.trace()` to properly deal with rear ports that have 1 position and front port (just continue with the next cable) and with nested front/rear ports. This supports scenarios like: ``` Intf <-> FP FP <-> Intf ^ ^ [mux1] [mux4] v v RP <-> FP FP <-> RP ^ ^ [mux2] [mux3] v v RP <-> Circuit <-> RP ``` --- <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:16 +01:00
adam closed this issue 2025-12-29 22:23:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12724