X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fbenchmark%2Fscenarios%2Fnetworking%2Fnetperf_node.py;h=d52e6b9e1d733c48cb877ac6329804d9d4699049;hb=b00112e33caffee6b6b01402537e68007fdc8cb2;hp=fd9fa0a50621e2a6b2643ad236d479e0b2900a52;hpb=8f91b0a5c1f47953dd1a14541b71505dbf8f869a;p=yardstick.git 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