aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/nfvi/resource.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/network_services/nfvi/resource.py
parentaf7518c51362ce882972c4b2168dbbfa4f5dcb2d (diff)
parent99abbb424007da2e01762f3c040a39c0157cbe1f (diff)
Merge "standardize ssh auth"
Diffstat (limited to 'yardstick/network_services/nfvi/resource.py')
-rw-r--r--yardstick/network_services/nfvi/resource.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/yardstick/network_services/nfvi/resource.py b/yardstick/network_services/nfvi/resource.py
index d71e1e995..18b0d8952 100644
--- a/yardstick/network_services/nfvi/resource.py
+++ b/yardstick/network_services/nfvi/resource.py
@@ -40,13 +40,11 @@ class ResourceProfile(object):
self.cores = cores
mgmt_interface = vnfd.get("mgmt-interface")
- user = mgmt_interface.get("user")
- passwd = mgmt_interface.get("password")
- ip_addr = mgmt_interface.get("ip")
- self.vnfip = mgmt_interface.get("host", ip_addr)
- ssh_port = mgmt_interface.get("ssh_port", ssh.DEFAULT_PORT)
- self.connection = ssh.SSH(user, self.vnfip,
- password=passwd, port=ssh_port)
+ # why the host or ip?
+ self.vnfip = mgmt_interface.get("host", mgmt_interface["ip"])
+ self.connection = ssh.SSH.from_node(mgmt_interface,
+ overrides={"ip": self.vnfip})
+
self.connection.wait()
def check_if_sa_running(self, process):