Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/lldp/test_lldp_syncd.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def db_instance(duthosts, enum_rand_one_per_hwsku_frontend_hostname):
appl_db = []
for asic in duthost.asics:
appl_db.append(SonicDbCli(asic, APPL_DB))
duthost.facts['switch_type'] == "voq"
is_chassis = duthost.get_facts().get("modular_chassis")
if duthost.facts['switch_type'] == "voq" and not is_chassis:
appl_db.append(SonicDbCli(duthost, APPL_DB))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this change needed? Since the disagg chassis is also multi-asic, is the current code not sufficient?

# Cleanup code here
return appl_db

Expand Down Expand Up @@ -83,6 +87,13 @@ def get_lldpctl_output(duthost):
resultDict["lldp"]["interface"].extend(
json.loads(result)["lldp"]["interface"]
)
is_chassis = duthost.get_facts().get("modular_chassis")
if duthost.facts['switch_type'] == "voq" and not is_chassis:
result = duthost.shell(
"docker exec lldp /usr/sbin/lldpctl -f json")["stdout"]
resultDict["lldp"]["interface"].extend([
json.loads(result)["lldp"]["interface"]]
)
else:
result = duthost.shell("docker exec lldp /usr/sbin/lldpctl -f json")["stdout"]
resultDict = json.loads(result)
Expand Down
Loading