2.24. test_flowprobe module

class test_flowprobe.Datapath(methodName='runTest')

Bases: test_flowprobe.MethodHolder

collect information on Ethernet, IP4 and IP6 datapath (no timers)

test_0001()

no timers, one CFLOW packet, 9 Flows inside

test_0002()

no timers, two CFLOW packets (mtu=256), 3 Flows in each

test_L2onIP4()

L2 data on IP4 datapath

test_L2onIP6()

L2 data on IP6 datapath

test_L2onL2()

L2 data on L2 datapath

test_L3onIP4()

L3 data on IP4 datapath

test_L3onIP6()

L3 data on IP6 datapath

test_L3onL2()

L3 data on L2 datapath

test_L4onIP4()

L4 data on IP4 datapath

test_L4onIP6()

L4 data on IP6 datapath

test_L4onL2()

L4 data on L2 datapath

test_templatesIP6()

verify templates on IP6 datapath

test_templatesIp4()

verify templates on IP4 datapath

test_templatesL2()

verify template on L2 datapath

class test_flowprobe.DisableFP(methodName='runTest')

Bases: test_flowprobe.MethodHolder

Disable Flowprobe feature

test_0001()

disable flowprobe feature after first packets

class test_flowprobe.DisableIPFIX(methodName='runTest')

Bases: test_flowprobe.MethodHolder

Disable IPFIX

test_0001()

disable IPFIX after first packets

class test_flowprobe.Flowprobe(methodName='runTest')

Bases: test_flowprobe.MethodHolder

Template verification, timer tests

test_0001()

timer less than template timeout

test_0002()

timer greater than template timeout

test_cflow_packet()

verify cflow packet fields

class test_flowprobe.MethodHolder(methodName='runTest')

Bases: framework.VppTestCase

Flow-per-packet plugin: test L2, IP4, IP6 reporting

create_stream(src_if=None, dst_if=None, packets=None, size=None, ip_ver='v4')

Create a packet stream to tickle the plugin

Parameters:
  • src_if (VppInterface) – Source interface for packet stream
  • src_if – Dst interface for packet stream
debug_print = False
max_number_of_packets = 10
pkts = []
send_packets(src_if=None, dst_if=None)
classmethod setUpClass()

Perform standard class setup (defined by class method setUpClass in class VppTestCase) before running the test case, set test case related variables and configure VPP.

verify_cflow_data(decoder, capture, cflow)
verify_cflow_data_detail(decoder, capture, cflow, data_set={1: 'octets', 2: 'packets'}, ip_ver='v4')
verify_cflow_data_notimer(decoder, capture, cflows)
wait_for_cflow_packet(collector_intf, set_id=2, timeout=1, expected=True)

wait for CFLOW packet and verify its correctness

Parameters:timeout – how long to wait
Returns:tuple (packet, time spent waiting for packet)
class test_flowprobe.ReenableFP(methodName='runTest')

Bases: test_flowprobe.MethodHolder

Re-enable Flowprobe feature

test_0001()

disable flowprobe feature after first packets and re-enable after few packets

class test_flowprobe.ReenableIPFIX(methodName='runTest')

Bases: test_flowprobe.MethodHolder

Re-enable IPFIX

test_0011()

disable IPFIX after first packets and re-enable after few packets

class test_flowprobe.VppCFLOW(test, intf='pg2', active=0, passive=0, timeout=100, mtu=1024, datapath='l2', layer='l2 l3 l4')

Bases: vpp_object.VppObject

CFLOW object for IPFIX exporter and Flowprobe feature

add_vpp_config()
disable_exporter()
disable_flowprobe_feature()
enable_exporter()
enable_flowprobe_feature()
object_id()
query_vpp_config()
remove_vpp_config()
verify_templates(decoder=None, timeout=1, count=3)