diff --git a/netbox/dcim/cable_profiles.py b/netbox/dcim/cable_profiles.py index b4f323012..d4ee52e18 100644 --- a/netbox/dcim/cable_profiles.py +++ b/netbox/dcim/cable_profiles.py @@ -228,8 +228,7 @@ class Trunk8C4PCableProfile(BaseCableProfile): b_connectors = a_connectors -class Breakout1x4CableProfile(BaseCableProfile): - """Breakout 1:4 to 4:1""" +class Breakout1C4Px4C1PCableProfile(BaseCableProfile): a_connectors = { 1: [1, 2, 3, 4], } diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index 3ebe3dc50..1650520e1 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -1744,7 +1744,7 @@ class CableProfileChoices(ChoiceSet): TRUNK_4C8P = 'trunk-4c8p' TRUNK_8C4P = 'trunk-8c4p' # Breakouts - BREAKOUT_1X4 = 'breakout-1x4' + BREAKOUT_1C4P_4C1P = 'breakout-1c4p-4c1p' SHUFFLE_BREAKOUT_2X8 = 'shuffle-breakout-2x8' # Shuffles SHUFFLE_2C4P = 'shuffle-2c4p' @@ -1783,7 +1783,7 @@ class CableProfileChoices(ChoiceSet): ( _('Breakouts'), ( - (BREAKOUT_1X4, _('Breakout (1:4)')), + (BREAKOUT_1C4P_4C1P, _('Breakout (1C4P/4C1P)')), ), ), ( diff --git a/netbox/dcim/models/cables.py b/netbox/dcim/models/cables.py index 03397b233..f6648e3cf 100644 --- a/netbox/dcim/models/cables.py +++ b/netbox/dcim/models/cables.py @@ -156,7 +156,7 @@ class Cable(PrimaryModel): CableProfileChoices.TRUNK_4C6P: cable_profiles.Trunk4C6PCableProfile, CableProfileChoices.TRUNK_4C8P: cable_profiles.Trunk4C8PCableProfile, CableProfileChoices.TRUNK_8C4P: cable_profiles.Trunk8C4PCableProfile, - CableProfileChoices.BREAKOUT_1X4: cable_profiles.Breakout1x4CableProfile, + CableProfileChoices.BREAKOUT_1C4P_4C1P: cable_profiles.Breakout1C4Px4C1PCableProfile, CableProfileChoices.SHUFFLE_2C4P: cable_profiles.Shuffle2C4PCableProfile, CableProfileChoices.SHUFFLE_4C4P: cable_profiles.Shuffle4C4PCableProfile, CableProfileChoices.SHUFFLE_BREAKOUT_2X8: cable_profiles.ShuffleBreakout2x8CableProfile, diff --git a/netbox/dcim/tests/test_cablepaths2.py b/netbox/dcim/tests/test_cablepaths2.py index 6d6049df5..a59e26b14 100644 --- a/netbox/dcim/tests/test_cablepaths2.py +++ b/netbox/dcim/tests/test_cablepaths2.py @@ -559,7 +559,7 @@ class CablePathTests(CablePathTestCase): cable4.clean() cable4.save() cable5 = Cable( - profile=CableProfileChoices.BREAKOUT_1X4, + profile=CableProfileChoices.BREAKOUT_1C4P_4C1P, a_terminations=[rear_ports[0]], b_terminations=interfaces[4:8], ) @@ -843,14 +843,14 @@ class CablePathTests(CablePathTestCase): # Create cables cable1 = Cable( - profile=CableProfileChoices.BREAKOUT_1X4, + profile=CableProfileChoices.BREAKOUT_1C4P_4C1P, a_terminations=[frontport1], b_terminations=[interfaces[0], interfaces[1]], ) cable1.clean() cable1.save() cable2 = Cable( - profile=CableProfileChoices.BREAKOUT_1X4, + profile=CableProfileChoices.BREAKOUT_1C4P_4C1P, a_terminations=[rearport1], b_terminations=[interfaces[2], interfaces[3]] ) @@ -974,14 +974,14 @@ class CablePathTests(CablePathTestCase): # Create cables cable1 = Cable( - profile=CableProfileChoices.BREAKOUT_1X4, + profile=CableProfileChoices.BREAKOUT_1C4P_4C1P, a_terminations=[frontport1], b_terminations=[interfaces[0], interfaces[1]], ) cable1.clean() cable1.save() cable2 = Cable( - profile=CableProfileChoices.BREAKOUT_1X4, + profile=CableProfileChoices.BREAKOUT_1C4P_4C1P, a_terminations=[frontport2], b_terminations=[interfaces[2], interfaces[3]], ) @@ -995,14 +995,14 @@ class CablePathTests(CablePathTestCase): cable3.clean() cable3.save() cable4 = Cable( - profile=CableProfileChoices.BREAKOUT_1X4, + profile=CableProfileChoices.BREAKOUT_1C4P_4C1P, a_terminations=[frontport3], b_terminations=[interfaces[4], interfaces[5]], ) cable4.clean() cable4.save() cable5 = Cable( - profile=CableProfileChoices.BREAKOUT_1X4, + profile=CableProfileChoices.BREAKOUT_1C4P_4C1P, a_terminations=[frontport4], b_terminations=[interfaces[6], interfaces[7]], ) @@ -1115,14 +1115,14 @@ class CablePathTests(CablePathTestCase): # Create cables cable1 = Cable( - profile=CableProfileChoices.BREAKOUT_1X4, + profile=CableProfileChoices.BREAKOUT_1C4P_4C1P, a_terminations=[circuittermination1], b_terminations=[interfaces[0], interfaces[1]], ) cable1.clean() cable1.save() cable2 = Cable( - profile=CableProfileChoices.BREAKOUT_1X4, + profile=CableProfileChoices.BREAKOUT_1C4P_4C1P, a_terminations=[circuittermination2], b_terminations=[interfaces[2], interfaces[3]] )