[PR #20973] [MERGED] Additional work for FR #20788 #16104

Closed
opened 2025-12-30 00:25:48 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20973
Author: @jeremystretch
Created: 12/12/2025
Status: Merged
Merged: 12/15/2025
Merged by: @jnovinger

Base: featureHead: 20788-cabletermination-connector


📝 Commits (10+)

📊 Changes

20 files changed (+1586 additions, -492 deletions)

View changed files

📝 netbox/circuits/filtersets.py (+1 -1)
netbox/circuits/migrations/0054_cable_connector_positions.py (+39 -0)
netbox/circuits/migrations/0054_cable_position.py (+0 -23)
📝 netbox/circuits/migrations/0055_add_comments_to_organizationalmodel.py (+1 -1)
📝 netbox/circuits/tests/test_filtersets.py (+1 -1)
📝 netbox/dcim/api/serializers_/cables.py (+3 -2)
📝 netbox/dcim/cable_profiles.py (+345 -63)
📝 netbox/dcim/choices.py (+66 -8)
📝 netbox/dcim/constants.py (+3 -0)
📝 netbox/dcim/filtersets.py (+13 -9)
📝 netbox/dcim/migrations/0220_cable_profile.py (+23 -7)
netbox/dcim/migrations/0221_cable_connector_positions.py (+228 -0)
netbox/dcim/migrations/0221_cable_position.py (+0 -107)
📝 netbox/dcim/migrations/0222_port_mappings.py (+1 -1)
📝 netbox/dcim/models/cables.py (+73 -26)
📝 netbox/dcim/models/device_components.py (+55 -16)
📝 netbox/dcim/tests/test_api.py (+5 -3)
📝 netbox/dcim/tests/test_cablepaths2.py (+718 -220)
📝 netbox/dcim/tests/test_filtersets.py (+8 -1)
📝 netbox/dcim/utils.py (+3 -3)

📄 Description

This PR captures some follow-on work for v4.5 FR #20788 that was identified following the initial implementation.

  • CableTermination
    • Add the 'connector' integer field to index terminations on either end of a cable
    • Rename the position integer field to cable_positions (plural) and convert it to an array of integers
  • All cabled models (device components, power feeds, circuit terminations)
    • Introduce the cable_connector integer field
    • Rename the cable_position integer field to cable_positions (plural) and convert it to an array of integers
    • Introduce set_cable_termination() and clear_cable_termination() methods to simplify setting/clearing of cable termination attributes
  • Rework cable profiles to enumerate A & B connectors
  • Standardize cable profile names
  • Add cable profiles for specific cable types
  • Rename migration files
  • Extend cable path test suite

🔄 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/20973 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 12/12/2025 **Status:** ✅ Merged **Merged:** 12/15/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `feature` ← **Head:** `20788-cabletermination-connector` --- ### 📝 Commits (10+) - [`15c32d4`](https://github.com/netbox-community/netbox/commit/15c32d44e77cbdc0b7737d30b5871487e4f8ff4a) #20788: Map positions by connector (WIP) - [`144f234`](https://github.com/netbox-community/netbox/commit/144f23444b2b27878fd0805b0b0a0046ec7dc63c) Cleanup; updated tests - [`697fda1`](https://github.com/netbox-community/netbox/commit/697fda1be3e855640d21370feb11bda1bb2316b6) Fix shuffle breakout mapping - [`7d945b2`](https://github.com/netbox-community/netbox/commit/7d945b24cb2f8238dbb506f6a31734abca46780f) Rename migrations - [`c1c912d`](https://github.com/netbox-community/netbox/commit/c1c912d84b707fc646bbc8f3a24de853ce6fa710) Clean up validation logic - [`6cc182c`](https://github.com/netbox-community/netbox/commit/6cc182c7ceb33c1e9385d8b7117fd7b8fbdfce79) Flesh out cable profiles & tests - [`f5ec885`](https://github.com/netbox-community/netbox/commit/f5ec885c3a0d41175f6539c7785de1be2bd8b867) Standardize naming of shuffle cables - [`2966288`](https://github.com/netbox-community/netbox/commit/2966288fb51720dda0c3d90dd963ece22d9474e9) Fix test - [`fe52e4c`](https://github.com/netbox-community/netbox/commit/fe52e4cd7483254e3eba55d9c7a871a28376a5ba) Rename breakout profile - [`97b9805`](https://github.com/netbox-community/netbox/commit/97b9805b9430f0f6daeed2085fec2f7a6b72f825) Simplify profile mappings; misc cleanup ### 📊 Changes **20 files changed** (+1586 additions, -492 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/filtersets.py` (+1 -1) ➕ `netbox/circuits/migrations/0054_cable_connector_positions.py` (+39 -0) ➖ `netbox/circuits/migrations/0054_cable_position.py` (+0 -23) 📝 `netbox/circuits/migrations/0055_add_comments_to_organizationalmodel.py` (+1 -1) 📝 `netbox/circuits/tests/test_filtersets.py` (+1 -1) 📝 `netbox/dcim/api/serializers_/cables.py` (+3 -2) 📝 `netbox/dcim/cable_profiles.py` (+345 -63) 📝 `netbox/dcim/choices.py` (+66 -8) 📝 `netbox/dcim/constants.py` (+3 -0) 📝 `netbox/dcim/filtersets.py` (+13 -9) 📝 `netbox/dcim/migrations/0220_cable_profile.py` (+23 -7) ➕ `netbox/dcim/migrations/0221_cable_connector_positions.py` (+228 -0) ➖ `netbox/dcim/migrations/0221_cable_position.py` (+0 -107) 📝 `netbox/dcim/migrations/0222_port_mappings.py` (+1 -1) 📝 `netbox/dcim/models/cables.py` (+73 -26) 📝 `netbox/dcim/models/device_components.py` (+55 -16) 📝 `netbox/dcim/tests/test_api.py` (+5 -3) 📝 `netbox/dcim/tests/test_cablepaths2.py` (+718 -220) 📝 `netbox/dcim/tests/test_filtersets.py` (+8 -1) 📝 `netbox/dcim/utils.py` (+3 -3) </details> ### 📄 Description This PR captures some follow-on work for v4.5 FR #20788 that was identified following the initial implementation. - CableTermination - Add the 'connector' integer field to index terminations on either end of a cable - Rename the `position` integer field to `cable_positions` (plural) and convert it to an array of integers - All cabled models (device components, power feeds, circuit terminations) - Introduce the `cable_connector` integer field - Rename the `cable_position` integer field to `cable_positions` (plural) and convert it to an array of integers - Introduce `set_cable_termination()` and `clear_cable_termination()` methods to simplify setting/clearing of cable termination attributes - Rework cable profiles to enumerate A & B connectors - Standardize cable profile names - Add cable profiles for specific cable types - Rename migration files - Extend cable path test suite --- <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-30 00:25:48 +01:00
adam closed this issue 2025-12-30 00:25:49 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#16104