X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fvpp_papi_provider.py;h=b791444fdcdcb91284b0bd9a25aa31d1c960fd72;hb=87233b51bc4d088ff566cef09a7c96f1f0dac078;hp=16bc44b64b97328aacd919265ee32a314d8cb16d;hpb=cba6936c45bc3265ae695e8266bdefc65e7a5116;p=vpp.git diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 16bc44b64b9..b791444fdcd 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -759,7 +759,7 @@ class VppPapiProvider(object): is_local=0, is_classify=0, is_multipath=0, - is_l2_bridged=0, + is_dvr=0, is_udp_encap=0, is_source_lookup=0): """ @@ -780,7 +780,7 @@ class VppPapiProvider(object): :param is_multipath: (Default value = 0) :param is_resolve_host: (Default value = 0) :param is_resolve_attached: (Default value = 0) - :param is_l2_bridged: (Default value = 0) + :param is_dvr: (Default value = 0) :param is_source_lookup: (Default value = 0) :param next_hop_weight: (Default value = 1) @@ -802,7 +802,7 @@ class VppPapiProvider(object): 'is_multipath': is_multipath, 'is_resolve_host': is_resolve_host, 'is_resolve_attached': is_resolve_attached, - 'is_l2_bridged': is_l2_bridged, + 'is_dvr': is_dvr, 'is_source_lookup': is_source_lookup, 'is_udp_encap': is_udp_encap, 'next_hop_weight': next_hop_weight, @@ -1235,6 +1235,8 @@ class VppPapiProvider(object): vrf_id=0, protocol=0, twice_nat=0, + out2in_only=0, + tag="", is_add=1): """Add/delete NAT44 static mapping @@ -1247,6 +1249,8 @@ class VppPapiProvider(object): :param vrf_id: VRF ID :param protocol: IP protocol (Default value = 0) :param twice_nat: 1 if translate external host address and port + :param out2in_only: if 1 rule is matching only out2in direction + :param tag: Opaque string tag :param is_add: 1 if add, 0 if delete (Default value = 1) """ return self.api( @@ -1260,7 +1264,9 @@ class VppPapiProvider(object): 'external_sw_if_index': external_sw_if_index, 'vrf_id': vrf_id, 'protocol': protocol, - 'twice_nat': twice_nat}) + 'twice_nat': twice_nat, + 'out2in_only': out2in_only, + 'tag': tag}) def nat44_add_del_identity_mapping( self, @@ -1270,6 +1276,7 @@ class VppPapiProvider(object): addr_only=1, vrf_id=0, protocol=0, + tag='', is_add=1): """Add/delete NAT44 identity mapping @@ -1279,6 +1286,7 @@ class VppPapiProvider(object): :param addr_only: 1 if address only mapping, 0 if address and port :param vrf_id: VRF ID :param protocol: IP protocol (Default value = 0) + :param tag: Opaque string tag :param is_add: 1 if add, 0 if delete (Default value = 1) """ return self.api( @@ -1289,6 +1297,7 @@ class VppPapiProvider(object): 'port': port, 'sw_if_index': sw_if_index, 'vrf_id': vrf_id, + 'tag': tag, 'protocol': protocol}) def nat44_add_del_address_range( @@ -1420,12 +1429,15 @@ class VppPapiProvider(object): protocol, vrf_id=0, twice_nat=0, + out2in_only=0, + tag='', local_num=0, locals=[], is_add=1): """Add/delete NAT44 load balancing static mapping :param twice_nat: 1 if translate external host address and port + :param tag: Opaque string tag :param is_add - 1 if add, 0 if delete """ return self.api( @@ -1436,6 +1448,8 @@ class VppPapiProvider(object): 'protocol': protocol, 'vrf_id': vrf_id, 'twice_nat': twice_nat, + 'out2in_only': out2in_only, + 'tag': tag, 'local_num': local_num, 'locals': locals}) @@ -1818,6 +1832,17 @@ class VppPapiProvider(object): {'ip4_addr': ip4, 'ip6_addr': ip6}) + def dslite_set_b4_addr(self, ip6, ip4): + """Set DS-Lite B4 IPv6 address + + :param ip4: IPv4 address + :param ip6: IPv6 address + """ + return self.api( + self.papi.dslite_set_b4_addr, + {'ip4_addr': ip4, + 'ip6_addr': ip6}) + def dslite_add_del_pool_addr_range( self, start_addr, @@ -2116,6 +2141,7 @@ class VppPapiProvider(object): hostname, client_id='', is_add=1, + set_broadcast_flag=1, want_dhcp_events=0): return self.api( self.papi.dhcp_client_config, @@ -2125,6 +2151,7 @@ class VppPapiProvider(object): 'client_id': client_id, 'is_add': is_add, 'want_dhcp_event': want_dhcp_events, + 'set_broadcast_flag': set_broadcast_flag, 'pid': os.getpid(), })