-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding passed cases for get set (#16)
- Loading branch information
1 parent
40e09a6
commit 0a9be86
Showing
6 changed files
with
1,233 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
|
||
from pprint import pprint | ||
|
||
import pytest | ||
|
||
|
||
class TestSaiAclCounter: | ||
# object with parent SAI_OBJECT_TYPE_ACL_TABLE | ||
|
||
def test_acl_counter_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'acl_table_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_ACL_TABLE', | ||
'attributes': ['SAI_ACL_TABLE_ATTR_ACL_STAGE', 'SAI_ACL_STAGE_INGRESS'], | ||
}, | ||
{ | ||
'name': 'acl_counter_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_ACL_COUNTER', | ||
'attributes': ['SAI_ACL_COUNTER_ATTR_TABLE_ID', '$acl_table_1'], | ||
}, | ||
] | ||
|
||
commands = [{'name': 'acl_table_1', 'op': 'create', 'type': 'SAI_OBJECT_TYPE_ACL_TABLE', 'attributes': ['SAI_ACL_TABLE_ATTR_ACL_STAGE', 'SAI_ACL_STAGE_INGRESS']}, {'name': 'acl_counter_1', 'op': 'create', 'type': 'SAI_OBJECT_TYPE_ACL_COUNTER', 'attributes': ['SAI_ACL_COUNTER_ATTR_TABLE_ID', '$acl_table_1']}] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_acl_counter_remove(self, npu): | ||
|
||
@pytest.mark.dependency(name="test_sai_acl_counter_attr_label_set") | ||
def test_sai_acl_counter_attr_label_set(self, npu): | ||
|
||
commands = [ | ||
{ | ||
'name': 'acl_counter_1', | ||
'op': 'remove', | ||
}, | ||
{ | ||
'name': 'acl_table_1', | ||
'op': 'remove', | ||
}, | ||
"name": "acl_counter_1", | ||
"op": "set", | ||
"attributes": ["SAI_ACL_COUNTER_ATTR_LABEL", '""'] | ||
} | ||
] | ||
results = [*npu.process_commands(commands)] | ||
print("======= SAI commands RETURN values get =======") | ||
pprint(results) | ||
|
||
|
||
def test_acl_counter_remove(self, npu): | ||
|
||
commands = [{'name': 'acl_counter_1', 'op': 'remove'}, {'name': 'acl_table_1', 'op': 'remove'}] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values remove =======') | ||
pprint(results) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.