summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-11-06 05:04:53 -0800
committerOle Trøan <otroan@employees.org>2017-11-07 11:52:39 +0000
commit8ebe62536223e5a8d827b2b870cbd57aa34fd7ef (patch)
treef4ab30aa41a7a26bb6068e7f0f441930cc7774bb /test/vpp_papi_provider.py
parent5917939256af392914d8a648de0c3287042ddbf6 (diff)
NAT: DS-Lite (VPP-1040)
Dual-Stack Lite enables a broadband service provider to share IPv4 addresses among customers by combining two well-known technologies: IPv4-in-IPv6 and NAT. Change-Id: I039740f8548c623cd1ac89b8ecda1a6cc4aafb9c Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index d84012b2d2b..468cf83d57b 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -1647,6 +1647,34 @@ class VppPapiProvider(object):
"""
return self.api(self.papi.nat64_prefix_dump, {})
+ def dslite_set_aftr_addr(self, ip6, ip4):
+ """Set DS-Lite AFTR addresses
+
+ :param ip4: IPv4 address
+ :param ip6: IPv6 address
+ """
+ return self.api(
+ self.papi.dslite_set_aftr_addr,
+ {'ip4_addr': ip4,
+ 'ip6_addr': ip6})
+
+ def dslite_add_del_pool_addr_range(
+ self,
+ start_addr,
+ end_addr,
+ is_add=1):
+ """Add/del address range to DS-Lite pool
+
+ :param start_addr: First IP address
+ :param end_addr: Last IP address
+ :param is_add: 1 if add, 0 if delete (Default value = 1)
+ """
+ return self.api(
+ self.papi.dslite_add_del_pool_addr_range,
+ {'start_addr': start_addr,
+ 'end_addr': end_addr,
+ 'is_add': is_add})
+
def control_ping(self):
self.api(self.papi.control_ping)