diff options
author | Jing Lu <lvjing5@huawei.com> | 2017-05-04 12:59:04 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-05-04 12:59:04 +0000 |
commit | 20f5b0a8580c0e8c659424bab434a0e30f3c88c1 (patch) | |
tree | f683654bf3247b4d5c8903ed01eb6415105e9248 /yardstick/benchmark/contexts/node.py | |
parent | 058f0a93fd37694b74c5f1414bdfa6b35114690a (diff) | |
parent | 150481286dcf3c3c1fedd8213070cff48e5ad61d (diff) |
Merge "standardize ssh auth" into stable/danube
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) |