diff --git a/ansible/module_utils/port_utils.py b/ansible/module_utils/port_utils.py index a93446a2b02..3043e0383b0 100644 --- a/ansible/module_utils/port_utils.py +++ b/ansible/module_utils/port_utils.py @@ -113,12 +113,15 @@ def get_port_alias_to_name_map(hwsku, asic_name=None): 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"]: + 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" + 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 == "Arista-7060X6-64PE-P32O64": for i in range(1, 33): port_alias_to_name_map["Ethernet%d/1" % (i)] = "Ethernet%d" % ((i - 1) * 8)