aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/vnf_generic/vnf/tg_trex.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/network_services/vnf_generic/vnf/tg_trex.py')
-rw-r--r--yardstick/network_services/vnf_generic/vnf/tg_trex.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/yardstick/network_services/vnf_generic/vnf/tg_trex.py b/yardstick/network_services/vnf_generic/vnf/tg_trex.py
index 2731476e0..61182a23b 100644
--- a/yardstick/network_services/vnf_generic/vnf/tg_trex.py
+++ b/yardstick/network_services/vnf_generic/vnf/tg_trex.py
@@ -52,12 +52,9 @@ class TrexTrafficGen(GenericTrafficGen):
self.my_ports = None
self.client_started = multiprocessing.Value('i', 0)
- 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 = vnfd["mgmt-interface"]
+
+ self.connection = ssh.SSH.from_node(mgmt_interface)
self.connection.wait()
@classmethod
@@ -198,10 +195,8 @@ class TrexTrafficGen(GenericTrafficGen):
def _start_server(self):
mgmt_interface = self.vnfd["mgmt-interface"]
- ssh_port = mgmt_interface.get("ssh_port", ssh.DEFAULT_PORT)
- _server = ssh.SSH(mgmt_interface["user"], mgmt_interface["ip"],
- password=mgmt_interface["password"],
- port=ssh_port)
+
+ _server = ssh.SSH.from_node(mgmt_interface)
_server.wait()
_server.execute("fuser -n tcp %s %s -k > /dev/null 2>&1" %