Standardize naming of shuffle cables

This commit is contained in:
Jeremy Stretch
2025-12-14 12:39:28 -05:00
parent 6cc182c7ce
commit f5ec885c3a
4 changed files with 10 additions and 10 deletions

View File

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

View File

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

View File

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

View File

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