diff options
author | Andrew Yourtchenko <ayourtch@gmail.com> | 2017-09-14 18:26:36 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-09-26 07:49:08 +0000 |
commit | 51d2651e4aceff4016228c669480437eac84f221 (patch) | |
tree | 77cc3dfd9be80e7adb5315e93a3caf2378ea12e6 /test/vpp_papi_provider.py | |
parent | fc4510bbdb85c5bd6ff4fc69996e78d568254091 (diff) |
acl-plugin: test: move the API calls to vpp_papi_provider.py
Change-Id: I1d3818027b8a1fcb1ec12016e3476b5c22a2d5a5
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 71e7aea1..97f201d3 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -2278,6 +2278,35 @@ 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_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 |