aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/storage
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2016-12-12 07:13:30 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-12 07:13:30 +0000
commite19dacdb57d0b3520b85d60607813f3c6548ff67 (patch)
tree68a1896a24c68350180f9c1bb28c7b95cdb08a37 /yardstick/benchmark/scenarios/storage
parent4a9465801b48c1042656d860b54621f30c6c1423 (diff)
parent0576844bb2cdae6b479504ec1532a5dc56c0b633 (diff)
Merge "use context manager for stdin files and use _put_file_shell"
Diffstat (limited to 'yardstick/benchmark/scenarios/storage')
-rw-r--r--yardstick/benchmark/scenarios/storage/fio.py3
-rw-r--r--yardstick/benchmark/scenarios/storage/storagecapacity.py5
2 files changed, 3 insertions, 5 deletions
diff --git a/yardstick/benchmark/scenarios/storage/fio.py b/yardstick/benchmark/scenarios/storage/fio.py
index 0e4153643..4e004235d 100644
--- a/yardstick/benchmark/scenarios/storage/fio.py
+++ b/yardstick/benchmark/scenarios/storage/fio.py
@@ -70,8 +70,7 @@ class Fio(base.Scenario):
self.client.wait(timeout=600)
# copy script to host
- self.client.run("cat > ~/fio.sh",
- stdin=open(self.target_script, "rb"))
+ self.client._put_file_shell(self.target_script, '~/fio.sh')
self.setup_done = True
diff --git a/yardstick/benchmark/scenarios/storage/storagecapacity.py b/yardstick/benchmark/scenarios/storage/storagecapacity.py
index bed45fa6d..bf5bc2810 100644
--- a/yardstick/benchmark/scenarios/storage/storagecapacity.py
+++ b/yardstick/benchmark/scenarios/storage/storagecapacity.py
@@ -64,8 +64,7 @@ class StorageCapacity(base.Scenario):
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
@@ -109,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):