aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/TrafficGenerator.py
diff options
context:
space:
mode:
authorKirill Rybalchenko <kirill.rybalchenko@intel.com>2016-12-21 12:16:29 +0000
committerPeter Mikus <pmikus@cisco.com>2017-04-10 04:34:04 +0000
commit4e421686933355ddc6ce0780efd15041c60de7e3 (patch)
tree1c8963efdd3fbaf0ea21411b0466414e92e2642f /resources/libraries/python/TrafficGenerator.py
parent2e115ad11cca45b11c0f1949fd8c42fec899bb68 (diff)
IPsec Multi-Tunnel performance test suite
Change-Id: I4b0ba83960e50089f29cab9a30ab760241c6f566 Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Diffstat (limited to 'resources/libraries/python/TrafficGenerator.py')
-rw-r--r--resources/libraries/python/TrafficGenerator.py46
1 files changed, 45 insertions, 1 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py
index 68bd372b84..2313ec856b 100644
--- a/resources/libraries/python/TrafficGenerator.py
+++ b/resources/libraries/python/TrafficGenerator.py
@@ -286,7 +286,6 @@ class TrafficGenerator(object):
# critical error occured
raise RuntimeError('t-rex-64 startup failed')
-
@staticmethod
def teardown_traffic_generator(node):
"""TG teardown.
@@ -394,6 +393,51 @@ class TrafficGenerator(object):
_p0, _p1, _async, _latency,
warmup_time),
timeout=int(duration)+60)
+ elif traffic_type in ["3-node-IPv4-dst-1"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} "
+ "--p{4}_src_start_ip 10.0.0.1 "
+ "--p{4}_dst_start_ip 20.0.0.0 "
+ "--p{4}_dst_end_ip 20.0.0.0 "
+ "--p{5}_src_start_ip 20.0.0.1 "
+ "--p{5}_dst_start_ip 10.0.0.0 "
+ "--p{5}_dst_end_ip 10.0.0.0 "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
+ elif traffic_type in ["3-node-IPv4-dst-100"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} "
+ "--p{4}_src_start_ip 10.0.0.1 "
+ "--p{4}_dst_start_ip 20.0.0.0 "
+ "--p{4}_dst_end_ip 20.0.0.99 "
+ "--p{5}_src_start_ip 20.0.0.1 "
+ "--p{5}_dst_start_ip 10.0.0.0 "
+ "--p{5}_dst_end_ip 10.0.0.99 "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
+ elif traffic_type in ["3-node-IPv4-dst-1000"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} "
+ "--p{4}_src_start_ip 10.0.0.1 "
+ "--p{4}_dst_start_ip 20.0.0.0 "
+ "--p{4}_dst_end_ip 20.0.3.231 "
+ "--p{5}_src_start_ip 20.0.0.1 "
+ "--p{5}_dst_start_ip 10.0.0.0 "
+ "--p{5}_dst_end_ip 10.0.3.231 "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
elif traffic_type in ["3-node-IPv4-dst-10000"]:
(ret, stdout, stderr) = ssh.exec_command(
"sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "