aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-01-24 04:52:25 -0800
committerNeale Ranns <nranns@cisco.com>2019-01-25 19:54:49 +0000
commit311124e21b9b8ca11073d82408ffb81d98790969 (patch)
tree22b615488ec5bf0c9aac73a6716bcdeeccd5d80b /test/vpp_papi_provider.py
parent9e47ac54c9fbc6eb7caf0998df50a3114b64ee11 (diff)
IPSEC: tests use opbject registry
this means we test the dumps - to some extent Change-Id: I8d90745701012012b41a7b3aaf9be97b4dd2bdf8 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index e5902c23a3e..d35fae9f2df 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -3347,6 +3347,9 @@ class VppPapiProvider(object):
self.papi.ipsec_spd_add_del, {
'spd_id': spd_id, 'is_add': is_add})
+ def ipsec_spds_dump(self):
+ return self.api(self.papi.ipsec_spds_dump, {})
+
def ipsec_interface_add_del_spd(self, spd_id, sw_if_index, is_add=1):
""" IPSEC interface SPD add/del - \
Wrapper to associate/disassociate SPD to interface in VPP
@@ -3363,6 +3366,11 @@ class VppPapiProvider(object):
self.papi.ipsec_interface_add_del_spd,
{'spd_id': spd_id, 'sw_if_index': sw_if_index, 'is_add': is_add})
+ def ipsec_spd_interface_dump(self, spd_index=None):
+ return self.api(self.papi.ipsec_spd_interface_dump,
+ {'spd_index': spd_index if spd_index else 0,
+ 'spd_index_valid': 1 if spd_index else 0})
+
def ipsec_sad_add_del_entry(self,
sad_id,
spi,
@@ -3415,6 +3423,10 @@ class VppPapiProvider(object):
'use_extended_sequence_number': use_extended_sequence_number,
'use_anti_replay': use_anti_replay})
+ def ipsec_sa_dump(self, sa_id=None):
+ return self.api(self.papi.ipsec_sa_dump,
+ {'sa_id': sa_id if sa_id else 0xffffffff})
+
def ipsec_spd_add_del_entry(self,
spd_id,
sa_id,
@@ -3473,6 +3485,11 @@ class VppPapiProvider(object):
'is_ipv6': is_ipv6,
'is_ip_any': is_ip_any})
+ def ipsec_spd_dump(self, spd_id, sa_id=0xffffffff):
+ return self.api(self.papi.ipsec_spd_dump,
+ {'spd_id': spd_id,
+ 'sa_id': sa_id})
+
def ipsec_tunnel_if_add_del(self, local_ip, remote_ip, local_spi,
remote_spi, crypto_alg, local_crypto_key,
remote_crypto_key, integ_alg, local_integ_key,