From 704018cf117b6667f08b09d6db5fbec105bf6d57 Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Mon, 4 Sep 2017 02:17:18 -0700 Subject: 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 --- test/vpp_papi_provider.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'test/vpp_papi_provider.py') 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, -- cgit 1.2.3-korg