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: 7 additions & 4 deletions tests/acl/test_acl_outer_vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,16 @@ def get_acl_counter(duthost, table_name, rule_name, timeout=ACL_COUNTERS_UPDATE_
Returns:
Acl counter value for packets
"""
cmd = "redis-cli -n 2 hget 'COUNTERS:{}:{}' Packets"
# Wait for orchagent to update the ACL counters
time.sleep(timeout)
result = duthost.shell(cmd.format(table_name, rule_name))['stdout']
if result == "":
result = duthost.show_and_parse('aclshow -a')

if len(result) == 0:
pytest.fail("Failed to retrieve acl counter for {}|{}".format(table_name, rule_name))
return int(result)
for rule in result:
if table_name == rule['table name'] and rule_name == rule['rule name']:
return int(rule['packets count'])
pytest.fail("Failed to retrieve acl counter for {}|{}".format(table_name, rule_name))


def craft_packet(src_mac, dst_mac, dst_ip, ip_version, stage, tagged_mode, vlan_id=10, outer_vlan_id=0, pkt_type=None):
Expand Down