Skip to content

Commit cec5ab2

Browse files
wen587yxieca
authored andcommitted
[GCU]Remove GCU unique lane check for duplicate lanes platforms (#2343)
What I did Remove unique lane check for specific platforms to unblock GCU nightly test. How I did it Add platform check for unique lane validator How to verify it Run unit test
1 parent 8d20771 commit cec5ab2

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

generic_config_updater/gu_common.py

+15-7
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,21 @@ def validate_lanes(self, config_db):
155155
port_to_lanes_map[port] = lanes
156156

157157
# Validate lanes are unique
158-
existing = {}
159-
for port in port_to_lanes_map:
160-
lanes = port_to_lanes_map[port]
161-
for lane in lanes:
162-
if lane in existing:
163-
return False, f"'{lane}' lane is used multiple times in PORT: {set([port, existing[lane]])}"
164-
existing[lane] = port
158+
# TODO: Move this attribute (platform with duplicated lanes in ports) to YANG models
159+
dup_lanes_platforms = [
160+
'x86_64-arista_7050cx3_32s',
161+
'x86_64-dellemc_s5232f_c3538-r0',
162+
]
163+
metadata = config_db.get("DEVICE_METADATA", {})
164+
platform = metadata.get("localhost", {}).get("platform", None)
165+
if platform not in dup_lanes_platforms:
166+
existing = {}
167+
for port in port_to_lanes_map:
168+
lanes = port_to_lanes_map[port]
169+
for lane in lanes:
170+
if lane in existing:
171+
return False, f"'{lane}' lane is used multiple times in PORT: {set([port, existing[lane]])}"
172+
existing[lane] = port
165173
return True, None
166174

167175
def validate_bgp_peer_group(self, config_db):

0 commit comments

Comments
 (0)