tests: move defaults from defaultmapping to .api files
[vpp.git] / test / vpp_papi_provider.py
index 8cb7c97..94de500 100644 (file)
@@ -20,12 +20,8 @@ from vpp_ip_route import MPLS_IETF_MAX_LABEL, MPLS_LABEL_INVALID
 # named parameters
 #
 defaultmapping = {
-    'map_add_domain': {'mtu': 1280},
-    'syslog_set_sender': {'collector_port': 514,
-                          'max_msg_size': 480},
+
     'acl_interface_add_del': {'is_add': 1, 'is_input': 1},
-    'acl_interface_list_dump': {'sw_if_index': 4294967295, },
-    'app_namespace_add_del': {'sw_if_index': 4294967295, },
     'bd_ip_mac_add_del': {'is_add': 1, },
     'bfd_udp_add': {'is_authenticated': False, 'bfd_key_id': None,
                     'conf_key_id': None},
@@ -37,21 +33,12 @@ defaultmapping = {
     'bier_imp_add': {'is_add': 1, },
     'bier_route_add_del': {'is_add': 1, },
     'bier_table_add_del': {'is_add': 1, },
-    'bond_create': {'mac_address': '', 'id': 0xFFFFFFFF},
     'bridge_domain_add_del': {'flood': 1, 'uu_flood': 1, 'forward': 1,
                               'learn': 1, 'is_add': 1, },
-    'bvi_create': {'user_instance': 4294967295, },
     'bvi_delete': {},
-    'classify_add_del_table': {'match_n_vectors': 1, 'table_index': 4294967295,
-                               'nbuckets': 2, 'memory_size': 2097152,
-                               'next_table_index': 4294967295,
-                               'miss_next_index': 4294967295, },
     'gbp_subnet_add_del': {'sw_if_index': 4294967295, 'epg_id': 65535, },
     'geneve_add_del_tunnel': {'mcast_sw_if_index': 4294967295, 'is_add': 1,
                               'decap_next_index': 4294967295, },
-    'gre_tunnel_add_del': {'instance': 4294967295, 'is_add': 1, },
-    'gtpu_add_del_tunnel': {'is_add': 1, 'mcast_sw_if_index': 4294967295,
-                            'decap_next_index': 4294967295, },
     'input_acl_set_interface': {'ip4_table_index': 4294967295,
                                 'ip6_table_index': 4294967295,
                                 'l2_table_index': 4294967295, },
@@ -65,8 +52,6 @@ defaultmapping = {
     'ip_punt_police': {'is_add': 1, },
     'ip_punt_redirect': {'is_add': 1, },
     'ip_route_add_del': {'is_add': 1, },
-    'ip_table_add_del': {'is_add': 1, },
-    'ip_unnumbered_dump': {'sw_if_index': 4294967295, },
     'ipsec_interface_add_del_spd': {'is_add': 1, },
     'ipsec_sad_entry_add_del': {'is_add': 1, },
     'ipsec_spd_add_del': {'is_add': 1, },
@@ -78,15 +63,11 @@ defaultmapping = {
     'ipsec_tunnel_if_add_del': {'is_add': 1, 'anti_replay': 1, },
     'l2_emulation': {'enable': 1, },
     'l2fib_add_del': {'is_add': 1, },
-    'lb_conf': {'sticky_buckets_per_core': 4294967295,
-                'flow_timeout': 4294967295},
     'lisp_add_del_adjacency': {'is_add': 1, },
     'lisp_add_del_local_eid': {'is_add': 1, },
     'lisp_add_del_locator': {'priority': 1, 'weight': 1, 'is_add': 1, },
     'lisp_add_del_locator_set': {'is_add': 1, },
     'lisp_add_del_remote_mapping': {'is_add': 1, },
-    'macip_acl_add_replace': {'acl_index': 4294967295, },
-    'macip_acl_dump': {'acl_index': 4294967295, },
     'macip_acl_interface_add_del': {'is_add': 1, },
     'mpls_ip_bind_unbind': {'is_ip4': 1, 'is_bind': 1, },
     'mpls_route_add_del': {'mr_next_hop_sw_if_index': 4294967295,
@@ -99,24 +80,21 @@ defaultmapping = {
                             'next_hop_weight': 1,
                             'next_hop_via_label': 1048576,
                             'is_add': 1, },
-    'mpls_tunnel_dump': {'sw_if_index': 4294967295, },
     'output_acl_set_interface': {'ip4_table_index': 4294967295,
                                  'ip6_table_index': 4294967295,
                                  'l2_table_index': 4294967295, },
     'pppoe_add_del_session': {'is_add': 1, },
-    'policer_add_del': {'is_add': 1, 'conform_action_type': 1, },
+    'policer_add_del': {'is_add': 1, 'conform_action': {'type': 1}, },
     'proxy_arp_add_del': {'is_add': 1, },
     'proxy_arp_intfc_enable_disable': {'is_enable': 1, },
     'set_ip_flow_hash': {'src': 1, 'dst': 1, 'sport': 1, 'dport': 1,
                          'proto': 1, },
     'set_ipfix_exporter': {'collector_port': 4739, },
-    'sr_localsid_add_del': {'sw_if_index': 4294967295, },
     'sr_policy_add': {'weight': 1, 'is_encap': 1, },
     'svs_enable_disable': {'is_enable': 1, },
     'svs_route_add_del': {'is_add': 1, },
     'svs_table_add_del': {'is_add': 1, },
     'sw_interface_add_del_address': {'is_add': 1, },
-    'sw_interface_dump': {'sw_if_index': 4294967295, },
     'sw_interface_ip6nd_ra_prefix': {'val_lifetime': 4294967295,
                                      'pref_lifetime': 4294967295, },
     'sw_interface_set_ip_directed_broadcast': {'enable': 1, },
@@ -128,16 +106,12 @@ defaultmapping = {
     'vxlan_add_del_tunnel': {'mcast_sw_if_index': 4294967295, 'is_add': 1,
                              'decap_next_index': 4294967295,
                              'instance': 4294967295, },
-    'vxlan_gbp_tunnel_dump': {'sw_if_index': 4294967295, },
     'vxlan_gpe_add_del_tunnel': {'mcast_sw_if_index': 4294967295, 'is_add': 1,
                                  'protocol': 3, },
     'want_bfd_events': {'enable_disable': 1, },
     'want_igmp_events': {'enable': 1, },
     'want_interface_events': {'enable_disable': 1, },
-    'want_ip4_arp_events': {'enable_disable': 1, 'ip': '0.0.0.0', },
-    'want_ip6_nd_events': {'enable_disable': 1, 'ip': '::', },
-    'want_ip6_ra_events': {'enable_disable': 1, },
-    'want_l2_macs_events': {'enable_disable': 1, },
+    'want_l2_macs_events': {'enable_disable': 1, 'pid': os.getpid(), },
 }
 
 
@@ -334,17 +308,28 @@ class VppPapiProvider(object):
         self.hook.after_api(api_fn.__name__, api_args)
         return reply
 
-    def cli(self, cli):
+    def cli_return_response(self, cli):
         """ Execute a CLI, calling the before/after hooks appropriately.
+        Return the reply without examining it
 
         :param cli: CLI to execute
-        :returns: CLI output
+        :returns: response object
 
         """
         self.hook.before_cli(cli)
         cli += '\n'
         r = self.papi.cli_inband(cmd=cli)
         self.hook.after_cli(cli)
+        return r
+
+    def cli(self, cli):
+        """ Execute a CLI, calling the before/after hooks appropriately.
+
+        :param cli: CLI to execute
+        :returns: CLI output
+
+        """
+        r = self.cli_return_response(cli)
         if r.retval == -156:
             raise CliSyntaxError(r.reply)
         if r.retval != 0:
@@ -358,25 +343,7 @@ class VppPapiProvider(object):
         :param cli: CLI to execute
         :returns: CLI output
         """
-        return cli + "\n" + self.cli(cli).encode('ascii',
-                                                 errors='backslashreplace')
-
-    def want_ip4_arp_events(self, enable_disable=1, ip="0.0.0.0"):
-        return self.api(self.papi.want_ip4_arp_events,
-                        {'enable_disable': enable_disable,
-                         'ip': ip,
-                         'pid': os.getpid(), })
-
-    def want_ip6_nd_events(self, enable_disable=1, ip="::"):
-        return self.api(self.papi.want_ip6_nd_events,
-                        {'enable_disable': enable_disable,
-                         'ip': ip,
-                         'pid': os.getpid(), })
-
-    def want_ip6_ra_events(self, enable_disable=1):
-        return self.api(self.papi.want_ip6_ra_events,
-                        {'enable_disable': enable_disable,
-                         'pid': os.getpid(), })
+        return cli + "\n" + self.cli(cli)
 
     def ip6nd_send_router_solicitation(self, sw_if_index, irt=1, mrt=120,
                                        mrc=0, mrd=0):
@@ -392,15 +359,6 @@ class VppPapiProvider(object):
                         {'enable_disable': enable_disable,
                          'pid': os.getpid(), })
 
-    def want_l2_macs_events(self, enable_disable=1, scan_delay=0,
-                            max_macs_in_event=0, learn_limit=0):
-        return self.api(self.papi.want_l2_macs_events,
-                        {'enable_disable': enable_disable,
-                         'scan_delay': scan_delay,
-                         'max_macs_in_event': max_macs_in_event,
-                         'learn_limit': learn_limit,
-                         'pid': os.getpid(), })
-
     def sw_interface_set_mac_address(self, sw_if_index, mac):
         return self.api(self.papi.sw_interface_set_mac_address,
                         {'sw_if_index': sw_if_index,
@@ -450,30 +408,6 @@ class VppPapiProvider(object):
         return self.api(self.papi.create_loopback,
                         {'mac_address': mac})
 
-    def ip_table_add_del(self,
-                         table_id,
-                         is_add=1,
-                         is_ipv6=0):
-        """
-
-        :param table_id
-        :param is_add:  (Default value = 1)
-        :param is_ipv6:  (Default value = 0)
-
-        """
-
-        return self.api(
-            self.papi.ip_table_add_del,
-            {'table':
-             {
-                 'table_id': table_id,
-                 'is_ip6': is_ipv6
-             },
-             'is_add': is_add})
-
-    def ip_table_dump(self):
-        return self.api(self.papi.ip_table_dump, {})
-
     def ip_route_dump(self, table_id, is_ip6=False):
         return self.api(self.papi.ip_route_dump,
                         {'table': {
@@ -542,41 +476,7 @@ class VppPapiProvider(object):
         return self.api(
             self.papi.proxy_arp_intfc_enable_disable,
             {'sw_if_index': sw_if_index,
-             'enable_disable': is_enable
-             }
-        )
-
-    def gre_tunnel_add_del(self,
-                           src,
-                           dst,
-                           outer_fib_id=0,
-                           tunnel_type=0,
-                           instance=0xFFFFFFFF,
-                           session_id=0,
-                           is_add=1):
-        """ Add a GRE tunnel
-
-        :param src_address:
-        :param dst_address:
-        :param outer_fib_id:  (Default value = 0)
-        :param tunnel_type:  (Default value = 0)
-        :param instance:  (Default value = 0xFFFFFFFF)
-        :param session_id: (Default value = 0)
-        :param is_add:  (Default value = 1)
-        :param is_ipv6:  (Default value = 0)
-        """
-
-        return self.api(
-            self.papi.gre_tunnel_add_del,
-            {'is_add': is_add,
-             'tunnel':
-             {
-                 'type': tunnel_type,
-                 'instance': instance,
-                 'src': src,
-                 'dst': dst,
-                 'outer_fib_id': outer_fib_id,
-                 'session_id': session_id}
+             'enable': is_enable
              }
         )
 
@@ -708,85 +608,6 @@ class VppPapiProvider(object):
                  'mt_paths': paths,
              }})
 
-    def classify_add_del_table(
-            self,
-            is_add,
-            mask,
-            match_n_vectors=1,
-            table_index=0xFFFFFFFF,
-            nbuckets=2,
-            memory_size=2097152,
-            skip_n_vectors=0,
-            next_table_index=0xFFFFFFFF,
-            miss_next_index=0xFFFFFFFF,
-            current_data_flag=0,
-            current_data_offset=0):
-        """
-        :param is_add:
-        :param mask:
-        :param match_n_vectors: (Default value = 1)
-        :param table_index: (Default value = 0xFFFFFFFF)
-        :param nbuckets:  (Default value = 2)
-        :param memory_size:  (Default value = 2097152)
-        :param skip_n_vectors:  (Default value = 0)
-        :param next_table_index:  (Default value = 0xFFFFFFFF)
-        :param miss_next_index:  (Default value = 0xFFFFFFFF)
-        :param current_data_flag:  (Default value = 0)
-        :param current_data_offset:  (Default value = 0)
-        """
-
-        mask_len = ((len(mask) - 1) / 16 + 1) * 16
-        mask = mask + '\0' * (mask_len - len(mask))
-        return self.api(
-            self.papi.classify_add_del_table,
-            {'is_add': is_add,
-             'table_index': table_index,
-             'nbuckets': nbuckets,
-             'memory_size': memory_size,
-             'skip_n_vectors': skip_n_vectors,
-             'match_n_vectors': match_n_vectors,
-             'next_table_index': next_table_index,
-             'miss_next_index': miss_next_index,
-             'current_data_flag': current_data_flag,
-             'current_data_offset': current_data_offset,
-             'mask_len': mask_len,
-             'mask': mask})
-
-    def classify_add_del_session(
-            self,
-            is_add,
-            table_index,
-            match,
-            opaque_index=0xFFFFFFFF,
-            hit_next_index=0xFFFFFFFF,
-            advance=0,
-            action=0,
-            metadata=0):
-        """
-        :param is_add:
-        :param table_index:
-        :param match:
-        :param opaque_index:  (Default value = 0xFFFFFFFF)
-        :param hit_next_index:  (Default value = 0xFFFFFFFF)
-        :param advance:  (Default value = 0)
-        :param action:  (Default value = 0)
-        :param metadata:  (Default value = 0)
-        """
-
-        match_len = ((len(match) - 1) / 16 + 1) * 16
-        match = match + '\0' * (match_len - len(match))
-        return self.api(
-            self.papi.classify_add_del_session,
-            {'is_add': is_add,
-             'table_index': table_index,
-             'hit_next_index': hit_next_index,
-             'opaque_index': opaque_index,
-             'advance': advance,
-             'action': action,
-             'metadata': metadata,
-             'match_len': match_len,
-             'match': match})
-
     def input_acl_set_interface(
             self,
             is_add,
@@ -1014,38 +835,6 @@ class VppPapiProvider(object):
                 'reid_len': reid_len,
             })
 
-    def gtpu_add_del_tunnel(
-            self,
-            src_addr,
-            dst_addr,
-            is_add=1,
-            is_ipv6=0,
-            mcast_sw_if_index=0xFFFFFFFF,
-            encap_vrf_id=0,
-            decap_next_index=0xFFFFFFFF,
-            teid=0):
-        """
-
-        :param is_add:  (Default value = 1)
-        :param is_ipv6:  (Default value = 0)
-        :param src_addr:
-        :param dst_addr:
-        :param mcast_sw_if_index:  (Default value = 0xFFFFFFFF)
-        :param encap_vrf_id:  (Default value = 0)
-        :param decap_next_index:  (Default value = 0xFFFFFFFF)
-        :param teid:  (Default value = 0)
-
-        """
-        return self.api(self.papi.gtpu_add_del_tunnel,
-                        {'is_add': is_add,
-                         'is_ipv6': is_ipv6,
-                         'src_address': src_addr,
-                         'dst_address': dst_addr,
-                         'mcast_sw_if_index': mcast_sw_if_index,
-                         'encap_vrf_id': encap_vrf_id,
-                         'decap_next_index': decap_next_index,
-                         'teid': teid})
-
     def vxlan_gpe_add_del_tunnel(
             self,
             src_addr,
@@ -1083,8 +872,7 @@ class VppPapiProvider(object):
 
     def vxlan_gbp_tunnel_dump(self, sw_if_index=0xffffffff):
         return self.api(self.papi.vxlan_gbp_tunnel_dump,
-                        {'sw_if_index': sw_if_index,
-                         '_no_type_conversion': True})
+                        {'sw_if_index': sw_if_index})
 
     def pppoe_add_del_session(
             self,
@@ -1092,7 +880,6 @@ class VppPapiProvider(object):
             client_mac,
             session_id=0,
             is_add=1,
-            is_ipv6=0,
             decap_vrf_id=0):
         """
 
@@ -1106,7 +893,6 @@ class VppPapiProvider(object):
         """
         return self.api(self.papi.pppoe_add_del_session,
                         {'is_add': is_add,
-                         'is_ipv6': is_ipv6,
                          'session_id': session_id,
                          'client_ip': client_ip,
                          'decap_vrf_id': decap_vrf_id,
@@ -1116,7 +902,7 @@ class VppPapiProvider(object):
         return self.api(self.papi.sr_mpls_policy_add,
                         {'bsid': bsid,
                          'weight': weight,
-                         'type': type,
+                         'is_spray': type,
                          'n_segments': len(segments),
                          'segments': segments})
 
@@ -1124,282 +910,6 @@ class VppPapiProvider(object):
         return self.api(self.papi.sr_mpls_policy_del,
                         {'bsid': bsid})
 
-    def sr_localsid_add_del(self,
-                            localsid,
-                            behavior,
-                            nh_addr4,
-                            nh_addr6,
-                            is_del=0,
-                            end_psp=0,
-                            sw_if_index=0xFFFFFFFF,
-                            vlan_index=0,
-                            fib_table=0,
-                            ):
-        """ Add/del IPv6 SR local-SID.
-
-        :param localsid:
-        :param behavior: END=1; END.X=2; END.DX2=4; END.DX6=5;
-        :param behavior: END.DX4=6; END.DT6=7; END.DT4=8
-        :param nh_addr4:
-        :param nh_addr6:
-        :param is_del:  (Default value = 0)
-        :param end_psp: (Default value = 0)
-        :param sw_if_index: (Default value = 0xFFFFFFFF)
-        :param vlan_index:  (Default value = 0)
-        :param fib_table:   (Default value = 0)
-        """
-        return self.api(
-            self.papi.sr_localsid_add_del,
-            {'is_del': is_del,
-             'localsid': localsid,
-             'end_psp': end_psp,
-             'behavior': behavior,
-             'sw_if_index': sw_if_index,
-             'vlan_index': vlan_index,
-             'fib_table': fib_table,
-             'nh_addr4': nh_addr4,
-             'nh_addr6': nh_addr6
-             }
-        )
-
-    def sr_policy_add(
-            self,
-            bsid_addr,
-            weight=1,
-            is_encap=1,
-            type=0,
-            fib_table=0,
-            n_segments=0,
-            segments=[]):
-        """
-        :param bsid_addr: bindingSID of the SR Policy
-        :param weight: weight of the sid list. optional. (default: 1)
-        :param is_encap: (bool) whether SR policy should Encap or SRH insert \
-            (default: Encap)
-        :param type: type/behavior of the SR policy. (default or spray) \
-            (default: default)
-        :param fib_table: VRF where to install the FIB entry for the BSID \
-            (default: 0)
-        :param n_segments: number of segments \
-            (default: 0)
-        :param segments: a vector of IPv6 address composing the segment list \
-            (default: [])
-        """
-        return self.api(
-            self.papi.sr_policy_add,
-            {'bsid_addr': bsid_addr,
-             'weight': weight,
-             'is_encap': is_encap,
-             'type': type,
-             'fib_table': fib_table,
-             'n_segments': n_segments,
-             'segments': segments
-             }
-        )
-
-    def sr_policy_del(
-            self,
-            bsid_addr,
-            sr_policy_index=0):
-        """
-        :param bsid: bindingSID of the SR Policy
-        :param sr_policy_index: index of the sr policy (default: 0)
-        """
-        return self.api(
-            self.papi.sr_policy_del,
-            {'bsid_addr': bsid_addr,
-             'sr_policy_index': sr_policy_index
-             })
-
-    def sr_steering_add_del(
-            self,
-            is_del,
-            bsid_addr,
-            sr_policy_index,
-            table_id,
-            prefix_addr,
-            mask_width,
-            sw_if_index,
-            traffic_type):
-        """
-        Steer traffic L2 and L3 traffic through a given SR policy
-
-        :param is_del: delete or add
-        :param bsid_addr: bindingSID of the SR Policy (alt to sr_policy_index)
-        :param sr_policy: is the index of the SR Policy (alt to bsid)
-        :param table_id: is the VRF where to install the FIB entry for the BSID
-        :param prefix_addr: is the IPv4/v6 address for L3 traffic type
-        :param mask_width: is the mask for L3 traffic type
-        :param sw_if_index: is the incoming interface for L2 traffic
-        :param traffic_type: type of traffic (IPv4: 4, IPv6: 6, L2: 2)
-        """
-        return self.api(
-            self.papi.sr_steering_add_del,
-            {'is_del': is_del,
-             'bsid_addr': bsid_addr,
-             'sr_policy_index': sr_policy_index,
-             'table_id': table_id,
-             'prefix_addr': prefix_addr,
-             'mask_width': mask_width,
-             'sw_if_index': sw_if_index,
-             'traffic_type': traffic_type
-             })
-
-    def acl_add_replace(self, acl_index, r, tag='',
-                        expected_retval=0):
-        """Add/replace an ACL
-        :param int acl_index: ACL index to replace, 2^32-1 to create new ACL.
-        :param acl_rule r: ACL rules array.
-        :param str tag: symbolic tag (description) for this ACL.
-        :param int count: number of rules.
-        """
-        return self.api(self.papi.acl_add_replace,
-                        {'acl_index': acl_index,
-                         'r': r,
-                         'count': len(r),
-                         'tag': tag},
-                        expected_retval=expected_retval)
-
-    def acl_del(self, acl_index, expected_retval=0):
-        """
-
-        :param acl_index:
-        :return:
-        """
-        return self.api(self.papi.acl_del,
-                        {'acl_index': acl_index},
-                        expected_retval=expected_retval)
-
-    def acl_interface_set_acl_list(self, sw_if_index, n_input, acls,
-                                   expected_retval=0):
-        return self.api(self.papi.acl_interface_set_acl_list,
-                        {'sw_if_index': sw_if_index,
-                         'count': len(acls),
-                         'n_input': n_input,
-                         'acls': acls},
-                        expected_retval=expected_retval)
-
-    def acl_interface_set_etype_whitelist(self, sw_if_index,
-                                          n_input, whitelist,
-                                          expected_retval=0):
-        return self.api(self.papi.acl_interface_set_etype_whitelist,
-                        {'sw_if_index': sw_if_index,
-                         'count': len(whitelist),
-                         'n_input': n_input,
-                         'whitelist': whitelist},
-                        expected_retval=expected_retval)
-
-    def acl_interface_add_del(self,
-                              sw_if_index,
-                              acl_index,
-                              is_add=1):
-        """ Add/Delete ACL to/from interface
-
-        :param sw_if_index:
-        :param acl_index:
-        :param is_add:  (Default value = 1)
-        """
-
-        return self.api(self.papi.acl_interface_add_del,
-                        {'is_add': is_add,
-                         'is_input': 1,
-                         'sw_if_index': sw_if_index,
-                         'acl_index': acl_index})
-
-    def acl_dump(self, acl_index, expected_retval=0):
-        return self.api(self.papi.acl_dump,
-                        {'acl_index': acl_index},
-                        expected_retval=expected_retval)
-
-    def acl_interface_list_dump(self, sw_if_index=0xFFFFFFFF,
-                                expected_retval=0):
-        return self.api(self.papi.acl_interface_list_dump,
-                        {'sw_if_index': sw_if_index},
-                        expected_retval=expected_retval)
-
-    def macip_acl_add(self, rules, tag=""):
-        """ Add MACIP acl
-
-        :param rules: list of rules for given acl
-        :param tag: acl tag
-        """
-
-        return self.api(self.papi.macip_acl_add,
-                        {'r': rules,
-                         'count': len(rules),
-                         'tag': tag})
-
-    def macip_acl_add_replace(self, rules, acl_index=0xFFFFFFFF, tag=""):
-        """ Add MACIP acl
-
-        :param rules: list of rules for given acl
-        :param tag: acl tag
-        """
-
-        return self.api(self.papi.macip_acl_add_replace,
-                        {'acl_index': acl_index,
-                         'r': rules,
-                         'count': len(rules),
-                         'tag': tag})
-
-    def macip_acl_interface_add_del(self,
-                                    sw_if_index,
-                                    acl_index,
-                                    is_add=1):
-        """ Add MACIP acl to interface
-
-        :param sw_if_index:
-        :param acl_index:
-        :param is_add:  (Default value = 1)
-        """
-
-        return self.api(self.papi.macip_acl_interface_add_del,
-                        {'is_add': is_add,
-                         'sw_if_index': sw_if_index,
-                         'acl_index': acl_index})
-
-    def macip_acl_dump(self, acl_index=4294967295):
-        """ Return MACIP acl dump
-        """
-
-        return self.api(
-            self.papi.macip_acl_dump, {'acl_index': acl_index})
-
-    def policer_add_del(self,
-                        name,
-                        cir,
-                        eir,
-                        cb,
-                        eb,
-                        is_add=1,
-                        rate_type=0,
-                        round_type=0,
-                        ptype=0,
-                        color_aware=0,
-                        conform_action_type=1,
-                        conform_dscp=0,
-                        exceed_action_type=0,
-                        exceed_dscp=0,
-                        violate_action_type=0,
-                        violate_dscp=0):
-        return self.api(self.papi.policer_add_del,
-                        {'name': name,
-                         'cir': cir,
-                         'eir': eir,
-                         'cb': cb,
-                         'eb': eb,
-                         'is_add': is_add,
-                         'rate_type': rate_type,
-                         'round_type': round_type,
-                         'type': ptype,
-                         'color_aware': color_aware,
-                         'conform_action_type': conform_action_type,
-                         'conform_dscp': conform_dscp,
-                         'exceed_action_type': exceed_action_type,
-                         'exceed_dscp': exceed_dscp,
-                         'violate_action_type': violate_action_type,
-                         'violate_dscp': violate_dscp})
-
     def ip_punt_police(self,
                        policer_index,
                        is_ip6=0,
@@ -1708,7 +1218,7 @@ class VppPapiProvider(object):
                                 remote_crypto_key, integ_alg, local_integ_key,
                                 remote_integ_key, is_add=1, esn=0, salt=0,
                                 anti_replay=1, renumber=0,
-                                udp_encap=0, show_instance=0):
+                                udp_encap=0, show_instance=0xffffffff):
         return self.api(
             self.papi.ipsec_tunnel_if_add_del,
             {
@@ -1754,8 +1264,7 @@ class VppPapiProvider(object):
              'sw_if_index': sw_if_index,
              'ip4_fib_id': ip4_fib_id,
              'ip6_fib_id': ip6_fib_id,
-             'namespace_id': namespace_id,
-             'namespace_id_len': len(namespace_id)})
+             'namespace_id': namespace_id})
 
     def punt_socket_register(self, reg, pathname,
                              header_version=1):
@@ -1793,8 +1302,7 @@ class VppPapiProvider(object):
 
     def gbp_endpoint_dump(self):
         """ GBP endpoint Dump """
-        return self.api(self.papi.gbp_endpoint_dump,
-                        {'_no_type_conversion': True})
+        return self.api(self.papi.gbp_endpoint_dump, {})
 
     def gbp_endpoint_group_add(self, vnid, sclass, bd,
                                rd, uplink_sw_if_index,
@@ -1903,8 +1411,7 @@ class VppPapiProvider(object):
 
     def gbp_subnet_dump(self):
         """ GBP Subnet Dump """
-        return self.api(self.papi.gbp_subnet_dump,
-                        {'_no_type_conversion': True})
+        return self.api(self.papi.gbp_subnet_dump, {})
 
     def gbp_contract_dump(self):
         """ GBP contract Dump """
@@ -2039,3 +1546,10 @@ class VppPapiProvider(object):
                             'sw_if_index': sw_if_index,
                             'is_enable': is_enable,
                         })
+
+    def feature_gso_enable_disable(self, sw_if_index, enable_disable=1):
+        return self.api(self.papi.feature_gso_enable_disable,
+                        {
+                            'sw_if_index': sw_if_index,
+                            'enable_disable': enable_disable,
+                        })