aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/TrafficGenerator.py
diff options
context:
space:
mode:
authorMaros Mullner <maros.mullner@pantheon.tech>2020-02-17 13:01:00 +0100
committerPeter Mikus <pmikus@cisco.com>2020-02-18 07:34:22 +0000
commiteb774c3e205a538262aef928bfbed17cd5be7b25 (patch)
tree6b25b69f1ea633c961604ec8ba0b6778db55b364 /resources/libraries/python/TrafficGenerator.py
parentc8bc6ec55a9331c420b4d269c4dbab91d6f1ca76 (diff)
Add option to run Trex with --force parameter to start
regardless of ports state. Signed-off-by: Maros Mullner <maros.mullner@pantheon.tech> Change-Id: Iaafb5ff3a53a290ca79506bdb559a32d39570482
Diffstat (limited to 'resources/libraries/python/TrafficGenerator.py')
-rw-r--r--resources/libraries/python/TrafficGenerator.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py
index 1b519d5713..f48792db3d 100644
--- a/resources/libraries/python/TrafficGenerator.py
+++ b/resources/libraries/python/TrafficGenerator.py
@@ -519,17 +519,19 @@ class TrafficGenerator(AbstractMeasurer):
warmup_time = float(warmup_time)
command = f"sh -c \"" \
f"{Constants.REMOTE_FW_DIR}/resources/tools/trex/" \
- f"trex_stateless_profile.py" \
- f" --profile {Constants.REMOTE_FW_DIR}/resources/" \
- f"traffic_profiles/trex/{traffic_profile}.py" \
- f" --duration {duration!r} --frame_size {frame_size} " \
+ f"trex_stateless_profile.py " \
+ f"--profile {Constants.REMOTE_FW_DIR}/resources/" \
+ f"traffic_profiles/trex/{traffic_profile}.py " \
+ f"--duration {duration!r} --frame_size {frame_size} " \
f"--rate {rate!r} --warmup_time {warmup_time!r} " \
- f"--port_0 {p_0} --port_1 {p_1}" \
- f" --traffic_directions {traffic_directions}"
+ f"--port_0 {p_0} --port_1 {p_1} " \
+ f"--traffic_directions {traffic_directions}"
if async_call:
command += u" --async_start"
if latency:
command += u" --latency"
+ if Constants.TREX_SEND_FORCE:
+ command += u" --force"
command += u"\""
stdout, _ = exec_cmd_no_error(