aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/networking/netperf_node.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/scenarios/networking/netperf_node.py')
-rwxr-xr-xyardstick/benchmark/scenarios/networking/netperf_node.py23
1 files changed, 6 insertions, 17 deletions
diff --git a/yardstick/benchmark/scenarios/networking/netperf_node.py b/yardstick/benchmark/scenarios/networking/netperf_node.py
index fd9fa0a50..d52e6b9e1 100755
--- a/yardstick/benchmark/scenarios/networking/netperf_node.py
+++ b/yardstick/benchmark/scenarios/networking/netperf_node.py
@@ -66,27 +66,16 @@ class NetperfNode(base.Scenario):
'yardstick.benchmark.scenarios.networking',
NetperfNode.TARGET_SCRIPT)
host = self.context_cfg['host']
- host_user = host.get('user', 'ubuntu')
- host_ssh_port = host.get('ssh_port', ssh.DEFAULT_PORT)
- host_ip = host.get('ip', None)
target = self.context_cfg['target']
- target_user = target.get('user', 'ubuntu')
- target_ssh_port = target.get('ssh_port', ssh.DEFAULT_PORT)
- target_ip = target.get('ip', None)
- self.target_ip = target.get('ip', None)
- host_password = host.get('password', None)
- target_password = target.get('password', None)
-
- LOG.info("host_pw:%s, target_pw:%s", host_password, target_password)
+ self.target_ip = target['ip']
+
# netserver start automatically during the vm boot
- LOG.info("user:%s, target:%s", target_user, target_ip)
- self.server = ssh.SSH(target_user, target_ip,
- password=target_password, port=target_ssh_port)
+ LOG.info("user:%s, target:%s", target['user'], target['ip'])
+ self.server = ssh.SSH.from_node(target, defaults={"user": "ubuntu"})
self.server.wait(timeout=600)
- LOG.info("user:%s, host:%s", host_user, host_ip)
- self.client = ssh.SSH(host_user, host_ip,
- password=host_password, port=host_ssh_port)
+ LOG.info("user:%s, host:%s", host['user'], host['ip'])
+ self.client = ssh.SSH.from_node(host, defaults={"user": "ubuntu"})
self.client.wait(timeout=600)
# copy script to host