Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
standardize ssh auth
[yardstick.git]
/
yardstick
/
benchmark
/
scenarios
/
networking
/
vsperf.py
diff --git
a/yardstick/benchmark/scenarios/networking/vsperf.py
b/yardstick/benchmark/scenarios/networking/vsperf.py
index
4f4ef21
..
705544c
100644
(file)
--- a/
yardstick/benchmark/scenarios/networking/vsperf.py
+++ b/
yardstick/benchmark/scenarios/networking/vsperf.py
@@
-13,6
+13,7
@@
# limitations under the License.
""" Vsperf specific scenario definition """
# limitations under the License.
""" Vsperf specific scenario definition """
+from __future__ import absolute_import
import logging
import os
import subprocess
import logging
import os
import subprocess
@@
-111,12
+112,8
@@
class Vsperf(base.Scenario):
None)
def setup(self):
None)
def setup(self):
- '''scenario setup'''
+ """scenario setup"""
vsperf = self.context_cfg['host']
vsperf = self.context_cfg['host']
- vsperf_user = vsperf.get('user', 'ubuntu')
- vsperf_ssh_port = vsperf.get('ssh_port', ssh.DEFAULT_PORT)
- vsperf_password = vsperf.get('password', 'ubuntu')
- vsperf_ip = vsperf.get('ip', None)
# add trafficgen interfaces to the external bridge
if self.tg_port1:
# add trafficgen interfaces to the external bridge
if self.tg_port1:
@@
-127,9
+124,9
@@
class Vsperf(base.Scenario):
(self.br_ex, self.tg_port2), shell=True)
# copy vsperf conf to VM
(self.br_ex, self.tg_port2), shell=True)
# copy vsperf conf to VM
- LOG.info("user:%s, host:%s", vsperf_user, vsperf_ip)
- self.client = ssh.SSH(vsperf_user, vsperf_ip,
-
password=vsperf_password, port=vsperf_ssh_port
)
+ self.client = ssh.SSH.from_node(vsperf, defaults={
+ "user": "ubuntu", "password": "ubuntu"
+
}
)
# traffic generation could last long
self.client.wait(timeout=1800)
# traffic generation could last long
self.client.wait(timeout=1800)
@@
-211,7
+208,7
@@
class Vsperf(base.Scenario):
# convert result.csv to JSON format
reader = csv.DictReader(stdout.split('\r\n'))
# convert result.csv to JSON format
reader = csv.DictReader(stdout.split('\r\n'))
- result.update(
reader.next(
))
+ result.update(
next(reader
))
# sla check; go through all defined SLAs and check if values measured
# by VSPERF are higher then those defined by SLAs
# sla check; go through all defined SLAs and check if values measured
# by VSPERF are higher then those defined by SLAs