From d91c1dbdb31f80db7d967f2f57c43d0a81d65297 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Mon, 31 Jul 2017 02:30:50 -0700 Subject: punt and drop features: - new IPv4 and IPv6 feature arcs on the punt and drop nodes - new features: - redirect punted traffic to an interface and nexthop - police punted traffic. Change-Id: I53be8bf4e06545add8a3619e462de5ffedd0a95c Signed-off-by: Neale Ranns --- test/vpp_papi_provider.py | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'test/vpp_papi_provider.py') diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index c3127f84022..3d6a3184bb8 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -2422,3 +2422,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}) -- cgit 1.2.3-korg