Rename breakout profile

This commit is contained in:
Jeremy Stretch
2025-12-14 13:24:02 -05:00
parent 2966288fb5
commit fe52e4cd74
4 changed files with 13 additions and 14 deletions

View File

@@ -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],
}

View File

@@ -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)')),
),
),
(

View File

@@ -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,

View File

@@ -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]]
)