diff options
Diffstat (limited to 'yardstick/benchmark/contexts/node.py')
-rw-r--r-- | yardstick/benchmark/contexts/node.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/yardstick/benchmark/contexts/node.py b/yardstick/benchmark/contexts/node.py index a4a2cfc57..baa1cf5d6 100644 --- a/yardstick/benchmark/contexts/node.py +++ b/yardstick/benchmark/contexts/node.py @@ -178,21 +178,7 @@ class NodeContext(Context): if node is None: raise SystemExit('No such node') - user = node.get('user', 'ubuntu') - ssh_port = node.get("ssh_port", ssh.DEFAULT_PORT) - ip = node.get('ip') - pwd = node.get('password') - key_fname = node.get('key_filename', '/root/.ssh/id_rsa') - - if pwd is not None: - LOG.debug("Log in via pw, user:%s, host:%s, password:%s", - user, ip, pwd) - self.client = ssh.SSH(user, ip, password=pwd, port=ssh_port) - else: - LOG.debug("Log in via key, user:%s, host:%s, key_filename:%s", - user, ip, key_fname) - self.client = ssh.SSH(user, ip, key_filename=key_fname, - port=ssh_port) + self.client = ssh.SSH.from_node(node, defaults={'user': 'ubuntu'}) self.client.wait(timeout=600) |