diff options
author | Steve Shin <jonshin@cisco.com> | 2016-12-19 09:24:50 -0800 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-12-21 10:07:04 +0000 |
commit | 7957d6e6f7207fb64ba6a9927c49bc466b70bfc3 (patch) | |
tree | 7e1a3294fc4392e7c410cbe150275f955f8f9a05 /test/vpp_papi_provider.py | |
parent | 7714b300285a9ebd075819075e977f96b2ba7676 (diff) |
make test: Add classifier - ip/mac/pbr cases
Change-Id: I9cdf022a48b2b63e7ce07f4f5322ffda28c08ff0
Signed-off-by: Steve Shin <jonshin@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 9200eeaac98..7c9059295f8 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -881,3 +881,100 @@ class VppPapiProvider(object): 'enable_disable': enable_disable, 'pid': os.getpid(), }) + + def classify_add_del_table( + self, + is_add, + mask, + match_n_vectors=1, + table_index=0xFFFFFFFF, + nbuckets=2, + memory_size=2097152, + skip_n_vectors=0, + next_table_index=0xFFFFFFFF, + miss_next_index=0xFFFFFFFF, + current_data_flag=0, + current_data_offset=0): + + """ + :param is_add: + :param mask: + :param match_n_vectors (Default value = 1): + :param table_index (Default value = 0xFFFFFFFF) + :param nbuckets: (Default value = 2) + :param memory_size: (Default value = 2097152) + :param skip_n_vectors: (Default value = 0) + :param next_table_index: (Default value = 0xFFFFFFFF) + :param miss_next_index: (Default value = 0xFFFFFFFF) + :param current_data_flag: (Default value = 0) + :param current_data_offset: (Default value = 0) + """ + + return self.api( + self.papi.classify_add_del_table, + {'is_add' : is_add, + 'table_index' : table_index, + 'nbuckets' : nbuckets, + 'memory_size': memory_size, + 'skip_n_vectors' : skip_n_vectors, + 'match_n_vectors' : match_n_vectors, + 'next_table_index' : next_table_index, + 'miss_next_index' : miss_next_index, + 'current_data_flag' : current_data_flag, + 'current_data_offset' : current_data_offset, + 'mask' : mask}) + + def classify_add_del_session( + self, + is_add, + table_index, + match, + opaque_index=0xFFFFFFFF, + hit_next_index=0xFFFFFFFF, + advance=0, + action=0, + metadata=0): + """ + :param is_add: + :param table_index: + :param match: + :param opaque_index: (Default value = 0xFFFFFFFF) + :param hit_next_index: (Default value = 0xFFFFFFFF) + :param advance: (Default value = 0) + :param action: (Default value = 0) + :param metadata: (Default value = 0) + """ + + return self.api( + self.papi.classify_add_del_session, + {'is_add' : is_add, + 'table_index' : table_index, + 'hit_next_index' : hit_next_index, + 'opaque_index' : opaque_index, + 'advance' : advance, + 'action' : action, + 'metadata' : metadata, + 'match' : match}) + + def input_acl_set_interface( + self, + is_add, + sw_if_index, + ip4_table_index=0xFFFFFFFF, + ip6_table_index=0xFFFFFFFF, + l2_table_index=0xFFFFFFFF): + """ + :param is_add: + :param sw_if_index: + :param ip4_table_index: (Default value = 0xFFFFFFFF) + :param ip6_table_index: (Default value = 0xFFFFFFFF) + :param l2_table_index: (Default value = 0xFFFFFFFF) + """ + + return self.api( + self.papi.input_acl_set_interface, + {'sw_if_index' : sw_if_index, + 'ip4_table_index' : ip4_table_index, + 'ip6_table_index' : ip6_table_index, + 'l2_table_index' : l2_table_index, + 'is_add' : is_add}) |