-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
40e09a6
commit babf7d4
Showing
23 changed files
with
685 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiArs: | ||
# object with no attributes | ||
|
||
def test_ars_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'ars_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_ARS', | ||
'attributes': [], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_ars_remove(self, npu): | ||
commands = [{'name': 'ars_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiArsProfile: | ||
# object with no attributes | ||
|
||
def test_ars_profile_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'ars_profile_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_ARS_PROFILE', | ||
'attributes': [], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_ars_profile_remove(self, npu): | ||
commands = [{'name': 'ars_profile_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiBridge: | ||
# object with no parents | ||
|
||
def test_bridge_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'bridge_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_BRIDGE', | ||
'attributes': ['SAI_BRIDGE_ATTR_TYPE', 'SAI_BRIDGE_TYPE_1Q'], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_bridge_remove(self, npu): | ||
commands = [{'name': 'bridge_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiCounter: | ||
# object with no attributes | ||
|
||
def test_counter_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'counter_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_COUNTER', | ||
'attributes': [], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_counter_remove(self, npu): | ||
commands = [{'name': 'counter_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiDashAclGroup: | ||
# object with no attributes | ||
|
||
def test_dash_acl_group_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'dash_acl_group_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_DASH_ACL_GROUP', | ||
'attributes': [], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_dash_acl_group_remove(self, npu): | ||
commands = [{'name': 'dash_acl_group_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiDtel: | ||
# object with no attributes | ||
|
||
def test_dtel_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'dtel_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_DTEL', | ||
'attributes': [], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_dtel_remove(self, npu): | ||
commands = [{'name': 'dtel_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiDtelEvent: | ||
# object with no parents | ||
|
||
def test_dtel_event_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'dtel_event_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_DTEL_EVENT', | ||
'attributes': [ | ||
'SAI_DTEL_EVENT_ATTR_TYPE', | ||
'SAI_DTEL_EVENT_TYPE_FLOW_STATE', | ||
], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_dtel_event_remove(self, npu): | ||
commands = [{'name': 'dtel_event_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiDtelIntSession: | ||
# object with no attributes | ||
|
||
def test_dtel_int_session_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'dtel_int_session_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_DTEL_INT_SESSION', | ||
'attributes': [], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_dtel_int_session_remove(self, npu): | ||
commands = [{'name': 'dtel_int_session_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiDtelReportSession: | ||
# object with no attributes | ||
|
||
def test_dtel_report_session_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'dtel_report_session_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_DTEL_REPORT_SESSION', | ||
'attributes': [], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_dtel_report_session_remove(self, npu): | ||
commands = [{'name': 'dtel_report_session_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiEni: | ||
# object with no attributes | ||
|
||
def test_eni_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'eni_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_ENI', | ||
'attributes': [], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_eni_remove(self, npu): | ||
commands = [{'name': 'eni_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiGenericProgrammable: | ||
# object with no parents | ||
|
||
def test_generic_programmable_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'generic_programmable_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_GENERIC_PROGRAMMABLE', | ||
'attributes': ['SAI_GENERIC_PROGRAMMABLE_ATTR_OBJECT_NAME', '2:10,11'], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_generic_programmable_remove(self, npu): | ||
commands = [{'name': 'generic_programmable_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiHash: | ||
# object with no attributes | ||
|
||
def test_hash_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'hash_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_HASH', | ||
'attributes': [], | ||
} | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_hash_remove(self, npu): | ||
commands = [{'name': 'hash_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
from pprint import pprint | ||
|
||
|
||
class TestSaiIsolationGroupMember: | ||
# object with parent SAI_OBJECT_TYPE_ISOLATION_GROUP SAI_OBJECT_TYPE_PORT SAI_OBJECT_TYPE_BRIDGE_PORT | ||
|
||
def test_isolation_group_member_create(self, npu): | ||
commands = [ | ||
{ | ||
'name': 'isolation_group_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_ISOLATION_GROUP', | ||
'attributes': [ | ||
'SAI_ISOLATION_GROUP_ATTR_TYPE', | ||
'SAI_ISOLATION_GROUP_TYPE_PORT', | ||
], | ||
}, | ||
{ | ||
'name': 'port_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_PORT', | ||
'attributes': [ | ||
'SAI_PORT_ATTR_HW_LANE_LIST', | ||
'2:10,11', | ||
'SAI_PORT_ATTR_SPEED', | ||
'10', | ||
], | ||
}, | ||
{ | ||
'name': 'isolation_group_member_1', | ||
'op': 'create', | ||
'type': 'SAI_OBJECT_TYPE_ISOLATION_GROUP_MEMBER', | ||
'attributes': [ | ||
'SAI_ISOLATION_GROUP_MEMBER_ATTR_ISOLATION_GROUP_ID', | ||
'$isolation_group_1', | ||
'SAI_ISOLATION_GROUP_MEMBER_ATTR_ISOLATION_OBJECT', | ||
'$port_1', | ||
], | ||
}, | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values create =======') | ||
pprint(results) | ||
|
||
def test_isolation_group_member_remove(self, npu): | ||
commands = [ | ||
{'name': 'isolation_group_member_1', 'op': 'remove'}, | ||
{'name': 'isolation_group_1', 'op': 'remove'}, | ||
] | ||
|
||
results = [*npu.process_commands(commands)] | ||
print('======= SAI commands RETURN values remove =======') | ||
pprint(results) |
Oops, something went wrong.