diff --git a/ansible/module_utils/port_utils.py b/ansible/module_utils/port_utils.py index bdffdd3c8ac..bb3c8cb2439 100644 --- a/ansible/module_utils/port_utils.py +++ b/ansible/module_utils/port_utils.py @@ -110,21 +110,26 @@ def get_port_alias_to_name_map(hwsku, asic_name=None): elif hwsku in ["Arista-7060X6-64DE", "Arista-7060X6-64DE-64x400G", "Arista-7060X6-64PE", "Arista-7060X6-64PE-64x400G"]: for i in range(1, 65): - port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 1) * 8) - port_alias_to_name_map["Ethernet65"] = "Ethernet512" - port_alias_to_name_map["Ethernet66"] = "Ethernet513" - elif hwsku in ["Arista-7060X6-64DE-O128S2", "Arista-7060X6-64PE-O128S2"]: + port_alias_to_name_map["etp%d" % i] = "Ethernet%d" % ((i - 1) * 8) + port_alias_to_name_map["etp65"] = "Ethernet512" + port_alias_to_name_map["etp66"] = "Ethernet513" + elif hwsku in ["Arista-7060X6-64DE-O128S2", "Arista-7060X6-64PE-O128S2", "Arista-7060X6-64PE-B-O128", + "Arista-7060X6-64PE-B-O128S2"]: + split_alias_list = ["a", "b"] for i in range(1, 65): - for j in [1, 5]: - port_alias_to_name_map["Ethernet%d/%d" % (i, j)] = "Ethernet%d" % ((i - 1) * 8 + j - 1) - port_alias_to_name_map["Ethernet65"] = "Ethernet512" - port_alias_to_name_map["Ethernet66"] = "Ethernet513" - elif hwsku == "Arista-7060X6-64PE-B-P32O64": + for j, split_alias in enumerate(split_alias_list): + alias = "etp{}{}".format(i, split_alias) + port_alias_to_name_map[alias] = "Ethernet%d" % ((i - 1) * 8 + j * 4) + port_alias_to_name_map["etp65"] = "Ethernet512" + port_alias_to_name_map["etp66"] = "Ethernet513" + elif hwsku in ["Arista-7060X6-64PE-B-P32O64", "Arista-7060X6-64PE-P32O64"]: for i in range(1, 33): port_alias_to_name_map["etp%d" % (i)] = "Ethernet%d" % ((i - 1) * 8) for i in range(33, 65): for x, j in zip([1, 5], ["a", "b"]): port_alias_to_name_map["etp%d%s" % (i, j)] = "Ethernet%d" % ((i - 1) * 8 + x - 1) + port_alias_to_name_map["etp65"] = "Ethernet512" + port_alias_to_name_map["etp66"] = "Ethernet513" elif hwsku == "Arista-7060X6-64PE-256x200G": for i in range(1, 65): for j in [1, 3, 5, 7]: diff --git a/tests/common/helpers/constants.py b/tests/common/helpers/constants.py index 9cc32454d81..7f06536e9c8 100644 --- a/tests/common/helpers/constants.py +++ b/tests/common/helpers/constants.py @@ -31,6 +31,8 @@ "t2": ["t3"], "m0_vlan": ["m1"], "m0_l3": ["m1"], + 'lt2': ['ut2'], + 'ft2': ['ut2'] } # Describe downstream neighbor of dut in different topos @@ -42,7 +44,9 @@ "mx": "server", "t2": "t1", "m0_vlan": "server", - "m0_l3": "mx" + "m0_l3": "mx", + "ft2": "lt2", + "lt2": "t1" } # Describe downstream neighbor of dut in different topos