:return: nothing
"""
- trex_path = "/opt/trex-core-2.02"
-
topo = Topology()
if tg_node['type'] != NodeType.TG:
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)
#!/bin/sh
-TREX_VERSION="2.02"
+TREX_VERSION="2.03"
TREX_DOWNLOAD_REPO="https://github.com/cisco-system-traffic-generator/trex-core/archive/"
TREX_DOWNLOAD_PACKAGE="v${TREX_VERSION}.zip"
trap cleanup EXIT
-test -d ${TREX_INSTALL_DIR} && echo "T-REX aleready installed: ${TREX_INSTALL_DIR}" && exit 1
+test -d ${TREX_INSTALL_DIR} && echo "T-REX aleready installed: ${TREX_INSTALL_DIR}" && exit 0
wget -P ${WORKING_DIR} ${TREX_PACKAGE_URL}
test $? -eq 0 || exit 1
import sys
-sys.path.insert(0, "/opt/trex-core-2.02/scripts/automation/"+\
+sys.path.insert(0, "/opt/trex-core-2.03/scripts/automation/"+\
"trex_control_plane/stl/")
from trex_stl_lib.api import *
import struct
import sys
-sys.path.insert(0, "/opt/trex-core-2.02/scripts/automation/"+\
+sys.path.insert(0, "/opt/trex-core-2.03/scripts/automation/"+\
"trex_control_plane/stl/")
from trex_stl_lib.api import *