diff --git a/netbox/dcim/cable_profiles.py b/netbox/dcim/cable_profiles.py index 66cfa13a4..b4f323012 100644 --- a/netbox/dcim/cable_profiles.py +++ b/netbox/dcim/cable_profiles.py @@ -253,7 +253,7 @@ class Breakout1x4CableProfile(BaseCableProfile): return self._mapping.get((connector, position)) -class Shuffle2x2MPO8CableProfile(BaseCableProfile): +class Shuffle2C4PCableProfile(BaseCableProfile): a_connectors = { 1: [1, 2, 3, 4], 2: [1, 2, 3, 4], @@ -274,7 +274,7 @@ class Shuffle2x2MPO8CableProfile(BaseCableProfile): return self._mapping.get((connector, position)) -class Shuffle4x4MPO8CableProfile(BaseCableProfile): +class Shuffle4C4PCableProfile(BaseCableProfile): a_connectors = { 1: [1, 2, 3, 4], 2: [1, 2, 3, 4], diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index 8080005ea..3ebe3dc50 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -1747,8 +1747,8 @@ class CableProfileChoices(ChoiceSet): BREAKOUT_1X4 = 'breakout-1x4' SHUFFLE_BREAKOUT_2X8 = 'shuffle-breakout-2x8' # Shuffles - SHUFFLE_2X2_MPO8 = 'shuffle-2x2-mpo8' - SHUFFLE_4X4_MPO8 = 'shuffle-4x4-mpo8' + SHUFFLE_2C4P = 'shuffle-2c4p' + SHUFFLE_4C4P = 'shuffle-4c4p' CHOICES = ( ( @@ -1789,8 +1789,8 @@ class CableProfileChoices(ChoiceSet): ( _('Shuffles'), ( - (SHUFFLE_2X2_MPO8, _('Shuffle (2x2 MPO8)')), - (SHUFFLE_4X4_MPO8, _('Shuffle (4x4 MPO8)')), + (SHUFFLE_2C4P, _('Shuffle (2C4P)')), + (SHUFFLE_4C4P, _('Shuffle (4C4P)')), (SHUFFLE_BREAKOUT_2X8, _('Shuffle breakout (2x8)')), ), ), diff --git a/netbox/dcim/models/cables.py b/netbox/dcim/models/cables.py index b15185ede..03397b233 100644 --- a/netbox/dcim/models/cables.py +++ b/netbox/dcim/models/cables.py @@ -157,8 +157,8 @@ class Cable(PrimaryModel): CableProfileChoices.TRUNK_4C8P: cable_profiles.Trunk4C8PCableProfile, CableProfileChoices.TRUNK_8C4P: cable_profiles.Trunk8C4PCableProfile, CableProfileChoices.BREAKOUT_1X4: cable_profiles.Breakout1x4CableProfile, - CableProfileChoices.SHUFFLE_2X2_MPO8: cable_profiles.Shuffle2x2MPO8CableProfile, - CableProfileChoices.SHUFFLE_4X4_MPO8: cable_profiles.Shuffle4x4MPO8CableProfile, + CableProfileChoices.SHUFFLE_2C4P: cable_profiles.Shuffle2C4PCableProfile, + CableProfileChoices.SHUFFLE_4C4P: cable_profiles.Shuffle4C4PCableProfile, CableProfileChoices.SHUFFLE_BREAKOUT_2X8: cable_profiles.ShuffleBreakout2x8CableProfile, }.get(self.profile) diff --git a/netbox/dcim/tests/test_cablepaths2.py b/netbox/dcim/tests/test_cablepaths2.py index ac9dd6d9d..6d6049df5 100644 --- a/netbox/dcim/tests/test_cablepaths2.py +++ b/netbox/dcim/tests/test_cablepaths2.py @@ -632,7 +632,7 @@ class CablePathTests(CablePathTestCase): # Test SVG generation CableTraceSVG(interfaces[0]).render() - def test_106_cable_profile_shuffle_2x2_mpo8(self): + def test_106_cable_profile_shuffle(self): """ [IF1] --C1-- [FP1][RP1] --C17-- [RP3][FP9] --C9-- [IF9] [IF2] --C2-- [FP2] [FP10] --C10-- [IF10] @@ -710,7 +710,7 @@ class CablePathTests(CablePathTestCase): cable.save() cables.append(cable) shuffle_cable = Cable( - profile=CableProfileChoices.SHUFFLE_2X2_MPO8, + profile=CableProfileChoices.SHUFFLE_2C4P, a_terminations=rear_ports[0:2], b_terminations=rear_ports[2:4], )