summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-02-24 16:08:33 +0200
committerHanoh Haim <hhaim@cisco.com>2016-02-24 16:08:33 +0200
commit4ae35508f6b448162aa4707264895b4dc42dd0de (patch)
tree671c99ed4607e5e23954239d52f6fbd289e94266 /scripts/automation/trex_control_plane
parent5a844c9d72411435842e5a0674c6fdc04e5d4e84 (diff)
add seed per stream
Diffstat (limited to 'scripts/automation/trex_control_plane')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py5
1 files changed, 5 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 127d1669..fdd330a5 100644
--- 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
@@ -152,6 +152,7 @@ class STLStream(object):
next = None,
stream_id = None,
action_count = 0,
+ random_seed =0,
mac_src_override_by_pkt=None,
mac_dst_override_mode=None #see STLStreamDstMAC_xx
):
@@ -163,6 +164,7 @@ class STLStream(object):
validate_type('self_start', self_start, bool)
validate_type('isg', isg, (int, float))
validate_type('stream_id', stream_id, (NoneType, int))
+ validate_type('random_seed',random_seed,int);
if (type(mode) == STLTXCont) and (next != None):
raise STLError("continuous stream cannot have a next stream ID")
@@ -207,6 +209,9 @@ class STLStream(object):
self.fields['self_start'] = self_start
self.fields['isg'] = isg
+ if random_seed !=0 :
+ self.fields['random_seed'] = random_seed # optional
+
# mode
self.fields['mode'] = mode.to_json()
self.mode_desc = str(mode)