Skip to content

Commit

Permalink
Added support for one portChannel and one routed interface if two por…
Browse files Browse the repository at this point in the history
…tChannels or two roured interface don't exist on the dut
  • Loading branch information
mannytaheri committed Mar 15, 2022
1 parent ae430c7 commit 7f2dcbc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/crm/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ def crm_interface(duthosts, enum_rand_one_per_hwsku_frontend_hostname, tbinfo, e
elif len(mg_facts["minigraph_portchannel_interfaces"]) >= 4:
crm_intf1 = mg_facts["minigraph_portchannel_interfaces"][0]["attachto"]
crm_intf2 = mg_facts["minigraph_portchannel_interfaces"][2]["attachto"]
else:
elif len(mg_facts["minigraph_interfaces"]) > 2:
crm_intf1 = mg_facts["minigraph_interfaces"][0]["attachto"]
crm_intf2 = mg_facts["minigraph_interfaces"][2]["attachto"]
else:
# Assuming that we have atleast one portchannel and one interface - like in min T2 topology
crm_intf1 = mg_facts["minigraph_portchannel_interfaces"][0]["attachto"]
crm_intf2 = mg_facts["minigraph_interfaces"][0]["attachto"]
yield (crm_intf1, crm_intf2)


Expand Down

0 comments on commit 7f2dcbc

Please sign in to comment.