aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-05-04 12:59:04 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-04 12:59:04 +0000
commit20f5b0a8580c0e8c659424bab434a0e30f3c88c1 (patch)
treef683654bf3247b4d5c8903ed01eb6415105e9248 /yardstick/network_services/vnf_generic/vnf/vpe_vnf.py
parent058f0a93fd37694b74c5f1414bdfa6b35114690a (diff)
parent150481286dcf3c3c1fedd8213070cff48e5ad61d (diff)
Merge "standardize ssh auth" into stable/danube
Diffstat (limited to 'yardstick/network_services/vnf_generic/vnf/vpe_vnf.py')
-rw-r--r--yardstick/network_services/vnf_generic/vnf/vpe_vnf.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py b/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py
index 8c766f01e..e9e80bdfb 100644
--- a/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py
+++ b/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py
@@ -120,14 +120,11 @@ class VpeApproxVnf(GenericVNF):
def instantiate(self, scenario_cfg, context_cfg):
vnf_cfg = scenario_cfg['vnf_options']['vpe']['cfg']
- mgmt_interface = self.vnfd["mgmt-interface"]
- ssh_port = mgmt_interface.get("ssh_port", ssh.DEFAULT_PORT)
- self.connection = ssh.SSH(mgmt_interface["user"], mgmt_interface["ip"],
- password=mgmt_interface["password"],
- port=ssh_port)
+ mgmt_interface = self.vnfd["mgmt-interface"]
+ self.connection = ssh.SSH.from_node(mgmt_interface)
- self.connection.wait()
+ self.tc_file_name = '{0}.yaml'.format(scenario_cfg['tc'])
self.setup_vnf_environment(self.connection)
@@ -189,11 +186,10 @@ class VpeApproxVnf(GenericVNF):
def _run_vpe(self, filewrapper, vnf_cfg):
mgmt_interface = self.vnfd["mgmt-interface"]
- ssh_port = mgmt_interface.get("ssh_port", ssh.DEFAULT_PORT)
- self.connection = ssh.SSH(mgmt_interface["user"], mgmt_interface["ip"],
- password=mgmt_interface["password"],
- port=ssh_port)
+
+ self.connection = ssh.SSH.from_node(mgmt_interface)
self.connection.wait()
+
interfaces = self.vnfd["vdu"][0]['external-interface']
port0_ip = ipaddress.ip_interface(six.text_type(
"%s/%s" % (interfaces[0]["virtual-interface"]["local_ip"],