summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-09-13 15:13:31 +0300
committerHanoh Haim <hhaim@cisco.com>2016-09-13 19:37:29 +0300
commitb424cd3de89ce5dbf67b349d3fe9ffe15b521452 (patch)
tree442a65f255e6c62b07d45d2adad17e4024ff26f1 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
parent3cec1bfbb8a4814c54127d08135d066471bd5310 (diff)
add repetable_random example profile
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
index bfcf063a..f9694105 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
@@ -625,6 +625,9 @@ class STLStream(object):
inst['ip_min'] = ltoa(inst['ip_min'])
inst['ip_max'] = ltoa(inst['ip_max'])
vm_list.append("STLVmTupleGen(name='{name}', ip_min='{ip_min}', ip_max='{ip_max}', port_min={port_min}, port_max={port_max}, limit_flows={limit_flows}, flags={flags})".format(**inst))
+ elif inst['type'] == 'flow_var_rand_limit':
+ vm_list.append("STLVmFlowVarRepetableRandom(name='{name}', size={size}, limit={limit}, seed={seed}, min_value={min_value}, max_value={max_value})".format(**inst))
+
vm_code = 'vm = STLScVmRaw([' + ',\n '.join(vm_list) + '], split_by_field = %s)' % STLStream.__add_quotes(self.fields['vm'].get('split_by_var'))
stream_params_list = []
stream_params_list.append('packet = STLPktBuilder(pkt = packet, vm = vm)')