Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action] [PR:16322] Support 2 vlan config in topology for test_acl #16400

Closed
wants to merge 1 commit into from
Closed
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: 9 additions & 2 deletions tests/acl/test_acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,22 @@ def setup(duthosts, ptfhost, rand_selected_dut, rand_unselected_dut, tbinfo, ptf
DOWNSTREAM_DST_IP = DOWNSTREAM_DST_IP_M0_L3
DOWNSTREAM_IP_TO_ALLOW = DOWNSTREAM_IP_TO_ALLOW_M0_L3
DOWNSTREAM_IP_TO_BLOCK = DOWNSTREAM_IP_TO_BLOCK_M0_L3
if topo in ["t0", "mx", "m0_vlan"]:
if topo in ["mx", "m0_vlan"]:
vlan_ports = [mg_facts["minigraph_ptf_indices"][ifname]
for ifname in mg_facts["minigraph_vlans"][vlan_name]["members"]]

config_facts = rand_selected_dut.get_running_config_facts()
vlan_table = config_facts["VLAN"]
if "mac" in vlan_table[vlan_name]:
vlan_mac = vlan_table[vlan_name]["mac"]

elif topo in ["t0"]:
vlan_ports = [mg_facts["minigraph_ptf_indices"][ifname]
for ifname in list(mg_facts["minigraph_vlans"].values())[0]["members"]]
config_facts = rand_selected_dut.get_running_config_facts()
vlan_table = config_facts["VLAN"]
vlan_name = list(vlan_table.keys())[0]
if "mac" in vlan_table[vlan_name]:
vlan_mac = vlan_table[vlan_name]["mac"]
# Get the list of upstream/downstream ports
downstream_ports = defaultdict(list)
upstream_ports = defaultdict(list)
Expand Down
Loading