summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authormagalik <magalik@cisco.com>2017-02-08 23:25:45 -0800
committerOle Trøan <otroan@employees.org>2017-03-02 18:20:38 +0000
commit23caa885afad3501ea95b52cdbc64c0d48072a83 (patch)
treebf0e0b74c7166ff53fdbbb64193b11cd228e0855 /test/vpp_papi_provider.py
parentbaf2e90a91fa862c15572491c730d01cd6d19f5d (diff)
SNAT: user's dump and session dump of a certain snat user.
Change-Id: If75a35dbdcb43c1ce0128b8649f2ca3970d3fff5 Signed-off-by: Martin <magalik@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index ea574b36493..de189c3eeaf 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -1072,6 +1072,29 @@ class VppPapiProvider(object):
'src_port': src_port,
'enable': enable})
+ def snat_user_session_dump(
+ self,
+ ip_address,
+ vrf_id):
+ """Dump S-NAT user's sessions
+
+ :param ip_address: ip adress of the user to be dumped
+ :param cpu_index: cpu_index on which the user is
+ :param vrf_id: VRF ID
+ :return: Dictionary of S-NAT sessions
+ """
+ return self.api(
+ self.papi.snat_user_session_dump,
+ {'ip_address': ip_address,
+ 'vrf_id': vrf_id})
+
+ def snat_user_dump(self):
+ """Dump S-NAT users
+
+ :return: Dictionary of S-NAT users
+ """
+ return self.api(self.papi.snat_user_dump, {})
+
def control_ping(self):
self.api(self.papi.control_ping)