From c29940c58de3e44c0c1dd5c4eda5e0268d963b14 Mon Sep 17 00:00:00 2001 From: Pavel Kotucek Date: Thu, 7 Sep 2017 08:17:31 +0200 Subject: ACL-plugin add "replace" semantics for adding a new MacIP acl Change-Id: Ia5c869b2d8b8ad012b9e89fb6720c9c32d9ee065 Signed-off-by: Pavel Kotucek --- test/vpp_papi_provider.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'test/vpp_papi_provider.py') diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 519aff80899..b63a26583da 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -2266,23 +2266,31 @@ class VppPapiProvider(object): 'traffic_type': traffic_type }) - def macip_acl_add_replace(self, rules, acl_index=0xFFFFFFFF, tag=""): + 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_replace, - # {'acl_index': acl_index, - # 'r': rules, - # 'count': len(rules), - # 'tag': 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_del(self, acl_index): """ -- cgit 1.2.3-korg