Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 24 additions & 23 deletions dash-pipeline/tests/saithrift/ptf/vnet/test_saithrift_vnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def runTest(self):
send_packet(self, 0, vxlan_pkt)
print("\nVerifying packet...\n", self.pkt_exp.__repr__())
verify_packet(self, self.pkt_exp, 0)
print ("test_sai_thrift_outbound_udp_pkt_test OK")
print ("TestSaiThrift_outbound_udp_pkt OK")
except AssertionError as ae:
self.failure_teardown()
raise ae
Expand Down Expand Up @@ -254,34 +254,35 @@ def failure_teardown(self):
def tearDown(self):

# Delete in reverse order
if self.cleaned_up:
return
status = sai_thrift_remove_outbound_ca_to_pa_entry(self.client, self.ocpe)
assert(status == SAI_STATUS_SUCCESS)
if not self.cleaned_up:
status = sai_thrift_remove_outbound_ca_to_pa_entry(self.client, self.ocpe)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_outbound_routing_entry(self.client, self.ore)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_outbound_routing_entry(self.client, self.ore)
assert(status == SAI_STATUS_SUCCESS)

#status = sai_thrift_remove_dash_acl_rule(self.client, self.out_acl_rule_id)
#assert(status == SAI_STATUS_SUCCESS)
#status = sai_thrift_remove_dash_acl_rule(self.client, self.out_acl_rule_id)
#assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_eni_ether_address_map_entry(self.client, self.eam)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_eni_ether_address_map_entry(self.client, self.eam)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_eni(self.client, self.eni)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_eni(self.client, self.eni)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_vnet(self.client, self.vnet)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_vnet(self.client, self.vnet)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_dash_acl_group(self.client, self.out_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_dash_acl_group(self.client, self.out_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_dash_acl_group(self.client, self.in_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_dash_acl_group(self.client, self.in_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_direction_lookup_entry(self.client, self.dle)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_direction_lookup_entry(self.client, self.dle)
assert(status == SAI_STATUS_SUCCESS)
sai_thrift_remove_vip_entry(self.client, self.vpe)
assert(status == SAI_STATUS_SUCCESS)

sai_thrift_remove_vip_entry(self.client, self.vpe)
assert(status == SAI_STATUS_SUCCESS)
super(self.__class__, self).tearDown()
47 changes: 24 additions & 23 deletions dash-pipeline/tests/saithrift/ptf/vnet/test_saithrift_vnet_v6.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def runTest(self):
send_packet(self, 0, vxlan_pkt)
print("\nVerifying packet...\n", self.pkt_exp.__repr__())
verify_packet(self, self.pkt_exp, 0)
print ("test_sai_thrift_outbound_udp_pkt_test OK")
print ("TestSaiThrift_outbound_udpv6_pkt OK")
except AssertionError as ae:
self.failure_teardown()
raise ae
Expand Down Expand Up @@ -256,34 +256,35 @@ def failure_teardown(self):
def tearDown(self):

# Delete in reverse order
if self.cleaned_up:
return
status = sai_thrift_remove_outbound_ca_to_pa_entry(self.client, self.ocpe)
assert(status == SAI_STATUS_SUCCESS)
if not self.cleaned_up:
status = sai_thrift_remove_outbound_ca_to_pa_entry(self.client, self.ocpe)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_outbound_routing_entry(self.client, self.ore)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_outbound_routing_entry(self.client, self.ore)
assert(status == SAI_STATUS_SUCCESS)

#status = sai_thrift_remove_dash_acl_rule(self.client, self.out_acl_rule_id)
#assert(status == SAI_STATUS_SUCCESS)
#status = sai_thrift_remove_dash_acl_rule(self.client, self.out_acl_rule_id)
#assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_eni_ether_address_map_entry(self.client, self.eam)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_eni_ether_address_map_entry(self.client, self.eam)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_eni(self.client, self.eni)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_eni(self.client, self.eni)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_vnet(self.client, self.vnet)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_vnet(self.client, self.vnet)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_dash_acl_group(self.client, self.out_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_dash_acl_group(self.client, self.out_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_dash_acl_group(self.client, self.in_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_dash_acl_group(self.client, self.in_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_direction_lookup_entry(self.client, self.dle)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_direction_lookup_entry(self.client, self.dle)
assert(status == SAI_STATUS_SUCCESS)
sai_thrift_remove_vip_entry(self.client, self.vpe)
assert(status == SAI_STATUS_SUCCESS)

sai_thrift_remove_vip_entry(self.client, self.vpe)
assert(status == SAI_STATUS_SUCCESS)
super(self.__class__, self).tearDown()