summaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/storage/storagecapacity.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/scenarios/storage/storagecapacity.py')
-rw-r--r--yardstick/benchmark/scenarios/storage/storagecapacity.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/yardstick/benchmark/scenarios/storage/storagecapacity.py b/yardstick/benchmark/scenarios/storage/storagecapacity.py
index 49e3a0339..bf5bc2810 100644
--- a/yardstick/benchmark/scenarios/storage/storagecapacity.py
+++ b/yardstick/benchmark/scenarios/storage/storagecapacity.py
@@ -54,16 +54,17 @@ class StorageCapacity(base.Scenario):
if host is None:
raise RuntimeError('No right node.Please check the configuration')
host_user = host.get('user', 'ubuntu')
+ ssh_port = host.get("ssh_port", ssh.DEFAULT_PORT)
host_ip = host.get('ip', None)
host_pwd = host.get('password', 'root')
LOG.debug("user:%s, host:%s", host_user, host_ip)
- self.client = ssh.SSH(host_user, host_ip, password=host_pwd)
+ self.client = ssh.SSH(host_user, host_ip, password=host_pwd,
+ port=ssh_port)
self.client.wait(timeout=600)
# copy script to host
- self.client.run("cat > ~/storagecapacity.sh",
- stdin=open(self.target_script, 'rb'))
+ self.client._put_file_shell(self.target_script, '~/storagecapacity.sh')
self.setup_done = True
@@ -107,7 +108,7 @@ class StorageCapacity(base.Scenario):
for i in range(len(device_name_arr)):
r[device_name_arr[i]] = {"min_util": min_util_arr[i],
"max_util": max_util_arr[i],
- "avg_util": avg_util_arr[i]/count}
+ "avg_util": avg_util_arr[i] / count}
return r
def run(self, result):