CSIT-395 Update TRex version to v2.09 35/3435/6
authorpmikus <pmikus@cisco.com>
Mon, 17 Oct 2016 07:08:52 +0000 (08:08 +0100)
committerPeter Mikus <pmikus@cisco.com>
Wed, 26 Oct 2016 05:58:34 +0000 (05:58 +0000)
- Update TRex to v2.09

Change-Id: I53221aff346840e0438dd1385cedd1db57ca5f3b
Signed-off-by: pmikus <pmikus@cisco.com>
resources/libraries/python/TrafficGenerator.py
resources/tools/t-rex/t-rex-installer.sh
resources/tools/t-rex/t-rex-server-info.py
resources/tools/t-rex/t-rex-stateless-stop.py
resources/tools/t-rex/t-rex-stateless.py

index 459a6cc..307a28f 100644 (file)
@@ -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/ && "
index d015015..e89b06f 100755 (executable)
@@ -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"
index 504d9de..2c66286 100755 (executable)
@@ -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 *
 
index 692685e..ac96356 100755 (executable)
@@ -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 *
 
index 21f3274..24f4a99 100755 (executable)
@@ -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 *
 

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.