policer: API cleanup
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ia14f33992353b419b70b55beed63ab8ed6a2e837 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
This commit is contained in:

committed by
Ole Trøan

parent
f52420d507
commit
cd01fb4237
@ -96,7 +96,7 @@ defaultmapping = {
|
||||
'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,
|
||||
@ -1166,41 +1166,6 @@ 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,
|
||||
|
Reference in New Issue
Block a user