Skip to content

Commit

Permalink
Adding new DASH TCs for create, set and remove API (opencomputeprojec…
Browse files Browse the repository at this point in the history
…t#195)

Signed-off-by: Vinod Kumar <[email protected]>
Signed-off-by: selldinesh <[email protected]>
  • Loading branch information
vikumarks authored and selldinesh committed Oct 5, 2023
1 parent 1acacf5 commit 75992a1
Show file tree
Hide file tree
Showing 2 changed files with 545 additions and 0 deletions.
56 changes: 56 additions & 0 deletions tests/api/test_dash_acl_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

from pprint import pprint

import pytest

@pytest.fixture(scope="module", autouse=True)
def skip_all(testbed_instance):
testbed = testbed_instance
if testbed is not None and len(testbed.dpu) != 1:
pytest.skip("invalid for \"{}\" testbed".format(testbed.name))

@pytest.mark.dpu
class TestSaiDashAclGroup:
# object with no attributes

def test_dash_acl_group_create(self, dpu):
#Attribs are not marked mandatory but if we dont gives it throws an error
commands = [
{
'name': 'dash_acl_group_1',
'op': 'create',
'type': 'SAI_OBJECT_TYPE_DASH_ACL_GROUP',
'attributes': ["SAI_DASH_ACL_GROUP_ATTR_IP_ADDR_FAMILY","SAI_IP_ADDR_FAMILY_IPV4"]
}
]

results = [*dpu.process_commands(commands)]
print('======= SAI commands RETURN values create =======')
pprint(results)



@pytest.mark.dependency(name="test_sai_dash_acl_group_attr_ip_addr_family_set")
def test_sai_dash_acl_group_attr_ip_addr_family_set(self, dpu):

commands = [
{
"name": "dash_acl_group_1",
"op": "set",
"attributes": ["SAI_DASH_ACL_GROUP_ATTR_IP_ADDR_FAMILY", 'SAI_IP_ADDR_FAMILY_IPV4']
}
]
results = [*dpu.process_commands(commands)]
print("======= SAI commands RETURN values get =======")
pprint(results)



def test_dash_acl_group_remove(self, dpu):

commands = [{'name': 'dash_acl_group_1', 'op': 'remove'}]

results = [*dpu.process_commands(commands)]
print('======= SAI commands RETURN values remove =======')
pprint(results)

Loading

0 comments on commit 75992a1

Please sign in to comment.