summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-09-04 02:17:18 -0700
committerOle Trøan <otroan@employees.org>2017-09-06 08:49:25 +0000
commit704018cf117b6667f08b09d6db5fbec105bf6d57 (patch)
tree27a52337f4b5f35092a422290998f7c37b4071f7 /test/vpp_papi_provider.py
parent030ab4815f777d6a0fdbfbc457e0f55fc32df8d3 (diff)
NAT: Destination NAT44 with load-balancing (VPP-954)
added load-balancing static mappings with unequal load support Change-Id: Ie505e41f24d46f812b94dd28bdafe3dc170a6060 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 61db4d6b14b..03238b9db46 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -1238,6 +1238,36 @@ class VppPapiProvider(object):
"""
return self.api(self.papi.nat44_user_dump, {})
+ def nat44_add_del_lb_static_mapping(
+ self,
+ external_addr,
+ external_port,
+ protocol,
+ vrf_id=0,
+ local_num=0,
+ locals=None,
+ is_add=1):
+ """Add/delete NAT44 load balancing static mapping
+
+ :param is_add - 1 if add, 0 if delete
+ """
+ return self.api(
+ self.papi.nat44_add_del_lb_static_mapping,
+ {'is_add': is_add,
+ 'external_addr': external_addr,
+ 'external_port': external_port,
+ 'protocol': protocol,
+ 'vrf_id': vrf_id,
+ 'local_num': local_num,
+ 'locals': locals})
+
+ def nat44_lb_static_mapping_dump(self):
+ """Dump NAT44 load balancing static mappings
+
+ :return: Dictionary of NAT44 load balancing static mapping
+ """
+ return self.api(self.papi.nat44_lb_static_mapping_dump, {})
+
def nat_det_add_del_map(
self,
in_addr,