Skip to content

Commit 6cb2918

Browse files
authored
Changes for VOQ single-dut multi-asic (#17837)
Split the original PR Reg: Changes of VOQ Single Dut Multi asic #17130 into individual PRs for each test. This is an enhancement to support VOQ Single DUT Multi-ASIC setup for T2 topo.
1 parent a0de68a commit 6cb2918

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/lldp/test_lldp_syncd.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def db_instance(duthosts, enum_rand_one_per_hwsku_frontend_hostname):
3838
appl_db = []
3939
for asic in duthost.asics:
4040
appl_db.append(SonicDbCli(asic, APPL_DB))
41+
duthost.facts['switch_type'] == "voq"
42+
is_chassis = duthost.get_facts().get("modular_chassis")
43+
if duthost.facts['switch_type'] == "voq" and not is_chassis:
44+
appl_db.append(SonicDbCli(duthost, APPL_DB))
4145
# Cleanup code here
4246
return appl_db
4347

@@ -83,6 +87,13 @@ def get_lldpctl_output(duthost):
8387
resultDict["lldp"]["interface"].extend(
8488
json.loads(result)["lldp"]["interface"]
8589
)
90+
is_chassis = duthost.get_facts().get("modular_chassis")
91+
if duthost.facts['switch_type'] == "voq" and not is_chassis:
92+
result = duthost.shell(
93+
"docker exec lldp /usr/sbin/lldpctl -f json")["stdout"]
94+
resultDict["lldp"]["interface"].extend([
95+
json.loads(result)["lldp"]["interface"]]
96+
)
8697
else:
8798
result = duthost.shell("docker exec lldp /usr/sbin/lldpctl -f json")["stdout"]
8899
resultDict = json.loads(result)

0 commit comments

Comments
 (0)