Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Fix vs test #23

Merged
merged 1 commit into from
Jul 24, 2018
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
17 changes: 15 additions & 2 deletions platform/vs/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,21 @@ def __init__(self, dvs):
atbl = swsscommon.Table(self.adb, "ASIC_STATE:SAI_OBJECT_TYPE_ACL_TABLE")
keys = atbl.getKeys()

assert len(keys) == 1
self.default_acl_table = keys[0]
assert len(keys) >= 1
# Filter out DTel Acl tables
default_table_found = False
for k in keys:
if default_table_found:
break
(status, fvs) = atbl.get(k)
for item in fvs:
if item[0] == "SAI_ACL_TABLE_ATTR_ACL_BIND_POINT_TYPE_LIST":
if 'SAI_ACL_BIND_POINT_TYPE_PORT' in item[1]:
self.default_acl_table = k
default_table_found = True
break
else:
break

atbl = swsscommon.Table(self.adb, "ASIC_STATE:SAI_OBJECT_TYPE_ACL_ENTRY")
keys = atbl.getKeys()
Expand Down