summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-06-21 06:15:18 -0700
committerOle Trøan <otroan@employees.org>2017-06-21 16:27:41 +0000
commit428dc9110bee7eedf8aac6f12a89181e8e5343f5 (patch)
treea24e6acb6db074054286f18dd11ac96df96c2832 /test/vpp_papi_provider.py
parent793fe2179c2403af330409f7e7d34bb0f7910b99 (diff)
NAT64: custom prefix
Change-Id: If397b49861468eed29b964fa64b186f80eb0eceb Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py32
1 files changed, 27 insertions, 5 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 5f27e8549a8..4f7e9feeec6 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -1424,11 +1424,11 @@ class VppPapiProvider(object):
tcp_incoming_syn=6):
"""Set values of timeouts for NAT64 (in seconds)
- :param udp - UDP timeout (Default value = 300)
- :param icmp - ICMP timeout (Default value = 60)
- :param tcp_trans - TCP transitory timeout (Default value = 240)
- :param tcp_est - TCP established timeout (Default value = 7440)
- :param tcp_incoming_syn - TCP incoming SYN timeout (Default value = 6)
+ :param udpi: UDP timeout (Default value = 300)
+ :param icmp: ICMP timeout (Default value = 60)
+ :param tcp_trans: TCP transitory timeout (Default value = 240)
+ :param tcp_est: TCP established timeout (Default value = 7440)
+ :param tcp_incoming_syn: TCP incoming SYN timeout (Default value = 6)
"""
return self.api(
self.papi.nat64_set_timeouts,
@@ -1453,6 +1453,28 @@ class VppPapiProvider(object):
"""
return self.api(self.papi.nat64_st_dump, {'proto': protocol})
+ def nat64_add_del_prefix(self, prefix, plen, vrf_id=0, is_add=1):
+ """Add/del NAT64 prefix
+
+ :param prefix: NAT64 prefix
+ :param plen: NAT64 prefix length
+ :param vrf_id: VRF id of tenant (Default 0)
+ :param is_add: 1 if add, 0 if delete (Default value = 1)
+ """
+ return self.api(
+ self.papi.nat64_add_del_prefix,
+ {'prefix': prefix,
+ 'prefix_len': plen,
+ 'vrf_id': vrf_id,
+ 'is_add': is_add})
+
+ def nat64_prefix_dump(self):
+ """Dump NAT64 prefix
+
+ :returns: Dictionary of NAT64 prefixes
+ """
+ return self.api(self.papi.nat64_prefix_dump, {})
+
def control_ping(self):
self.api(self.papi.control_ping)