From db021a1de72a09e5eaf4c31d998f6ec2c5fb968b Mon Sep 17 00:00:00 2001 From: Samuel Angebault Date: Fri, 7 Jun 2024 07:14:02 +0200 Subject: [PATCH] [Arista] Add port definitions for 7060X6 HwSkus in port_utils (#13102) * [Arista] Add port definitions for 7060X6 * [Arista] Register HwSku to the broadcom ASIC lists --- ansible/module_utils/port_utils.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ansible/module_utils/port_utils.py b/ansible/module_utils/port_utils.py index 97976815dc..515ad17794 100644 --- a/ansible/module_utils/port_utils.py +++ b/ansible/module_utils/port_utils.py @@ -103,9 +103,27 @@ def get_port_alias_to_name_map(hwsku, asic_name=None): or hwsku == "Arista-7050CX3-32S-C32": for i in range(1, 33): port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 1) * 4) - elif hwsku in ["Arista-7060DX5-64S", "Arista-7060X6-64DE-64x400G"]: + elif hwsku in ["Arista-7060DX5-64S"]: for i in range(1, 65): port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 1) * 8) + 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 == "Arista-7060X6-64PE-128x400G": + 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-256x200G": + for i in range(1, 65): + for j in [1, 3, 5, 7]: + 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-7050QX32S-Q32": for i in range(5, 29): port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 5) * 4)