Skip to content

Commit

Permalink
Update SAI-C client docker (#353)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Kokhan <andriy.kokhan@gmail.com>
  • Loading branch information
andriy-kokhan authored Mar 29, 2023
1 parent e79d8b0 commit 7dd0ba0
Show file tree
Hide file tree
Showing 23 changed files with 10 additions and 150 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Requires <url of sai-challenger branch> <commit sha> or something
# sc-client:230216
FROM sc-client

ADD tests/ /tests/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ def test_vnet_acl_in_create(self, dpu):
print("\n======= SAI commands RETURN values create =======")
pprint(results)

assert all(results), "SAI_OBJECT_TYPE_DASH_ACL_GROUP Create error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_acl_in_get1(self, dpu):

Expand All @@ -41,8 +39,6 @@ def test_vnet_acl_in_get1(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_DASH_ACL_GROUP GET error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_acl_in_set(self, dpu):

Expand All @@ -61,8 +57,6 @@ def test_vnet_acl_in_set(self, dpu):
print("\n======= SAI commands RETURN values set =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_DASH_ACL_GROUP Set error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_acl_in_get2(self, dpu):

Expand All @@ -77,8 +71,6 @@ def test_vnet_acl_in_get2(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_DASH_ACL_GROUP GET error"

def test_vnet_acl_in_remove(self, dpu):

commands = [
Expand All @@ -92,5 +84,3 @@ def test_vnet_acl_in_remove(self, dpu):
results = [*dpu.process_commands(commands)]
print("\n======= SAI commands RETURN values remove =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_DASH_ACL_GROUP Remove error"
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ def test_vnet_acl_out_create(self, dpu):
print("\n======= SAI commands RETURN values create =======")
pprint(results)

assert all(results), "SAI_IP_ADDR_FAMILY_IPV4 Create error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_acl_out_get1(self, dpu):

Expand All @@ -41,8 +39,6 @@ def test_vnet_acl_out_get1(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_IP_ADDR_FAMILY_IPV4 GET error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_acl_out_set(self, dpu):

Expand All @@ -61,8 +57,6 @@ def test_vnet_acl_out_set(self, dpu):
print("\n======= SAI commands RETURN values set =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_IP_ADDR_FAMILY_IPV4 Set error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_acl_out_get2(self, dpu):

Expand All @@ -77,8 +71,6 @@ def test_vnet_acl_out_get2(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_IP_ADDR_FAMILY_IPV4 GET error"

def test_vnet_acl_out_remove(self, dpu):

commands = [
Expand All @@ -92,5 +84,3 @@ def test_vnet_acl_out_remove(self, dpu):
results = [*dpu.process_commands(commands)]
print("\n======= SAI commands RETURN values remove =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_IP_ADDR_FAMILY_IPV4 Remove error"
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ def test_direction_lookup_create(self, dpu):
print("\n======= SAI commands RETURN values create =======")
pprint(results)

assert all(results), "SAI_OBJECT_TYPE_DIRECTION_LOOKUP_ENTRY Create error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_direction_lookup_get1(self, dpu):

Expand All @@ -48,8 +46,6 @@ def test_direction_lookup_get1(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_DIRECTION_LOOKUP_ENTRY Get error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_direction_lookup_set(self, dpu):

Expand All @@ -73,8 +69,6 @@ def test_direction_lookup_set(self, dpu):
print("\n======= SAI commands RETURN values set =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_DIRECTION_LOOKUP_ENTRY Set error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_direction_lookup_get2(self, dpu):

Expand All @@ -89,8 +83,6 @@ def test_direction_lookup_get2(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_DIRECTION_LOOKUP_ENTRY Get error"

def test_direction_lookup_remove(self, dpu):

commands = [
Expand All @@ -104,5 +96,3 @@ def test_direction_lookup_remove(self, dpu):
results = [*dpu.process_commands(commands)]
print("\n======= SAI commands RETURN values remove =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_DIRECTION_LOOKUP_ENTRY Remove error"
14 changes: 0 additions & 14 deletions test/test-cases/functional/saic/sai-api/test_sai_api_vnet_eni.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ def test_vnet_eni_create(self, dpu):
results = [*dpu.process_commands(commands)]
print("\n======= SAI commands RETURN values create =======")
pprint(results)

assert all(results), "SAI_OBJECT_TYPE_VNET Create error"

commands = [
{
Expand Down Expand Up @@ -94,8 +92,6 @@ def test_vnet_eni_create(self, dpu):
print("\n======= SAI commands RETURN values create =======")
pprint(results)

assert all(results), "SAI_OBJECT_TYPE_ENI Create error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_eni_get1(self, dpu):

Expand All @@ -111,8 +107,6 @@ def test_vnet_eni_get1(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "10.10.2.10"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_eni_set(self, dpu):

Expand All @@ -132,8 +126,6 @@ def test_vnet_eni_set(self, dpu):
print("\n======= SAI commands RETURN values set =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_ENI Set error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_eni_get2(self, dpu):

Expand All @@ -150,8 +142,6 @@ def test_vnet_eni_get2(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "20.10.2.10"

def test_vnet_eni_remove(self, dpu):

commands = [
Expand All @@ -165,8 +155,6 @@ def test_vnet_eni_remove(self, dpu):
results = [*dpu.process_commands(commands)]
print("\n======= SAI commands RETURN values remove =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_ENI Remove error"

commands = [
{
Expand All @@ -179,5 +167,3 @@ def test_vnet_eni_remove(self, dpu):
results = [*dpu.process_commands(commands)]
print("\n======= SAI commands RETURN values remove =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_VNET Remove error"
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ def test_vnet_eni_ether_address_create(self, dpu):
print("\n======= SAI commands RETURN values create =======")
pprint(results)

assert all(results), "SAI_OBJECT_TYPE_ENI_ETHER_ADDRESS_MAP_ENTRY Create error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_eni_ether_address_get1(self, dpu):

Expand All @@ -48,8 +46,6 @@ def test_vnet_eni_ether_address_get1(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "eni_id"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_eni_ether_address_set(self, dpu):

Expand All @@ -72,8 +68,6 @@ def test_vnet_eni_ether_address_set(self, dpu):
print("\n======= SAI commands RETURN values set =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_ENI_ETHER_ADDRESS_MAP_ENTRY Set error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_eni_ether_address_get2(self, dpu):

Expand All @@ -88,8 +82,6 @@ def test_vnet_eni_ether_address_get2(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "eni_id"

def test_vnet_eni_ether_address_remove(self, dpu):

commands = [
Expand All @@ -103,5 +95,3 @@ def test_vnet_eni_ether_address_remove(self, dpu):
results = [*dpu.process_commands(commands)]
print("\n======= SAI commands RETURN values remove =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_ENI_ETHER_ADDRESS_MAP_ENTRY Remove error"
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

class TestSaiVnetInboundRoutingEntry:

def test_vnet_inbound_routing_entry_create(self, dpu):
@pytest.mark.dependency()
def test_vnet_inbound_routing_entry_create_setup(self, dpu):

# Create VNET
commands = [
Expand All @@ -29,8 +30,6 @@ def test_vnet_inbound_routing_entry_create(self, dpu):
print("\n======= SAI commands RETURN values create =======")
pprint(results)

assert all(results), "SAI_OBJECT_TYPE_VNET Create error"

# Create ENI
commands = [
{
Expand Down Expand Up @@ -99,8 +98,9 @@ def test_vnet_inbound_routing_entry_create(self, dpu):
print("\n======= SAI commands RETURN values create =======")
pprint(results)

assert all(results), "SAI_OBJECT_TYPE_ENI Create error"

@pytest.mark.skip(reason="https://github.com/sonic-net/DASH/issues/345 [P4Runtime] Invalid match type")
def test_vnet_inbound_routing_entry_create(self, dpu):

commands = [
{
"name": "inbound_routing_entry",
Expand All @@ -126,8 +126,6 @@ def test_vnet_inbound_routing_entry_create(self, dpu):
print("\n======= SAI commands RETURN values create =======")
pprint(results)

assert all(results), "SAI_OBJECT_TYPE_INBOUND_ROUTING_ENTRY Create error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_inbound_routing_entry_get1(self, dpu):

Expand All @@ -143,8 +141,6 @@ def test_vnet_inbound_routing_entry_get1(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_INBOUND_ROUTING_ENTRY Get error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_inbound_routing_entry_set(self, dpu):

Expand All @@ -171,8 +167,6 @@ def test_vnet_inbound_routing_entry_set(self, dpu):
print("\n======= SAI commands RETURN values set =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_INBOUND_ROUTING_ENTRY Set error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_inbound_routing_entry_get2(self, dpu):

Expand All @@ -188,9 +182,7 @@ def test_vnet_inbound_routing_entry_get2(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_INBOUND_ROUTING_ENTRY Get error"

@pytest.mark.skip(reason="https://github.com/sonic-net/DASH/issues/233 [P4Runtime] Invalid match type")
@pytest.mark.skip(reason="https://github.com/sonic-net/DASH/issues/345 [P4Runtime] Invalid match type")
def test_vnet_inbound_routing_entry_remove(self, dpu):

commands = [
Expand All @@ -205,8 +197,7 @@ def test_vnet_inbound_routing_entry_remove(self, dpu):
print("\n======= SAI commands RETURN values remove =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_INBOUND_ROUTING_ENTRY Remove error"

@pytest.mark.dependency(depends=['TestSaiVnetInboundRoutingEntry::test_vnet_inbound_routing_entry_create_setup'])
def test_vnet_inbound_routing_entry_remove_cleanup(self, dpu):

# Remove VNET
Expand All @@ -221,8 +212,6 @@ def test_vnet_inbound_routing_entry_remove_cleanup(self, dpu):
results = [*dpu.process_commands(commands)]
print("\n======= SAI commands RETURN values remove =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_VNET Remove error"

# Remove ENI
commands = [
Expand All @@ -236,7 +225,3 @@ def test_vnet_inbound_routing_entry_remove_cleanup(self, dpu):
results = [*dpu.process_commands(commands)]
print("\n======= SAI commands RETURN values remove =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_ENI Remove error"


Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def test_vnet_inbound_simple_create(self, dpu):
print("\n======= SAI commands RETURN values create =======")
pprint(results)

assert all(results), "SAI_OBJECT_TYPE_VIP_ENTRY Create error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_inbound_simple_get1(self, dpu):

Expand All @@ -48,8 +46,6 @@ def test_vnet_inbound_simple_get1(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_VIP_ENTRY_ACTION_ACCEPT"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_inbound_simple_set(self, dpu):

Expand All @@ -71,8 +67,6 @@ def test_vnet_inbound_simple_set(self, dpu):
print("\n======= SAI commands RETURN values set =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_VIP_ENTRY Set error"

@pytest.mark.skip(reason="get and set not implemented, yet")
def test_vnet_inbound_simple_get2(self, dpu):

Expand All @@ -88,8 +82,6 @@ def test_vnet_inbound_simple_get2(self, dpu):
print("\n======= SAI commands RETURN values get =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_VIP_ENTRY_ACTION_REJECT"

def test_vnet_inbound_simple_remove(self, dpu):

commands = [
Expand All @@ -103,5 +95,3 @@ def test_vnet_inbound_simple_remove(self, dpu):
results = [*dpu.process_commands(commands)]
print("\n======= SAI commands RETURN values remove =======")
pprint(results)

assert all( [result == 0 for result in results]), "SAI_OBJECT_TYPE_VIP_ENTRY Remove error"
Loading

0 comments on commit 7dd0ba0

Please sign in to comment.