aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2016-06-03 08:00:59 +0100
committerDave Wallace <dwallacelf@gmail.com>2016-06-03 14:22:44 +0000
commit986a656c8ab1581a14a94d3dadf7bb7fc87764e5 (patch)
tree2c705f021ec6d6390107336e4420e0c7dac31672 /resources/libraries/python
parent8f328d362ff6572ed0cb9692abf5d02c4d4d62fb (diff)
Update T-rex version to v2.03 with installation from robot
- JIRA: CSIT-132 - Update T-rex version to v2.03 with installation from robot Change-Id: I7e222a61f88b1313273e6866dfc78d62b4d8ac93 Signed-off-by: pmikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/python')
-rw-r--r--resources/libraries/python/TrafficGenerator.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py
index 267f5d2f03..3f5cbe6675 100644
--- a/resources/libraries/python/TrafficGenerator.py
+++ b/resources/libraries/python/TrafficGenerator.py
@@ -132,8 +132,6 @@ class TrafficGenerator(object):
:return: nothing
"""
- trex_path = "/opt/trex-core-2.02"
-
topo = Topology()
if tg_node['type'] != NodeType.TG:
@@ -141,9 +139,19 @@ class TrafficGenerator(object):
self._node = tg_node
if tg_node['subtype'] == NodeSubTypeTG.TREX:
+ trex_path = "/opt/trex-core-2.03"
+
ssh = SSH()
ssh.connect(tg_node)
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sudo sh -c '/tmp/openvpp-testing/resources/tools/t-rex/"
+ "t-rex-installer.sh'", timeout=300)
+ if int(ret) != 0:
+ logger.error('trex installation failed: {0}'.format(
+ stdout + stderr))
+ raise RuntimeError('Installation of TG failed')
+
if1_pci = topo.get_interface_pci_addr(tg_node, tg_if1)
if2_pci = topo.get_interface_pci_addr(tg_node, tg_if2)
if1_mac = topo.get_interface_mac(tg_node, tg_if1)