aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/TrafficGenerator.py16
-rwxr-xr-xresources/tools/t-rex/t-rex-installer.sh2
-rwxr-xr-xresources/tools/t-rex/t-rex-server-info.py2
-rwxr-xr-xresources/tools/t-rex/t-rex-stateless-stop.py2
-rwxr-xr-xresources/tools/t-rex/t-rex-stateless.py2
5 files changed, 13 insertions, 11 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/ && "
diff --git a/resources/tools/t-rex/t-rex-installer.sh b/resources/tools/t-rex/t-rex-installer.sh
index d015015c92..e89b06f9b1 100755
--- a/resources/tools/t-rex/t-rex-installer.sh
+++ b/resources/tools/t-rex/t-rex-installer.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-TREX_VERSION="2.07"
+TREX_VERSION="2.09"
TREX_DOWNLOAD_REPO="https://github.com/cisco-system-traffic-generator/trex-core/archive/"
TREX_DOWNLOAD_PACKAGE="v${TREX_VERSION}.zip"
diff --git a/resources/tools/t-rex/t-rex-server-info.py b/resources/tools/t-rex/t-rex-server-info.py
index 504d9de95b..2c66286e5f 100755
--- a/resources/tools/t-rex/t-rex-server-info.py
+++ b/resources/tools/t-rex/t-rex-server-info.py
@@ -28,7 +28,7 @@ Functionality:
import sys
-sys.path.insert(0, "/opt/trex-core-2.07/scripts/automation/"+\
+sys.path.insert(0, "/opt/trex-core-2.09/scripts/automation/"+\
"trex_control_plane/stl/")
from trex_stl_lib.api import *
diff --git a/resources/tools/t-rex/t-rex-stateless-stop.py b/resources/tools/t-rex/t-rex-stateless-stop.py
index 692685ebf4..ac963565d8 100755
--- a/resources/tools/t-rex/t-rex-stateless-stop.py
+++ b/resources/tools/t-rex/t-rex-stateless-stop.py
@@ -28,7 +28,7 @@ Functionality:
import sys
-sys.path.insert(0, "/opt/trex-core-2.07/scripts/automation/"+\
+sys.path.insert(0, "/opt/trex-core-2.09/scripts/automation/"+\
"trex_control_plane/stl/")
from trex_stl_lib.api import *
diff --git a/resources/tools/t-rex/t-rex-stateless.py b/resources/tools/t-rex/t-rex-stateless.py
index 21f3274af5..24f4a99738 100755
--- a/resources/tools/t-rex/t-rex-stateless.py
+++ b/resources/tools/t-rex/t-rex-stateless.py
@@ -48,7 +48,7 @@ import string
import struct
import sys
-sys.path.insert(0, "/opt/trex-core-2.07/scripts/automation/"+\
+sys.path.insert(0, "/opt/trex-core-2.09/scripts/automation/"+\
"trex_control_plane/stl/")
from trex_stl_lib.api import *