Remove unused 'not_last' parameter from ip_add_del_route
[vpp.git] / test / vpp_papi_provider.py
index c3127f8..2e970d2 100644 (file)
@@ -747,7 +747,7 @@ class VppPapiProvider(object):
             is_classify=0,
             is_multipath=0,
             is_l2_bridged=0,
-            not_last=0):
+            is_source_lookup=0):
         """
 
         :param dst_address_length:
@@ -766,7 +766,8 @@ class VppPapiProvider(object):
         :param is_multipath:  (Default value = 0)
         :param is_resolve_host:  (Default value = 0)
         :param is_resolve_attached:  (Default value = 0)
-        :param not_last:  (Default value = 0)
+        :param is_l2_bridged:  (Default value = 0)
+        :param is_source_lookup:  (Default value = 0)
         :param next_hop_weight:  (Default value = 1)
 
         """
@@ -788,7 +789,7 @@ class VppPapiProvider(object):
              'is_resolve_host': is_resolve_host,
              'is_resolve_attached': is_resolve_attached,
              'is_l2_bridged': is_l2_bridged,
-             'not_last': not_last,
+             'is_source_lookup': is_source_lookup,
              'next_hop_weight': next_hop_weight,
              'dst_address_length': dst_address_length,
              'dst_address': dst_address,
@@ -1020,8 +1021,7 @@ class VppPapiProvider(object):
             is_drop=0,
             is_multipath=0,
             classify_table_index=0xFFFFFFFF,
-            is_classify=0,
-            not_last=0):
+            is_classify=0):
         """
 
         :param dst_address_length:
@@ -1041,7 +1041,6 @@ class VppPapiProvider(object):
         :param is_multicast:  (Default value = 0)
         :param is_resolve_host:  (Default value = 0)
         :param is_resolve_attached:  (Default value = 0)
-        :param not_last:  (Default value = 0)
         :param next_hop_weight:  (Default value = 1)
 
         """
@@ -2422,3 +2421,60 @@ class VppPapiProvider(object):
 
         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,
+                       is_add=1):
+        return self.api(self.papi.ip_punt_police,
+                        {'policer_index': policer_index,
+                         'is_add': is_add,
+                         'is_ip6': is_ip6})
+
+    def ip_punt_redirect(self,
+                         rx_sw_if_index,
+                         tx_sw_if_index,
+                         nh,
+                         is_ip6=0,
+                         is_add=1):
+        return self.api(self.papi.ip_punt_redirect,
+                        {'rx_sw_if_index': rx_sw_if_index,
+                         'tx_sw_if_index': tx_sw_if_index,
+                         'nh': nh,
+                         'is_add': is_add,
+                         'is_ip6': is_ip6})