Skip to content

Commit

Permalink
Adding new passed tc for create set remove
Browse files Browse the repository at this point in the history
  • Loading branch information
vikumarks committed Sep 15, 2023
1 parent 3ed52e8 commit 6af4970
Show file tree
Hide file tree
Showing 8 changed files with 961 additions and 0 deletions.
50 changes: 50 additions & 0 deletions tests/api/test_dash_acl_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

from pprint import pprint

import pytest

@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)

48 changes: 48 additions & 0 deletions tests/api/test_direction_lookup_entry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

from pprint import pprint

import pytest

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

def test_direction_lookup_entry_create(self, dpu):
commands = [
{
'name': 'direction_lookup_entry_1',
'op': 'create',
'type': 'SAI_OBJECT_TYPE_DIRECTION_LOOKUP_ENTRY',
'attributes': [],
'key': {'switch_id': '$SWITCH_ID', 'vni': "2000"}
}
]
results = [*dpu.process_commands(commands)]
print('======= SAI commands RETURN values create =======')
pprint(results)



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

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


def test_direction_lookup_entry_remove(self, dpu):

commands = [{'name': 'direction_lookup_entry_1', 'key': {'switch_id': '$SWITCH_ID', 'vni': '2000'}, 'op': 'remove'}]

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

Loading

0 comments on commit 6af4970

Please sign in to comment.