diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-05-11 19:41:26 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-05-15 13:51:24 +0800 |
commit | 0af297e4e9622cb6d040e9e30daffe1d43970aaa (patch) | |
tree | d43c7d8e48d2987d5a57ed21497fba437f78653e /qtip | |
parent | 8522b38a1b06bfe3c334c4d70d365058b7bf03ca (diff) |
Get rid of `changed=false` flag in test result
Change-Id: I74c9634b708dbad82e6e4b0a04b44e16ff01ffdd
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'qtip')
-rw-r--r-- | qtip/ansible_library/plugins/action/calculate.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qtip/ansible_library/plugins/action/calculate.py b/qtip/ansible_library/plugins/action/calculate.py index ee3b8e3a..8d5fa1f7 100644 --- a/qtip/ansible_library/plugins/action/calculate.py +++ b/qtip/ansible_library/plugins/action/calculate.py @@ -10,6 +10,7 @@ ############################################################################## import humanfriendly +import json import numbers from numpy import mean import yaml @@ -37,7 +38,11 @@ class ActionModule(ActionBase): with open(self._task.args.get('spec')) as stream: spec = yaml.safe_load(stream) - metrics = self._task.args.get('metrics') + metrics_files = self._task.args.get('metrics') + metrics = {} + for metric, filename in metrics_files.items(): + with open(filename) as f: + metrics[metric] = json.load(f) dest = self._task.args.get('dest') return calc_qpi(spec, metrics, dest=dest) |