diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2019-08-27 10:16:44 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-12-03 14:53:47 +0000 |
commit | 692bfc85f2c41c6e25e73931a7b6fe6a1c5dd6c6 (patch) | |
tree | e4d564fdea62d8125a158a19dde0c1a938b0dfa4 /test/vpp_papi_provider.py | |
parent | e2ccdf0316243a1486109743e3de532cae5f3254 (diff) |
classify: API cleanup
Use consistent API types.
Type: fix
Change-Id: Ib5b1efa76f0a9cecc0bc146f8f8a47c2442fc1db
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 692d0071d28..556145ac97e 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -42,10 +42,6 @@ defaultmapping = { 'learn': 1, 'is_add': 1, }, 'bvi_create': {'user_instance': 4294967295, }, 'bvi_delete': {}, - 'classify_add_del_table': {'match_n_vectors': 1, 'table_index': 4294967295, - 'nbuckets': 2, 'memory_size': 2097152, - 'next_table_index': 4294967295, - 'miss_next_index': 4294967295, }, 'gbp_subnet_add_del': {'sw_if_index': 4294967295, 'epg_id': 65535, }, 'geneve_add_del_tunnel': {'mcast_sw_if_index': 4294967295, 'is_add': 1, 'decap_next_index': 4294967295, }, @@ -693,84 +689,6 @@ class VppPapiProvider(object): 'mt_paths': paths, }}) - 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) - """ - mask_len = ((len(mask) - 1) // 16 + 1) * 16 - mask = mask + b'\0' * (mask_len - len(mask)) - 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_len': mask_len, - '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) - """ - - match_len = ((len(match) - 1) // 16 + 1) * 16 - match = match + b'\0' * (match_len - len(match)) - 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_len': match_len, - 'match': match}) - def input_acl_set_interface( self, is_add, |