[sonic-config-gen] Modify lag names to enforce 15 chars limit (#10792)
Why I did it Previous subport unit tests uses port channel names like PortChannel01, so for subport name generated PortChannel01.10, it exceeds Linux network interface name 15 char limit. Signed-off-by: Longxiang Lyu lolv@microsoft.com How I did it Modify PortChannel01 to PortChannel1.
This commit is contained in:
parent
5ea244cac8
commit
5eda219bdc
@ -176,7 +176,7 @@
|
||||
<Hostname>switch-t0</Hostname>
|
||||
<PortChannelInterfaces>
|
||||
<PortChannel>
|
||||
<Name>PortChannel01</Name>
|
||||
<Name>PortChannel1</Name>
|
||||
<AttachTo>fortyGigE0/4</AttachTo>
|
||||
<SubInterface/>
|
||||
</PortChannel>
|
||||
@ -228,12 +228,12 @@
|
||||
<IPInterfaces>
|
||||
<IPInterface>
|
||||
<Name i:nil="true"/>
|
||||
<AttachTo>PortChannel01</AttachTo>
|
||||
<AttachTo>PortChannel1</AttachTo>
|
||||
<Prefix>10.0.0.56/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>PortChannel01</AttachTo>
|
||||
<AttachTo>PortChannel1</AttachTo>
|
||||
<Prefix>FC00::71/126</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
@ -265,7 +265,7 @@
|
||||
<DataAcls/>
|
||||
<AclInterfaces>
|
||||
<AclInterface>
|
||||
<AttachTo>PortChannel01</AttachTo>
|
||||
<AttachTo>PortChannel1</AttachTo>
|
||||
<InAcl>DataAcl</InAcl>
|
||||
<Type>DataPlane</Type>
|
||||
</AclInterface>
|
||||
|
@ -176,7 +176,7 @@
|
||||
<Hostname>switch-t0</Hostname>
|
||||
<PortChannelInterfaces>
|
||||
<PortChannel>
|
||||
<Name>PortChannel01</Name>
|
||||
<Name>PortChannel1</Name>
|
||||
<AttachTo>fortyGigE0/4</AttachTo>
|
||||
<SubInterface/>
|
||||
</PortChannel>
|
||||
@ -245,12 +245,12 @@
|
||||
<IPInterfaces>
|
||||
<IPInterface>
|
||||
<Name i:nil="true"/>
|
||||
<AttachTo>PortChannel01</AttachTo>
|
||||
<AttachTo>PortChannel1</AttachTo>
|
||||
<Prefix>10.0.0.56/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>PortChannel01</AttachTo>
|
||||
<AttachTo>PortChannel1</AttachTo>
|
||||
<Prefix>FC00::71/126</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
@ -272,7 +272,7 @@
|
||||
<DataAcls/>
|
||||
<AclInterfaces>
|
||||
<AclInterface>
|
||||
<AttachTo>PortChannel01</AttachTo>
|
||||
<AttachTo>PortChannel1</AttachTo>
|
||||
<InAcl>DataAcl</InAcl>
|
||||
<Type>DataPlane</Type>
|
||||
</AclInterface>
|
||||
|
@ -176,7 +176,7 @@
|
||||
<Hostname>switch-t0</Hostname>
|
||||
<PortChannelInterfaces>
|
||||
<PortChannel>
|
||||
<Name>PortChannel01</Name>
|
||||
<Name>PortChannel1</Name>
|
||||
<AttachTo>fortyGigE0/4</AttachTo>
|
||||
<SubInterface/>
|
||||
</PortChannel>
|
||||
@ -228,12 +228,12 @@
|
||||
<IPInterfaces>
|
||||
<IPInterface>
|
||||
<Name i:nil="true"/>
|
||||
<AttachTo>PortChannel01</AttachTo>
|
||||
<AttachTo>PortChannel1</AttachTo>
|
||||
<Prefix>10.0.0.56/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>PortChannel01</AttachTo>
|
||||
<AttachTo>PortChannel1</AttachTo>
|
||||
<Prefix>FC00::71/126</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
@ -265,7 +265,7 @@
|
||||
<DataAcls/>
|
||||
<AclInterfaces>
|
||||
<AclInterface>
|
||||
<AttachTo>PortChannel01</AttachTo>
|
||||
<AttachTo>PortChannel1</AttachTo>
|
||||
<InAcl>DataAcl</InAcl>
|
||||
<Type>DataPlane</Type>
|
||||
</AclInterface>
|
||||
|
@ -325,7 +325,7 @@ class TestCfgGen(TestCase):
|
||||
output = self.run_script(argument)
|
||||
self.assertEqual(
|
||||
utils.to_dict(output.strip()),
|
||||
utils.to_dict("{'PortChannel01': {'admin_status': 'up', 'min_links': '1', 'members': ['Ethernet4'], 'mtu': '9100', 'tpid': '0x8100'}}")
|
||||
utils.to_dict("{'PortChannel1': {'admin_status': 'up', 'min_links': '1', 'members': ['Ethernet4'], 'mtu': '9100', 'tpid': '0x8100'}}")
|
||||
)
|
||||
|
||||
def test_minigraph_portchannel_with_more_member(self):
|
||||
@ -349,7 +349,7 @@ class TestCfgGen(TestCase):
|
||||
output = self.run_script(argument)
|
||||
self.assertEqual(
|
||||
utils.liststr_to_dict(output.strip()),
|
||||
utils.liststr_to_dict("['PortChannel01', ('PortChannel01', '10.0.0.56/31'), ('PortChannel01', 'FC00::71/126')]")
|
||||
utils.liststr_to_dict("['PortChannel1', ('PortChannel1', '10.0.0.56/31'), ('PortChannel1', 'FC00::71/126')]")
|
||||
)
|
||||
|
||||
def test_minigraph_neighbors(self):
|
||||
@ -803,11 +803,11 @@ class TestCfgGen(TestCase):
|
||||
self.assertEqual(
|
||||
utils.to_dict(output.strip()),
|
||||
utils.to_dict(
|
||||
"{('PortChannel01.10', '10.0.0.56/31'): {}, "
|
||||
"{('PortChannel1.10', '10.0.0.56/31'): {}, "
|
||||
"'Ethernet0.10': {'admin_status': 'up'}, "
|
||||
"('Ethernet0.10', '10.0.0.58/31'): {}, "
|
||||
"('PortChannel01.10', 'FC00::71/126'): {}, "
|
||||
"'PortChannel01.10': {'admin_status': 'up'}, "
|
||||
"('PortChannel1.10', 'FC00::71/126'): {}, "
|
||||
"'PortChannel1.10': {'admin_status': 'up'}, "
|
||||
"('Ethernet0.10', 'FC00::75/126'): {}}"
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user