aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-01-02 07:46:14 +0100
committerDave Barach <openvpp@barachs.net>2017-01-02 15:15:46 +0000
commit77fabdbcee0123fbdf77060a63515058c1529e66 (patch)
treeadd8a927d2b006922a012f95ff5bb9fc93176c87 /test/vpp_papi_provider.py
parent5d22448922c52d2da0008b2ed2e2e20e08510229 (diff)
make test: improve test_flowperpkt
Change-Id: Id1b2bef2a93ac931a420d7a3c322d65c1fbce055 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py68
1 files changed, 44 insertions, 24 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 3279a274..bdbcc3d2 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -901,7 +901,6 @@ class VppPapiProvider(object):
miss_next_index=0xFFFFFFFF,
current_data_flag=0,
current_data_offset=0):
-
"""
:param is_add:
:param mask:
@@ -918,17 +917,17 @@ class VppPapiProvider(object):
return self.api(
self.papi.classify_add_del_table,
- {'is_add' : is_add,
- 'table_index' : table_index,
- 'nbuckets' : nbuckets,
+ {'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})
+ '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,
@@ -953,14 +952,14 @@ class VppPapiProvider(object):
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})
+ {'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,
@@ -979,8 +978,29 @@ class VppPapiProvider(object):
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})
+ {'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})
+
+ def set_ipfix_exporter(
+ self,
+ collector_address,
+ src_address,
+ path_mtu,
+ template_interval,
+ vrf_id=0,
+ collector_port=4739,
+ udp_checksum=0):
+ return self.api(
+ self.papi.set_ipfix_exporter,
+ {
+ 'collector_address': collector_address,
+ 'collector_port': collector_port,
+ 'src_address': src_address,
+ 'vrf_id': vrf_id,
+ 'path_mtu': path_mtu,
+ 'template_interval': template_interval,
+ 'udp_checksum': udp_checksum,
+ })