X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fnetwork_services%2Fvnf_generic%2Fvnf%2Ftg_ping.py;h=000a91db4c9e8291ddc0ab4f0dcab69fc082a15f;hb=fd103cb8170290402e9c95fce32317bacf675698;hp=2844a5c01ba7f688c19c5692c77bb8f4a78779f0;hpb=6871f03787d1161d086434d929f4dec6b352c265;p=yardstick.git diff --git a/yardstick/network_services/vnf_generic/vnf/tg_ping.py b/yardstick/network_services/vnf_generic/vnf/tg_ping.py index 2844a5c01..000a91db4 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_ping.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_ping.py @@ -69,12 +69,7 @@ class PingTrafficGen(GenericTrafficGen): self._traffic_process = None mgmt_interface = vnfd["mgmt-interface"] - ssh_port = mgmt_interface.get("ssh_port", ssh.DEFAULT_PORT) - LOG.debug("Connecting to %s", mgmt_interface["ip"]) - - 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() def _bind_device_kernel(self, connection): @@ -130,10 +125,7 @@ class PingTrafficGen(GenericTrafficGen): def _traffic_runner(self, traffic_profile, filewrapper): 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() external_interface = self.vnfd["vdu"][0]["external-interface"] virtual_interface = external_interface[0]["virtual-interface"]