CSIT-885 Updagrade TRex to v2.35 43/9943/2
authorPeter Mikus <pmikus@cisco.com>
Thu, 4 Jan 2018 08:56:37 +0000 (09:56 +0100)
committerPeter Mikus <pmikus@cisco.com>
Thu, 4 Jan 2018 11:24:34 +0000 (11:24 +0000)
Change-Id: I82681fc9ea52d72323d48ac78507ef1c571ca712
Signed-off-by: Peter Mikus <pmikus@cisco.com>
resources/libraries/python/TrafficGenerator.py
resources/libraries/python/constants.py
resources/tools/trex/trex_installer.sh
resources/tools/trex/trex_server_info.py
resources/tools/trex/trex_stateless_profile.py
resources/tools/trex/trex_stateless_stop.py

index a808338..698b67e 100644 (file)
@@ -185,8 +185,9 @@ class TrafficGenerator(object):
             ssh.connect(tg_node)
 
             (ret, _, _) = ssh.exec_command(
-                "sudo -E sh -c '{}/resources/tools/trex/"
-                "trex_installer.sh'".format(Constants.REMOTE_FW_DIR),
+                "sudo -E sh -c '{0}/resources/tools/trex/"
+                "trex_installer.sh {1}'".format(Constants.REMOTE_FW_DIR,
+                                                Constants.TREX_INSTALL_VERSION),
                 timeout=1800)
             if int(ret) != 0:
                 raise RuntimeError('TRex installation failed.')
index 7ae9cdd..30f7531 100644 (file)
@@ -35,8 +35,11 @@ class Constants(object):
     # QEMU install directory
     QEMU_INSTALL_DIR = '/opt/qemu-2.5.0'
 
+    # TRex install version
+    TREX_INSTALL_VERSION = '2.35'
+
     # TRex install directory
-    TREX_INSTALL_DIR = '/opt/trex-core-2.34'
+    TREX_INSTALL_DIR = '/opt/trex-core-2.35'
 
     # Kubernetes templates location
     RESOURCES_TPL_K8S = 'resources/templates/kubernetes'
index 1e9b4ba..c0012a1 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-TREX_VERSION="2.34"
+TREX_VERSION=$1
 
 TREX_DOWNLOAD_REPO="https://github.com/cisco-system-traffic-generator/trex-core/archive/"
 TREX_DOWNLOAD_PACKAGE="v${TREX_VERSION}.zip"
index ff1350d..e9de6f9 100755 (executable)
@@ -28,7 +28,7 @@ Functionality:
 
 import sys
 
-sys.path.insert(0, "/opt/trex-core-2.34/scripts/automation/"+\
+sys.path.insert(0, "/opt/trex-core-2.35/scripts/automation/"+\
                    "trex_control_plane/stl/")
 from trex_stl_lib.api import *
 
index 311c85f..c792f3e 100755 (executable)
@@ -22,7 +22,7 @@ import sys
 import argparse
 import json
 
-sys.path.insert(0, "/opt/trex-core-2.34/scripts/automation/"
+sys.path.insert(0, "/opt/trex-core-2.35/scripts/automation/"
                    "trex_control_plane/stl/")
 
 from trex_stl_lib.api import *
index 67dd2d2..778bd05 100755 (executable)
@@ -29,7 +29,7 @@ Functionality:
 import sys
 import json
 
-sys.path.insert(0, "/opt/trex-core-2.34/scripts/automation/"+\
+sys.path.insert(0, "/opt/trex-core-2.35/scripts/automation/"+\
                    "trex_control_plane/stl/")
 from trex_stl_lib.api import *