aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2016-10-17 08:08:52 +0100
committerPeter Mikus <pmikus@cisco.com>2016-10-26 05:58:34 +0000
commit868380b0204758ef34c6be5bae0c9bdb00c4107f (patch)
tree9ead7a8e4db4d345a9749821d555f6bc55546682 /resources/libraries/python
parent099707b8addc80132cb30f64bdcdd4001066454d (diff)
CSIT-395 Update TRex version to v2.09
- Update TRex to v2.09 Change-Id: I53221aff346840e0438dd1385cedd1db57ca5f3b Signed-off-by: pmikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/python')
-rw-r--r--resources/libraries/python/TrafficGenerator.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py
index 459a6cc2bb..307a28f470 100644
--- a/resources/libraries/python/TrafficGenerator.py
+++ b/resources/libraries/python/TrafficGenerator.py
@@ -155,7 +155,7 @@ class TrafficGenerator(object):
self._node = tg_node
if tg_node['subtype'] == NodeSubTypeTG.TREX:
- trex_path = "/opt/trex-core-2.07"
+ trex_path = "/opt/trex-core-2.09"
ssh = SSH()
ssh.connect(tg_node)
@@ -215,18 +215,20 @@ class TrafficGenerator(object):
.format(stdout + stderr))
raise RuntimeError('trex config generation error')
- (ret, stdout, stderr) = ssh.exec_command(
- "sh -c 'cd {0}/scripts/ && sudo ./trex-cfg'".format(trex_path))
- if int(ret) != 0:
- logger.error('trex-cfg failed: {0}'.format(stdout + stderr))
- raise RuntimeError('trex-cfg failed')
-
max_startup_retries = 3
while max_startup_retries > 0:
# kill T-rex only if it is already running
(ret, _, _) = ssh.exec_command(
"sh -c 'pgrep t-rex && sudo pkill t-rex'")
+ # configure T-rex
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c 'cd {0}/scripts/ && sudo ./trex-cfg'"\
+ .format(trex_path))
+ if int(ret) != 0:
+ logger.error('trex-cfg failed: {0}'.format(stdout + stderr))
+ raise RuntimeError('trex-cfg failed')
+
# start T-rex
(ret, _, _) = ssh.exec_command(
"sh -c 'cd {0}/scripts/ && "