X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fvpp_papi_provider.py;h=634dabeafdaecd0572197888c980d24ad99202e0;hb=987abe9eeb65a3950401073c770012a7898593b7;hp=71e7aea11f3834bcb89226152e947522967a6b3d;hpb=c125eccc10db9c0b9c5d161d3ad20b4fc8c69b26;p=vpp.git diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 71e7aea11f3..634dabeafda 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -2278,6 +2278,45 @@ class VppPapiProvider(object): '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_dump(self, acl_index, expected_retval=0): + return self.api(self.papi.acl_dump, + {'acl_index': acl_index}, + expected_retval=expected_retval) + def macip_acl_add(self, rules, tag=""): """ Add MACIP acl