summaryrefslogtreecommitdiffstats
path: root/scripts/automation
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation')
-rwxr-xr-xscripts/automation/config/trex-dev3.cfg2
-rwxr-xr-xscripts/automation/config/trex-esp80-hhaim.cfg2
-rwxr-xr-xscripts/automation/config/trex01-1g.cfg2
-rwxr-xr-xscripts/automation/regression/CProgressDisp.py4
-rw-r--r--scripts/automation/regression/functional_tests/config.yaml6
-rwxr-xr-xscripts/automation/regression/interfaces_e.py2
-rwxr-xr-xscripts/automation/regression/misc_methods.py2
-rwxr-xr-xscripts/automation/regression/setups/dave/benchmark.yaml2
-rwxr-xr-xscripts/automation/regression/setups/dave/config.yaml6
-rw-r--r--scripts/automation/regression/setups/dummy/config.yaml2
-rw-r--r--scripts/automation/regression/setups/kiwi02/config.yaml6
-rw-r--r--scripts/automation/regression/setups/trex-dan/config.yaml6
-rw-r--r--scripts/automation/regression/setups/trex04/benchmark.yaml2
-rw-r--r--scripts/automation/regression/setups/trex04/config.yaml6
-rw-r--r--scripts/automation/regression/setups/trex07/config.yaml6
-rw-r--r--scripts/automation/regression/setups/trex08/config.yaml6
-rw-r--r--scripts/automation/regression/setups/trex09/benchmark.yaml2
-rw-r--r--scripts/automation/regression/setups/trex09/config.yaml6
-rw-r--r--scripts/automation/regression/setups/trex10/benchmark.yaml2
-rw-r--r--scripts/automation/regression/setups/trex10/config.yaml6
-rw-r--r--scripts/automation/regression/setups/trex11/config.yaml6
-rw-r--r--scripts/automation/regression/setups/trex12/config.yaml6
-rw-r--r--scripts/automation/regression/setups/trex14/config.yaml6
-rw-r--r--scripts/automation/regression/setups/trex17/benchmark.yaml2
-rw-r--r--scripts/automation/regression/setups/trex17/config.yaml6
-rw-r--r--scripts/automation/regression/setups/trex25/config.yaml6
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_general_test.py22
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_imix_test.py2
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_ipv6_test.py2
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_nat_test.py4
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_nbar_test.py2
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_rx_test.py2
-rwxr-xr-xscripts/automation/regression/stateless_tests/stl_examples_test.py27
-rw-r--r--scripts/automation/regression/stateless_tests/stl_general_test.py17
-rwxr-xr-xscripts/automation/regression/stateless_tests/trex_client_pkg_test.py26
-rw-r--r--scripts/automation/regression/trex.py28
-rwxr-xr-xscripts/automation/regression/trex_unit_test.py6
-rw-r--r--scripts/automation/trex_control_plane/common/trex_status.py2
-rwxr-xr-xscripts/automation/trex_control_plane/server/trex_server.py8
-rw-r--r--scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_status.py2
40 files changed, 136 insertions, 124 deletions
diff --git a/scripts/automation/config/trex-dev3.cfg b/scripts/automation/config/trex-dev3.cfg
index 0d0801e9..f71a9493 100755
--- a/scripts/automation/config/trex-dev3.cfg
+++ b/scripts/automation/config/trex-dev3.cfg
@@ -5,7 +5,7 @@
# machine_typ - 1G or 10G TRex machine
# config_file - [Optional] configuration file for TRex if needed
# is_dual - should the TRex inject with -p ?
-# version_pat - path to the t-rex version and executable
+# version_pat - path to the TRex version and executable
# exec - executable name (which will be under the version_path)
# cores - how many cores should be used
# limit-ports - how many ports should be used
diff --git a/scripts/automation/config/trex-esp80-hhaim.cfg b/scripts/automation/config/trex-esp80-hhaim.cfg
index fa5414d4..56b7ad01 100755
--- a/scripts/automation/config/trex-esp80-hhaim.cfg
+++ b/scripts/automation/config/trex-esp80-hhaim.cfg
@@ -5,7 +5,7 @@
# machine_type - 1G or 10G TRex machine
# config_file - configuration file for TRex, can be "" if default
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# exec - executable name (which will be under the version_path)
# cores - how many cores should be used
# limit-ports - how many ports should be used
diff --git a/scripts/automation/config/trex01-1g.cfg b/scripts/automation/config/trex01-1g.cfg
index 98953cae..cf4a7f2a 100755
--- a/scripts/automation/config/trex01-1g.cfg
+++ b/scripts/automation/config/trex01-1g.cfg
@@ -5,7 +5,7 @@
# machine_typ - 1G or 10G TRex machine
# config_file - [Optional] configuration file for TRex if needed
# is_dual - should the TRex inject with -p ?
-# version_pat - path to the t-rex version and executable
+# version_pat - path to the TRex version and executable
# exec - executable name (which will be under the version_path)
# cores - how many cores should be used
# limit-ports - how many ports should be used
diff --git a/scripts/automation/regression/CProgressDisp.py b/scripts/automation/regression/CProgressDisp.py
index b911c527..18df2f43 100755
--- a/scripts/automation/regression/CProgressDisp.py
+++ b/scripts/automation/regression/CProgressDisp.py
@@ -36,7 +36,7 @@ class TimedProgressBar(threading.Thread):
self.stoprequest = threading.Event()
self.stopFlag = False
self.time_in_secs = time_in_secs + 15 # 80 # taking 15 seconds extra
- widgets = ['Running T-Rex: ', progressbar.Percentage(), ' ',
+ widgets = ['Running TRex: ', progressbar.Percentage(), ' ',
progressbar.Bar(marker='>',left='[',right=']'),
' ', progressbar.ETA()]
self.pbar = progressbar.ProgressBar(widgets=widgets, maxval=self.time_in_secs*2)
@@ -73,7 +73,7 @@ class TimedProgressBar(threading.Thread):
def timedProgressBar(time_in_secs):
- widgets = ['Running T-Rex: ', progressbar.Percentage(), ' ',
+ widgets = ['Running TRex: ', progressbar.Percentage(), ' ',
Bar(marker='>',left='[',right=']'),
' ', progressbar.ETA()]
pbar = progressbar.ProgressBar(widgets=widgets, maxval=time_in_secs*2)
diff --git a/scripts/automation/regression/functional_tests/config.yaml b/scripts/automation/regression/functional_tests/config.yaml
index 4f4c7c40..e1bc2016 100644
--- a/scripts/automation/regression/functional_tests/config.yaml
+++ b/scripts/automation/regression/functional_tests/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the TRex
diff --git a/scripts/automation/regression/interfaces_e.py b/scripts/automation/regression/interfaces_e.py
index 15301623..0c2ce5d2 100755
--- a/scripts/automation/regression/interfaces_e.py
+++ b/scripts/automation/regression/interfaces_e.py
@@ -4,5 +4,5 @@ import outer_packages
from enum import Enum
-# define the states in which a T-Rex can hold during its lifetime
+# define the states in which a TRex can hold during its lifetime
IFType = Enum('IFType', 'Client Server All')
diff --git a/scripts/automation/regression/misc_methods.py b/scripts/automation/regression/misc_methods.py
index 41e8e125..99071f81 100755
--- a/scripts/automation/regression/misc_methods.py
+++ b/scripts/automation/regression/misc_methods.py
@@ -130,7 +130,7 @@ def load_complete_config_file (filepath):
with open(filepath, 'r') as f:
config = yaml.load(f)
- # Handle T-Rex configuration
+ # Handle TRex configuration
trex_config['trex_name'] = config["trex"]["hostname"]
trex_config['trex_password'] = config["trex"].get("password")
#trex_config['trex_is_dual'] = config["trex"]["is_dual"]
diff --git a/scripts/automation/regression/setups/dave/benchmark.yaml b/scripts/automation/regression/setups/dave/benchmark.yaml
index 0427f9a1..aac2d805 100755
--- a/scripts/automation/regression/setups/dave/benchmark.yaml
+++ b/scripts/automation/regression/setups/dave/benchmark.yaml
@@ -1,5 +1,5 @@
################################################################
-#### T-Rex benchmark configuration file ####
+#### TRex benchmark configuration file ####
################################################################
test_nbar_simple :
diff --git a/scripts/automation/regression/setups/dave/config.yaml b/scripts/automation/regression/setups/dave/config.yaml
index 66e92097..8aa763bc 100755
--- a/scripts/automation/regression/setups/dave/config.yaml
+++ b/scripts/automation/regression/setups/dave/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the TRex
# modes - list of modes (tagging) of this setup (loopback, virtual etc.)
diff --git a/scripts/automation/regression/setups/dummy/config.yaml b/scripts/automation/regression/setups/dummy/config.yaml
index 8426ec6c..16e3b0cc 100644
--- a/scripts/automation/regression/setups/dummy/config.yaml
+++ b/scripts/automation/regression/setups/dummy/config.yaml
@@ -1,5 +1,5 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
diff --git a/scripts/automation/regression/setups/kiwi02/config.yaml b/scripts/automation/regression/setups/kiwi02/config.yaml
index 1154b558..d6c13a22 100644
--- a/scripts/automation/regression/setups/kiwi02/config.yaml
+++ b/scripts/automation/regression/setups/kiwi02/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the TRex
# modes - list of modes (tagging) of this setup (loopback, virtual etc.)
diff --git a/scripts/automation/regression/setups/trex-dan/config.yaml b/scripts/automation/regression/setups/trex-dan/config.yaml
index 5f91ea6a..c95dfa37 100644
--- a/scripts/automation/regression/setups/trex-dan/config.yaml
+++ b/scripts/automation/regression/setups/trex-dan/config.yaml
@@ -1,12 +1,12 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the TRex
# modes - list of modes (tagging) of this setup (loopback, virtual etc.)
diff --git a/scripts/automation/regression/setups/trex04/benchmark.yaml b/scripts/automation/regression/setups/trex04/benchmark.yaml
index 7b850d8e..b366b3fb 100644
--- a/scripts/automation/regression/setups/trex04/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex04/benchmark.yaml
@@ -1,5 +1,5 @@
################################################################
-#### T-Rex benchmark configuration file ####
+#### TRex benchmark configuration file ####
################################################################
### stateful ###
diff --git a/scripts/automation/regression/setups/trex04/config.yaml b/scripts/automation/regression/setups/trex04/config.yaml
index 5fd20667..bf1c68e6 100644
--- a/scripts/automation/regression/setups/trex04/config.yaml
+++ b/scripts/automation/regression/setups/trex04/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the Trex
# modes - list of modes (tagging) of this setup (loopback, virtual etc.)
diff --git a/scripts/automation/regression/setups/trex07/config.yaml b/scripts/automation/regression/setups/trex07/config.yaml
index beb73435..db6e9bf8 100644
--- a/scripts/automation/regression/setups/trex07/config.yaml
+++ b/scripts/automation/regression/setups/trex07/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the TRex
# modes - list of modes (tagging) of this setup (loopback etc.)
diff --git a/scripts/automation/regression/setups/trex08/config.yaml b/scripts/automation/regression/setups/trex08/config.yaml
index a7b02e57..affe9bc9 100644
--- a/scripts/automation/regression/setups/trex08/config.yaml
+++ b/scripts/automation/regression/setups/trex08/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the TRex
# modes - list of modes (tagging) of this setup (loopback etc.)
diff --git a/scripts/automation/regression/setups/trex09/benchmark.yaml b/scripts/automation/regression/setups/trex09/benchmark.yaml
index 5bce90ca..1ddd6f03 100644
--- a/scripts/automation/regression/setups/trex09/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex09/benchmark.yaml
@@ -1,5 +1,5 @@
################################################################
-#### T-Rex benchmark configuration file ####
+#### TRex benchmark configuration file ####
################################################################
### stateful ###
diff --git a/scripts/automation/regression/setups/trex09/config.yaml b/scripts/automation/regression/setups/trex09/config.yaml
index 585ca17a..724de6e7 100644
--- a/scripts/automation/regression/setups/trex09/config.yaml
+++ b/scripts/automation/regression/setups/trex09/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the TRex
# modes - list of modes (tagging) of this setup (loopback, virtual etc.)
diff --git a/scripts/automation/regression/setups/trex10/benchmark.yaml b/scripts/automation/regression/setups/trex10/benchmark.yaml
index 999eff3d..fb900cbb 100644
--- a/scripts/automation/regression/setups/trex10/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex10/benchmark.yaml
@@ -1,5 +1,5 @@
################################################################
-#### T-Rex benchmark configuration file ####
+#### TRex benchmark configuration file ####
################################################################
diff --git a/scripts/automation/regression/setups/trex10/config.yaml b/scripts/automation/regression/setups/trex10/config.yaml
index 093911a9..8b031c88 100644
--- a/scripts/automation/regression/setups/trex10/config.yaml
+++ b/scripts/automation/regression/setups/trex10/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the Trex
# modes - list of modes (tagging) of this setup (loopback, virtual etc.)
diff --git a/scripts/automation/regression/setups/trex11/config.yaml b/scripts/automation/regression/setups/trex11/config.yaml
index 7bb5b6d4..b57b302d 100644
--- a/scripts/automation/regression/setups/trex11/config.yaml
+++ b/scripts/automation/regression/setups/trex11/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the TRex
# modes - list of modes (tagging) of this setup (loopback, virtual etc.)
diff --git a/scripts/automation/regression/setups/trex12/config.yaml b/scripts/automation/regression/setups/trex12/config.yaml
index 56471ac7..f25b3395 100644
--- a/scripts/automation/regression/setups/trex12/config.yaml
+++ b/scripts/automation/regression/setups/trex12/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the TRex
# modes - list of modes (tagging) of this setup (loopback etc.)
diff --git a/scripts/automation/regression/setups/trex14/config.yaml b/scripts/automation/regression/setups/trex14/config.yaml
index 1a528a9b..0fd6b70e 100644
--- a/scripts/automation/regression/setups/trex14/config.yaml
+++ b/scripts/automation/regression/setups/trex14/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the TRex
# modes - list of modes (tagging) of this setup (loopback etc.)
diff --git a/scripts/automation/regression/setups/trex17/benchmark.yaml b/scripts/automation/regression/setups/trex17/benchmark.yaml
index 6fa28f16..c6f588e6 100644
--- a/scripts/automation/regression/setups/trex17/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex17/benchmark.yaml
@@ -1,5 +1,5 @@
################################################################
-#### T-Rex benchmark configuration file ####
+#### TRex benchmark configuration file ####
################################################################
### stateful ###
diff --git a/scripts/automation/regression/setups/trex17/config.yaml b/scripts/automation/regression/setups/trex17/config.yaml
index f67c99d8..7ad6a20a 100644
--- a/scripts/automation/regression/setups/trex17/config.yaml
+++ b/scripts/automation/regression/setups/trex17/config.yaml
@@ -1,13 +1,13 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# password - root password for TRex machine
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the Trex
# modes - list of modes (tagging) of this setup (loopback, virtual etc.)
diff --git a/scripts/automation/regression/setups/trex25/config.yaml b/scripts/automation/regression/setups/trex25/config.yaml
index 821208a5..4fdb8814 100644
--- a/scripts/automation/regression/setups/trex25/config.yaml
+++ b/scripts/automation/regression/setups/trex25/config.yaml
@@ -1,12 +1,12 @@
################################################################
-#### T-Rex nightly test configuration file ####
+#### TRex nightly test configuration file ####
################################################################
-### T-Rex configuration:
+### TRex configuration:
# hostname - can be DNS name or IP for the TRex machine for ssh to the box
# is_dual - should the TRex inject with -p ?
-# version_path - path to the t-rex version and executable
+# version_path - path to the TRex version and executable
# cores - how many cores should be used
# latency - rate of latency packets injected by the TRex
# modes - list of modes (tagging) of this setup (loopback, virtual etc.)
diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py
index d2aaefa9..86fe93e7 100755
--- a/scripts/automation/regression/stateful_tests/trex_general_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_general_test.py
@@ -9,8 +9,8 @@ Name:
Description:
- This script creates the functionality to test the performance of the T-Rex traffic generator
- The tested scenario is a T-Rex TG directly connected to a Cisco router.
+ This script creates the functionality to test the performance of the TRex traffic generator
+ The tested scenario is a TRex TG directly connected to a Cisco router.
::
@@ -18,7 +18,7 @@ Description:
------- --------
| | Tx---1gig/10gig----Rx | |
- | T-Rex | | router |
+ | TRex | | router |
| | Rx---1gig/10gig----Tx | |
------- --------
@@ -46,7 +46,7 @@ def tearDownModule(module):
pass
class CTRexGeneral_Test(unittest.TestCase):
- """This class defines the general stateful testcase of the T-Rex traffic generator"""
+ """This class defines the general stateful testcase of the TRex traffic generator"""
def __init__ (self, *args, **kwargs):
sys.stdout.flush()
unittest.TestCase.__init__(self, *args, **kwargs)
@@ -102,7 +102,7 @@ class CTRexGeneral_Test(unittest.TestCase):
print(termstyle.green('\t!!!\tRunning with modes: %s, not suitable tests will be skipped.\t!!!' % list(self.modes)))
CTRexScenario.is_init = True
- print(termstyle.green("Done instantiating T-Rex scenario!\n"))
+ print(termstyle.green("Done instantiating TRex scenario!\n"))
# raise RuntimeError('CTRexScenario class is not initialized!')
self.router = CTRexScenario.router
@@ -205,17 +205,17 @@ class CTRexGeneral_Test(unittest.TestCase):
try:
# check if test is valid
if not trex_res.is_done_warmup():
- self.fail('T-Rex did not reach warm-up situtaion. Results are not valid.')
+ self.fail('TRex did not reach warm-up situtaion. Results are not valid.')
# check history size is enough
if len(trex_res._history) < 5:
- self.fail('T-Rex results list is too short. Increase the test duration or check unexpected stopping.')
+ self.fail('TRex results list is too short. Increase the test duration or check unexpected stopping.')
- # check T-Rex number of drops
+ # check TRex number of drops
trex_tx_pckt = trex_res.get_last_value("trex-global.data.m_total_tx_pkts")
trex_drops = trex_res.get_total_drops()
trex_drop_rate = trex_res.get_drop_rate()
- if ( trex_drops > 0.001 * trex_tx_pckt) and (trex_drop_rate > 0.0): # deliberately mask kickoff drops when T-Rex first initiated
+ if ( trex_drops > 0.001 * trex_tx_pckt) and (trex_drop_rate > 0.0): # deliberately mask kickoff drops when TRex first initiated
self.fail('Number of packet drops larger than 0.1% of all traffic')
# check queue full, queue drop, allocation error
@@ -231,7 +231,7 @@ class CTRexGeneral_Test(unittest.TestCase):
allowed_queue_full = 1000 + trex_tx_pckt / 1000
self.assert_gt(allowed_queue_full, m_total_queue_full, 'Too much queue_full (%s), please review multiplier.' % m_total_queue_full)
- # # check T-Rex expected counters
+ # # check TRex expected counters
#trex_exp_rate = trex_res.get_expected_tx_rate().get('m_tx_expected_bps')
#assert trex_exp_rate is not None
#trex_exp_gbps = trex_exp_rate/(10**9)
@@ -271,7 +271,7 @@ class CTRexGeneral_Test(unittest.TestCase):
#assert False
# except AssertionError as e:
- # e.args += ('T-Rex has crashed!')
+ # e.args += ('TRex has crashed!')
# raise
@staticmethod
diff --git a/scripts/automation/regression/stateful_tests/trex_imix_test.py b/scripts/automation/regression/stateful_tests/trex_imix_test.py
index cafa1c55..f8fe0ed1 100755
--- a/scripts/automation/regression/stateful_tests/trex_imix_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_imix_test.py
@@ -7,7 +7,7 @@ import time
from nose.tools import nottest
class CTRexIMIX_Test(CTRexGeneral_Test):
- """This class defines the IMIX testcase of the T-Rex traffic generator"""
+ """This class defines the IMIX testcase of the TRex traffic generator"""
def __init__(self, *args, **kwargs):
# super(CTRexIMIX_Test, self).__init__()
CTRexGeneral_Test.__init__(self, *args, **kwargs)
diff --git a/scripts/automation/regression/stateful_tests/trex_ipv6_test.py b/scripts/automation/regression/stateful_tests/trex_ipv6_test.py
index 6aba9ae0..b03de0b4 100755
--- a/scripts/automation/regression/stateful_tests/trex_ipv6_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_ipv6_test.py
@@ -5,7 +5,7 @@ import time
from nose.tools import assert_equal
class CTRexIPv6_Test(CTRexGeneral_Test):
- """This class defines the IPv6 testcase of the T-Rex traffic generator"""
+ """This class defines the IPv6 testcase of the TRex traffic generator"""
def __init__(self, *args, **kwargs):
super(CTRexIPv6_Test, self).__init__(*args, **kwargs)
diff --git a/scripts/automation/regression/stateful_tests/trex_nat_test.py b/scripts/automation/regression/stateful_tests/trex_nat_test.py
index b2df684d..6e030ffe 100755
--- a/scripts/automation/regression/stateful_tests/trex_nat_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_nat_test.py
@@ -7,7 +7,7 @@ from nose.tools import assert_equal
class CTRexNoNat_Test(CTRexGeneral_Test):#(unittest.TestCase):
- """This class defines the NAT testcase of the T-Rex traffic generator"""
+ """This class defines the NAT testcase of the TRex traffic generator"""
def __init__(self, *args, **kwargs):
super(CTRexNoNat_Test, self).__init__(*args, **kwargs)
self.unsupported_modes = ['loopback'] # NAT requires device
@@ -73,7 +73,7 @@ class CTRexNoNat_Test(CTRexGeneral_Test):#(unittest.TestCase):
class CTRexNat_Test(CTRexGeneral_Test):#(unittest.TestCase):
- """This class defines the NAT testcase of the T-Rex traffic generator"""
+ """This class defines the NAT testcase of the TRex traffic generator"""
def __init__(self, *args, **kwargs):
super(CTRexNat_Test, self).__init__(*args, **kwargs)
self.unsupported_modes = ['loopback'] # NAT requires device
diff --git a/scripts/automation/regression/stateful_tests/trex_nbar_test.py b/scripts/automation/regression/stateful_tests/trex_nbar_test.py
index fa3f3485..6611ac96 100755
--- a/scripts/automation/regression/stateful_tests/trex_nbar_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_nbar_test.py
@@ -6,7 +6,7 @@ from nose.tools import nottest
from misc_methods import print_r
class CTRexNbar_Test(CTRexGeneral_Test):
- """This class defines the NBAR testcase of the T-Rex traffic generator"""
+ """This class defines the NBAR testcase of the TRex traffic generator"""
def __init__(self, *args, **kwargs):
super(CTRexNbar_Test, self).__init__(*args, **kwargs)
self.unsupported_modes = ['loopback'] # obviously no NBar in loopback
diff --git a/scripts/automation/regression/stateful_tests/trex_rx_test.py b/scripts/automation/regression/stateful_tests/trex_rx_test.py
index c097b180..40528d16 100755
--- a/scripts/automation/regression/stateful_tests/trex_rx_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_rx_test.py
@@ -9,7 +9,7 @@ from nose.tools import nottest
import traceback
class CTRexRx_Test(CTRexGeneral_Test):
- """This class defines the rx testcase of the T-Rex traffic generator"""
+ """This class defines the rx testcase of the TRex traffic generator"""
def __init__(self, *args, **kwargs):
CTRexGeneral_Test.__init__(self, *args, **kwargs)
self.unsupported_modes = ['virt_nics'] # TODO: fix
diff --git a/scripts/automation/regression/stateless_tests/stl_examples_test.py b/scripts/automation/regression/stateless_tests/stl_examples_test.py
index 283635a7..d8b85dfc 100755
--- a/scripts/automation/regression/stateless_tests/stl_examples_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_examples_test.py
@@ -2,23 +2,22 @@
from .stl_general_test import CStlGeneral_Test, CTRexScenario
import os, sys
from misc_methods import run_command
-from time import sleep
-def setUpModule(self):
- # examples connect by their own
- if CTRexScenario.stl_trex.is_connected():
- CTRexScenario.stl_trex.disconnect()
- sleep(3)
-
-def tearDownModule():
- # connect back at end of tests
- if not CTRexScenario.stl_trex.is_connected():
- CTRexScenario.stl_trex.connect()
+class STLExamples_Test(CStlGeneral_Test):
+ """This class defines the IMIX testcase of the TRex traffic generator"""
+ def explicitSetUp(self):
+ # examples connect by their own
+ if self.is_connected():
+ self.recover_after_trex_210_issue()
+ CTRexScenario.stl_trex.disconnect()
-class STLExamples_Test(CStlGeneral_Test):
- """This class defines the IMIX testcase of the T-Rex traffic generator"""
+ def explicitTearDown(self):
+ # connect back at end of tests
+ if not self.is_connected():
+ self.stl_trex.connect()
+ self.recover_after_trex_210_issue()
def test_stl_examples(self):
examples_dir = '../trex_control_plane/stl/examples'
@@ -27,6 +26,8 @@ class STLExamples_Test(CStlGeneral_Test):
]
for example in examples_to_test:
+ self.explicitSetUp()
return_code, stdout, stderr = run_command("sh -c 'cd %s; %s %s -s %s'" % (examples_dir, sys.executable, example, CTRexScenario.configuration.trex['trex_name']))
+ self.explicitTearDown()
assert return_code == 0, 'example %s failed.\nstdout: %s\nstderr: %s' % (return_code, stdout, stderr)
diff --git a/scripts/automation/regression/stateless_tests/stl_general_test.py b/scripts/automation/regression/stateless_tests/stl_general_test.py
index ee0f8050..09b84222 100644
--- a/scripts/automation/regression/stateless_tests/stl_general_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_general_test.py
@@ -6,6 +6,9 @@ from trex_stl_lib.api import *
import time
from nose.tools import nottest
+def setUpModule():
+ if CTRexScenario.stl_trex.is_connected():
+ CStlGeneral_Test.recover_after_trex_210_issue()
class CStlGeneral_Test(CTRexGeneral_Test):
"""This class defines the general stateless testcase of the T-Rex traffic generator"""
@@ -16,14 +19,20 @@ class CStlGeneral_Test(CTRexGeneral_Test):
# check basic requirements, should be verified at test_connectivity, here only skip test
if CTRexScenario.stl_init_error:
self.skip(CTRexScenario.stl_init_error)
- for i in range(20): # workaround of http://trex-tgn.cisco.com/youtrack/issue/trex-210
+
+ # workaround of http://trex-tgn.cisco.com/youtrack/issue/trex-210
+ @staticmethod
+ def recover_after_trex_210_issue():
+ for i in range(20):
try:
- self.map_ports()
+ stl_map_ports(CTRexScenario.stl_trex)
break
except:
- self.stl_trex.disconnect()
+ CTRexScenario.stl_trex.disconnect()
time.sleep(0.5)
- self.stl_trex.connect()
+ CTRexScenario.stl_trex.connect()
+ # verify problem is solved
+ stl_map_ports(CTRexScenario.stl_trex)
def connect(self, timeout = 100):
# need delay and check only because TRex process might be still starting
diff --git a/scripts/automation/regression/stateless_tests/trex_client_pkg_test.py b/scripts/automation/regression/stateless_tests/trex_client_pkg_test.py
index e94468e2..905882fe 100755
--- a/scripts/automation/regression/stateless_tests/trex_client_pkg_test.py
+++ b/scripts/automation/regression/stateless_tests/trex_client_pkg_test.py
@@ -2,26 +2,28 @@
from .stl_general_test import CStlGeneral_Test, CTRexScenario
from misc_methods import run_command
from nose.plugins.attrib import attr
-from time import sleep
-
def setUpModule():
- # examples connect by their own
CStlGeneral_Test.unzip_client_package()
- if CTRexScenario.stl_trex.is_connected():
- CTRexScenario.stl_trex.disconnect()
- sleep(3)
-
-def tearDownModule():
- # connect back at end of tests
- if not CTRexScenario.stl_trex.is_connected():
- CTRexScenario.stl_trex.connect()
-
@attr('client_package')
class CTRexClientPKG_Test(CStlGeneral_Test):
"""This class tests TRex client package"""
+ def setUp(self):
+ CStlGeneral_Test.setUp(self)
+ # examples connect by their own
+ if CTRexScenario.stl_trex.is_connected():
+ self.recover_after_trex_210_issue()
+ CTRexScenario.stl_trex.disconnect()
+
+ def tearDown(self):
+ # connect back at end of tests
+ if not CTRexScenario.stl_trex.is_connected():
+ CTRexScenario.stl_trex.connect()
+ self.recover_after_trex_210_issue()
+ CStlGeneral_Test.tearDown(self)
+
def run_client_package_stl_example(self, python_version):
commands = [
'cd %s' % CTRexScenario.scripts_path,
diff --git a/scripts/automation/regression/trex.py b/scripts/automation/regression/trex.py
index 2c55aad2..a0a1d42d 100644
--- a/scripts/automation/regression/trex.py
+++ b/scripts/automation/regression/trex.py
@@ -50,14 +50,14 @@ class CTRexRunner:
def get_config (self):
""" get_config() -> dict
- Returns the stored configuration of the T-Rex server of the CTRexRunner instance as a dictionary
+ Returns the stored configuration of the TRex server of the CTRexRunner instance as a dictionary
"""
return self.trex_config
def set_yaml_file (self, yaml_path):
""" update_yaml_file (self, yaml_path) -> None
- Defines the yaml file to be used by the T-Rex.
+ Defines the yaml file to be used by the TRex.
"""
self.yaml = yaml_path
@@ -65,13 +65,13 @@ class CTRexRunner:
def generate_run_cmd (self, multiplier, cores, duration, nc = True, export_path="/tmp/trex.txt", **kwargs):
""" generate_run_cmd(self, multiplier, duration, export_path) -> str
- Generates a custom running command for the kick-off of the T-Rex traffic generator.
+ Generates a custom running command for the kick-off of the TRex traffic generator.
Returns a command (string) to be issued on the trex server
Parameters
----------
multiplier : float
- Defines the T-Rex multiplier factor (platform dependant)
+ Defines the TRex multiplier factor (platform dependant)
duration : int
Defines the duration of the test
export_path : str
@@ -80,7 +80,7 @@ class CTRexRunner:
"""
fileName, fileExtension = os.path.splitext(self.yaml)
if self.yaml == None:
- raise ValueError('T-Rex yaml file is not defined')
+ raise ValueError('TRex yaml file is not defined')
elif fileExtension != '.yaml':
raise TypeError('yaml path is not referencing a .yaml file')
@@ -106,7 +106,7 @@ class CTRexRunner:
else:
trex_cmd += (dash + '{k} {val}'.format( k = tmp_key, val = value ))
- print("\nT-REX COMMAND: ", trex_cmd)
+ print("\nTRex COMMAND: ", trex_cmd)
cmd = 'sshpass.exp %s %s root "cd %s; %s > %s"' % (self.trex_config['trex_password'],
self.trex_config['trex_name'],
@@ -119,7 +119,7 @@ class CTRexRunner:
def generate_fetch_cmd (self, result_file_full_path="/tmp/trex.txt"):
""" generate_fetch_cmd(self, result_file_full_path) -> str
- Generates a custom command for which will enable to fetch the resutls of the T-Rex run.
+ Generates a custom command for which will enable to fetch the resutls of the TRex run.
Returns a command (string) to be issued on the trex server.
Example use: fetch_trex_results() - command that will fetch the content from the default log file- /tmp/trex.txt
@@ -137,13 +137,13 @@ class CTRexRunner:
def run (self, multiplier, cores, duration, **kwargs):
""" run(self, multiplier, duration, results_file_path) -> CTRexResults
- Running the T-Rex server based on the config file.
+ Running the TRex server based on the config file.
Returns a CTRexResults object containing the results of the run.
Parameters
----------
multiplier : float
- Defines the T-Rex multiplier factor (platform dependant)
+ Defines the TRex multiplier factor (platform dependant)
duration : int
Defines the duration of the test
results_file_path : str
@@ -159,7 +159,7 @@ class CTRexRunner:
else:
cmd = self.generate_run_cmd(multiplier, cores, duration, **kwargs)
-# print 'T-REx complete command to be used:'
+# print 'TRex complete command to be used:'
# print cmd
# print kwargs
@@ -179,13 +179,13 @@ class CTRexRunner:
# If the run stopped immediately - classify as Trex in use or reachability issue
interrupted = True
if ((end_time - start_time) < 2):
- raise TRexInUseError ('T-Rex run failed since T-Rex is used by another process, or due to reachability issues')
+ raise TRexInUseError ('TRex run failed since TRex is used by another process, or due to reachability issues')
else:
CTRexScenario.trex_crashed = True
# results = subprocess.Popen(cmd, stdout = open(os.devnull, 'wb'),
# shell=True, preexec_fn=os.setsid)
except KeyboardInterrupt:
- print("\nT-Rex test interrupted by user during traffic generation!!")
+ print("\nTRex test interrupted by user during traffic generation!!")
results.killpg(results.pid, signal.SIGTERM) # Send the kill signal to all the process groups
interrupted = True
raise RuntimeError
@@ -193,11 +193,11 @@ class CTRexRunner:
progress_thread.join(isPlannedStop = (not interrupted) )
if results!=0:
- sys.stderr.write("T-Rex run failed. Please Contact trex-dev mailer for further details")
+ sys.stderr.write("TRex run failed. Please Contact trex-dev mailer for further details")
sys.stderr.flush()
return None
elif interrupted:
- sys.stderr.write("T-Rex run failed due user-interruption.")
+ sys.stderr.write("TRex run failed due user-interruption.")
sys.stderr.flush()
return None
else:
diff --git a/scripts/automation/regression/trex_unit_test.py b/scripts/automation/regression/trex_unit_test.py
index a272fe7b..320a4346 100755
--- a/scripts/automation/regression/trex_unit_test.py
+++ b/scripts/automation/regression/trex_unit_test.py
@@ -9,8 +9,8 @@ Name:
Description:
- This script creates the functionality to test the performance of the T-Rex traffic generator
- The tested scenario is a T-Rex TG directly connected to a Cisco router.
+ This script creates the functionality to test the performance of the TRex traffic generator
+ The tested scenario is a TRex TG directly connected to a Cisco router.
::
@@ -18,7 +18,7 @@ Description:
------- --------
| | Tx---1gig/10gig----Rx | |
- | T-Rex | | router |
+ | TRex | | router |
| | Rx---1gig/10gig----Tx | |
------- --------
diff --git a/scripts/automation/trex_control_plane/common/trex_status.py b/scripts/automation/trex_control_plane/common/trex_status.py
index f132720c..8f2859d1 100644
--- a/scripts/automation/trex_control_plane/common/trex_status.py
+++ b/scripts/automation/trex_control_plane/common/trex_status.py
@@ -1,6 +1,6 @@
#!/router/bin/python
-# define the states in which a T-Rex can hold during its lifetime
+# define the states in which a TRex can hold during its lifetime
# TRexStatus = Enum('TRexStatus', 'Idle Starting Running')
IDLE = 1
diff --git a/scripts/automation/trex_control_plane/server/trex_server.py b/scripts/automation/trex_control_plane/server/trex_server.py
index 3dcb3e97..81f3d28f 100755
--- a/scripts/automation/trex_control_plane/server/trex_server.py
+++ b/scripts/automation/trex_control_plane/server/trex_server.py
@@ -46,7 +46,7 @@ class CTRexServer(object):
Parameters
----------
trex_host : str
- a string of the t-rex ip address or hostname.
+ a string of the TRex ip address or hostname.
default value: machine hostname as fetched from socket.gethostname()
trex_daemon_port : int
the port number on which the trex-daemon server can be reached
@@ -243,7 +243,7 @@ class CTRexServer(object):
logger.error(err_str)
return Fault(-33, err_str)
- def stop_handler (self, signum, frame):
+ def stop_handler (self, *args, **kwargs):
logger.info("Daemon STOP request detected.")
if self.is_running():
# in case TRex process is currently running, stop it before terminating server process
@@ -559,13 +559,13 @@ class CTRex(object):
def stop_trex(self):
if self.status == TRexStatus.Idle:
- # t-rex isn't running, nothing to abort
+ # TRex isn't running, nothing to abort
logger.info("TRex isn't running. No need to stop anything.")
if self.errcode is not None: # some error occurred, notify client despite TRex already stopped
return Fault(self.errcode, self.verbose_status) # raise at client relevant exception, depending on the reason the error occured
return False
else:
- # handle stopping t-rex's run
+ # handle stopping TRex's run
self.session.join()
logger.info("TRex session has been successfully aborted.")
return True
diff --git a/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_status.py b/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_status.py
index f132720c..8f2859d1 100644
--- a/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_status.py
+++ b/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_status.py
@@ -1,6 +1,6 @@
#!/router/bin/python
-# define the states in which a T-Rex can hold during its lifetime
+# define the states in which a TRex can hold during its lifetime
# TRexStatus = Enum('TRexStatus', 'Idle Starting Running')
IDLE = 1