Skip to content

Commit

Permalink
Revert "Skip default lanes dup check (#3489)" (#3572)
Browse files Browse the repository at this point in the history
Reverts #3489 since the PR: sonic-net/sonic-buildimage#19968 has merged.
  • Loading branch information
xincunli-sonic authored Oct 22, 2024
1 parent 6c8007f commit dd34d7c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
3 changes: 1 addition & 2 deletions generic_config_updater/gu_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ def validate_lanes(self, config_db):
for port in port_to_lanes_map:
lanes = port_to_lanes_map[port]
for lane in lanes:
# default lane would be 0, it does not need validate duplication.
if lane in existing and lane != '0':
if lane in existing:
return False, f"'{lane}' lane is used multiple times in PORT: {set([port, existing[lane]])}"
existing[lane] = port
return True, None
Expand Down
7 changes: 0 additions & 7 deletions tests/generic_config_updater/gu_common_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,6 @@ def test_validate_lanes__same_valid_lanes_multi_ports_no_spaces__failure(self):
}}
self.validate_lanes(config, '67')

def test_validate_lanes_default_value_duplicate_check(self):
config = {"PORT": {
"Ethernet0": {"lanes": "0", "speed": "10000"},
"Ethernet1": {"lanes": "0", "speed": "10000"},
}}
self.validate_lanes(config)

def validate_lanes(self, config_db, expected_error=None):
# Arrange
config_wrapper = gu_common.ConfigWrapper()
Expand Down

0 comments on commit dd34d7c

Please sign in to comment.