Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "subprocess.call para stdout=PIPE is risky"
[yardstick.git]
/
yardstick
/
benchmark
/
scenarios
/
networking
/
netutilization.py
diff --git
a/yardstick/benchmark/scenarios/networking/netutilization.py
b/yardstick/benchmark/scenarios/networking/netutilization.py
index
ea43e60
..
1ea92cc
100644
(file)
--- a/
yardstick/benchmark/scenarios/networking/netutilization.py
+++ b/
yardstick/benchmark/scenarios/networking/netutilization.py
@@
-70,18
+70,20
@@
class NetUtilization(base.Scenario):
"""Scenario setup."""
host = self.context_cfg['host']
user = host.get('user', 'ubuntu')
"""Scenario setup."""
host = self.context_cfg['host']
user = host.get('user', 'ubuntu')
+ ssh_port = host.get("ssh_port", ssh.DEFAULT_PORT)
ip = host.get('ip', None)
key_filename = host.get('key_filename', '~/.ssh/id_rsa')
LOG.info("user:%s, host:%s", user, ip)
ip = host.get('ip', None)
key_filename = host.get('key_filename', '~/.ssh/id_rsa')
LOG.info("user:%s, host:%s", user, ip)
- self.client = ssh.SSH(user, ip, key_filename=key_filename)
+ self.client = ssh.SSH(user, ip, key_filename=key_filename,
+ port=ssh_port)
self.client.wait(timeout=600)
self.setup_done = True
def _execute_command(self, cmd):
"""Execute a command on target."""
self.client.wait(timeout=600)
self.setup_done = True
def _execute_command(self, cmd):
"""Execute a command on target."""
- LOG.info("Executing: %s"
%
cmd)
+ LOG.info("Executing: %s"
,
cmd)
status, stdout, stderr = self.client.execute(cmd)
if status:
raise RuntimeError("Failed executing command: ",
status, stdout, stderr = self.client.execute(cmd)
if status:
raise RuntimeError("Failed executing command: ",