diff options
author | Hanoh Haim <hhaim@cisco.com> | 2016-09-13 15:13:31 +0300 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2016-09-13 19:37:29 +0300 |
commit | b424cd3de89ce5dbf67b349d3fe9ffe15b521452 (patch) | |
tree | 442a65f255e6c62b07d45d2adad17e4024ff26f1 /scripts/automation | |
parent | 3cec1bfbb8a4814c54127d08135d066471bd5310 (diff) |
add repetable_random example profile
Diffstat (limited to 'scripts/automation')
-rw-r--r-- | scripts/automation/regression/functional_tests/stl_basic_tests.py | 8 | ||||
-rwxr-xr-x | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/scripts/automation/regression/functional_tests/stl_basic_tests.py b/scripts/automation/regression/functional_tests/stl_basic_tests.py index 39f42e7d..5af1e4de 100644 --- a/scripts/automation/regression/functional_tests/stl_basic_tests.py +++ b/scripts/automation/regression/functional_tests/stl_basic_tests.py @@ -222,7 +222,7 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): def test_stl_profiles (self): - p = [ + p1 = [ ["udp_1pkt_1mac_override.py","-m 1 -l 50",True], ["syn_attack.py","-m 1 -l 50",True], ["udp_1pkt_1mac.py","-m 1 -l 50",True], @@ -271,14 +271,14 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): ["udp_1pkt_simple_test.py","-m 1 -l 10 ",True, False], ["udp_1pkt_mac_mask5.py","-m 1 -l 30 ",True], ["udp_1pkt_range_clients_split_garp.py","-m 1 -l 50",True], - ["udp_1pkt_src_ip_split.py","-m 1 -l 50 --cores 2",True] + ["udp_1pkt_src_ip_split.py","-m 1 -l 50 --cores 2",True], + ["udp_1pkt_repeat_random.py","-m 1 -l 50",True], ]; - #p = [ ["udp_1pkt_src_ip_split.py","-m 1 -l 50",True] ] - #p = [ ["udp_1pkt_src_ip_split.py","-m 1 -l 50 --cores 2",True] ] + p = [ ["udp_1pkt_repeat_random.py","-m 1 -l 50",True] ] for obj in p: 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)') |