diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-06-06 00:16:39 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-06-06 00:16:39 +0000 |
commit | cbe1f78de471770a6c96462a7833936ffd1a16a6 (patch) | |
tree | 50a64c3fcf5856afeb23aa6973433829a48676e5 | |
parent | f6525758ab2456d688430699338993439597a789 (diff) | |
parent | b568477612a0390a9f4e1811d9302a55265f70a3 (diff) | |
download | swift-stable/icehouse.tar.gz |
Merge "Fix swift-recon --auditor bug" into stable/icehouseicehouse-eolstable/icehouse
-rwxr-xr-x | swift/cli/recon.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/swift/cli/recon.py b/swift/cli/recon.py index c91baf8e7..8fcd1e520 100755 --- a/swift/cli/recon.py +++ b/swift/cli/recon.py @@ -531,15 +531,15 @@ class SwiftRecon(object): zbf_scan[url] = response['object_auditor_stats_ZBF'] if len(all_scan) > 0: stats = {} - stats[atime] = [(self.nested_get_value(atime, all_scan[i])) + stats[atime] = [sum(self.nested_get_value(atime, all_scan[i])) for i in all_scan] - stats[bprocessed] = [(self.nested_get_value(bprocessed, + stats[bprocessed] = [sum(self.nested_get_value(bprocessed, all_scan[i])) for i in all_scan] - stats[passes] = [(self.nested_get_value(passes, all_scan[i])) + stats[passes] = [sum(self.nested_get_value(passes, all_scan[i])) for i in all_scan] - stats[errors] = [(self.nested_get_value(errors, all_scan[i])) + stats[errors] = [sum(self.nested_get_value(errors, all_scan[i])) for i in all_scan] - stats[quarantined] = [(self.nested_get_value(quarantined, + stats[quarantined] = [sum(self.nested_get_value(quarantined, all_scan[i])) for i in all_scan] for k in stats: if None in stats[k]: @@ -557,13 +557,13 @@ class SwiftRecon(object): print "[ALL_auditor] - No hosts returned valid data." if len(zbf_scan) > 0: stats = {} - stats[atime] = [(self.nested_get_value(atime, zbf_scan[i])) + stats[atime] = [sum(self.nested_get_value(atime, zbf_scan[i])) for i in zbf_scan] - stats[bprocessed] = [(self.nested_get_value(bprocessed, + stats[bprocessed] = [sum(self.nested_get_value(bprocessed, zbf_scan[i])) for i in zbf_scan] - stats[errors] = [(self.nested_get_value(errors, zbf_scan[i])) + stats[errors] = [sum(self.nested_get_value(errors, zbf_scan[i])) for i in zbf_scan] - stats[quarantined] = [(self.nested_get_value(quarantined, + stats[quarantined] = [sum(self.nested_get_value(quarantined, zbf_scan[i])) for i in zbf_scan] for k in stats: if None in stats[k]: |