aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/compute/cyclictest.py
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2017-04-24 01:58:31 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-04-24 01:58:31 +0000
commit07249e010dd9837d63f3090f1eac0fc6763b968f (patch)
tree7e9d12401220f547e499094fe8895d73fab405c5 /yardstick/benchmark/scenarios/compute/cyclictest.py
parentaf7518c51362ce882972c4b2168dbbfa4f5dcb2d (diff)
parent99abbb424007da2e01762f3c040a39c0157cbe1f (diff)
Merge "standardize ssh auth"
Diffstat (limited to 'yardstick/benchmark/scenarios/compute/cyclictest.py')
-rw-r--r--yardstick/benchmark/scenarios/compute/cyclictest.py19
1 files changed, 6 insertions, 13 deletions
diff --git a/yardstick/benchmark/scenarios/compute/cyclictest.py b/yardstick/benchmark/scenarios/compute/cyclictest.py
index 9ca3a8a37..594c6091e 100644
--- a/yardstick/benchmark/scenarios/compute/cyclictest.py
+++ b/yardstick/benchmark/scenarios/compute/cyclictest.py
@@ -85,24 +85,17 @@ class Cyclictest(base.Scenario):
def _connect_host(self):
host = self.context_cfg["host"]
- user = host.get("user", "root")
- ip = host.get("ip", None)
- key_filename = host.get("key_filename", "~/.ssh/id_rsa")
- LOG.debug("user:%s, host:%s", user, ip)
- self.host = ssh.SSH(user, ip, key_filename=key_filename)
+ self.host = ssh.SSH.from_node(host, defaults={"user": "root"})
self.host.wait(timeout=600)
def _connect_guest(self):
host = self.context_cfg["host"]
- user = host.get("user", "root")
- ip = host.get("ip", None)
- ssh_port = host.get("ssh_port", 5555)
- key_filename = host.get("key_filename", "~/.ssh/id_rsa")
-
- LOG.debug("user:%s, host:%s", user, ip)
- self.guest = ssh.SSH(user, ip, port=ssh_port,
- key_filename=key_filename)
+ # why port 5555?
+ self.guest = ssh.SSH.from_node(host,
+ defaults={
+ "user": "root", "ssh_port": 5555
+ })
self.guest.wait(timeout=600)
def _run_setup_cmd(self, client, cmd):