Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CSIT-755: Presentation and analytics layer
[csit.git]
/
resources
/
libraries
/
python
/
TrafficGenerator.py
diff --git
a/resources/libraries/python/TrafficGenerator.py
b/resources/libraries/python/TrafficGenerator.py
index
0f25ebe
..
1680438
100644
(file)
--- a/
resources/libraries/python/TrafficGenerator.py
+++ b/
resources/libraries/python/TrafficGenerator.py
@@
-184,17
+184,17
@@
class TrafficGenerator(object):
self._node = tg_node
if tg_node['subtype'] == NodeSubTypeTG.TREX:
self._node = tg_node
if tg_node['subtype'] == NodeSubTypeTG.TREX:
- trex_path = "/opt/trex-core-2.2
5
"
+ trex_path = "/opt/trex-core-2.2
9
"
ssh = SSH()
ssh.connect(tg_node)
(ret, stdout, stderr) = ssh.exec_command(
ssh = SSH()
ssh.connect(tg_node)
(ret, stdout, stderr) = ssh.exec_command(
- "sudo -E sh -c '{}/resources/tools/t
-
rex/"
- "t
-rex-
installer.sh'".format(Constants.REMOTE_FW_DIR),
+ "sudo -E sh -c '{}/resources/tools/trex/"
+ "t
rex_
installer.sh'".format(Constants.REMOTE_FW_DIR),
timeout=1800)
if int(ret) != 0:
timeout=1800)
if int(ret) != 0:
- logger.error('
tr
ex installation failed: {0}'.format(
+ logger.error('
TR
ex installation failed: {0}'.format(
stdout + stderr))
raise RuntimeError('Installation of TG failed')
stdout + stderr))
raise RuntimeError('Installation of TG failed')
@@
-274,7
+274,7
@@
class TrafficGenerator(object):
# get T-rex server info
(ret, _, _) = ssh.exec_command(
"sh -c 'sleep 3; "
# get T-rex server info
(ret, _, _) = ssh.exec_command(
"sh -c 'sleep 3; "
- "{0}/resources/tools/t
-rex/t-rex-server-
info.py'"\
+ "{0}/resources/tools/t
rex/trex_server_
info.py'"\
.format(Constants.REMOTE_FW_DIR),
timeout=120)
if int(ret) == 0:
.format(Constants.REMOTE_FW_DIR),
timeout=120)
if int(ret) == 0:
@@
-320,8
+320,8
@@
class TrafficGenerator(object):
ssh.connect(node)
(ret, _, _) = ssh.exec_command(
ssh.connect(node)
(ret, _, _) = ssh.exec_command(
- "sh -c '{}/resources/tools/t
-
rex/"
- "t
-rex-stateless-
stop.py'".format(Constants.REMOTE_FW_DIR))
+ "sh -c '{}/resources/tools/trex/"
+ "t
rex_stateless_
stop.py'".format(Constants.REMOTE_FW_DIR))
if int(ret) != 0:
raise RuntimeError('T-rex stateless runtime error')
if int(ret) != 0:
raise RuntimeError('T-rex stateless runtime error')
@@
-355,12
+355,12
@@
class TrafficGenerator(object):
_latency = "--latency" if latency else ""
_p0, _p1 = (2, 1) if self._ifaces_reordered else (1, 2)
_latency = "--latency" if latency else ""
_p0, _p1 = (2, 1) if self._ifaces_reordered else (1, 2)
- profile_path = ("{0}/resources/t
ools/t-rex/stream_profiles
/"
+ profile_path = ("{0}/resources/t
raffic_profiles/trex
/"
"{1}.py".format(Constants.REMOTE_FW_DIR,
traffic_type))
(ret, stdout, _) = ssh.exec_command(
"sh -c "
"{1}.py".format(Constants.REMOTE_FW_DIR,
traffic_type))
(ret, stdout, _) = ssh.exec_command(
"sh -c "
- "'{0}/resources/tools/t
-rex/t-rex-stateless-
profile.py "
+ "'{0}/resources/tools/t
rex/trex_stateless_
profile.py "
"--profile {1} "
"--duration {2} "
"--frame_size {3} "
"--profile {1} "
"--duration {2} "
"--frame_size {3} "