Tools: User Latest Version of T-Rex. 63/71463/2
authoropensource-tnbt <sridhar.rao@spirent.com>
Mon, 23 Nov 2020 07:02:36 +0000 (12:32 +0530)
committeropensource-tnbt <sridhar.rao@spirent.com>
Mon, 23 Nov 2020 09:57:44 +0000 (15:27 +0530)
This patch upgrades the version of T-Rex to the latest one.
V2.86.
This patch is tested on Node-4 and Node-5, Intel Pod12.
Scapy all.py modification is not required for new version.

Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
Change-Id: I928cd3a92e59a90797ae8510a57f96487811f618

conf/03_traffic.conf
src/package-list.mk
src/trex/Makefile
tools/pkt_gen/trex/trex_client.py [moved from tools/pkt_gen/trex/trex.py with 99% similarity]

index d79b0b1..01747a3 100644 (file)
@@ -579,7 +579,7 @@ PATHS['trafficgen'] = {
     'Trex': {
         'type' : 'src',
         'src': {
-            'path': os.path.join(ROOT_DIR, 'src/trex/trex/scripts/automation/trex_control_plane/stl')
+            'path': os.path.join(ROOT_DIR, 'src/trex/trex/scripts/automation/trex_control_plane/interactive')
     }
   }
 }
index 11f876d..1e40a60 100644 (file)
@@ -29,4 +29,4 @@ QEMU_TAG ?= v3.1.1
 
 # TREX section
 TREX_URL ?= https://github.com/cisco-system-traffic-generator/trex-core.git
-TREX_TAG ?= v2.38
+TREX_TAG ?= v2.86
index 9a0704a..fd5c47b 100644 (file)
@@ -29,8 +29,8 @@ all: force_pull
 force_pull: $(TAG_DONE_FLAG)
        $(AT)cd $(WORK_DIR) && git pull $(TREX_URL) $(TREX_TAG)
        @echo "git pull done"
-       $(AT)wget https://raw.githubusercontent.com/phaethon/scapy/v0.18/scapy/layers/all.py -O $(WORK_DIR)/scripts/external_libs/scapy-2.3.1/python3/scapy/layers/all.py
-       @echo "orignal SCAPY 2.3.1 layers/all.py was restored"
+#      $(AT)wget https://raw.githubusercontent.com/phaethon/scapy/v0.18/scapy/layers/all.py -O $(WORK_DIR)/scripts/external_libs/scapy-2.3.1/python3/scapy/layers/all.py
+#      @echo "orignal SCAPY 2.3.1 layers/all.py was restored"
 
 $(WORK_DIR):
        $(AT)git clone $(TREX_URL) $(WORK_DIR)
similarity index 99%
rename from tools/pkt_gen/trex/trex.py
rename to tools/pkt_gen/trex/trex_client.py
index e2bc1e9..3d6836d 100644 (file)
@@ -26,7 +26,7 @@ import re
 from collections import OrderedDict
 # pylint: disable=unused-import
 import netaddr
-import zmq
+#import zmq
 from conf import settings
 from conf import merge_spec
 from core.results.results_constants import ResultsConstants
@@ -35,7 +35,7 @@ try:
     # pylint: disable=wrong-import-position, import-error
     sys.path.append(settings.getValue('PATHS')['trafficgen']['Trex']['src']['path'])
     from trex_stl_lib.api import *
-    from trex_stl_lib import trex_stl_exceptions
+    from trex_stl_lib import trex_stl_exceptions
 except ImportError:
     # VSPERF performs detection of T-Rex api during testcase initialization. So if
     # T-Rex is requsted and API is not available it will fail before this code
@@ -160,7 +160,7 @@ class Trex(ITrafficGenerator):
 
         try:
             self._stlclient = STLClient(username=self._trex_user, server=self._trex_host_ip_addr,
-                                        verbose_level=0)
+                                        verbose_level='info')
             self._stlclient.connect()
         except STLError:
             raise RuntimeError('T-Rex: Cannot connect to T-Rex server. Please check if it is '