diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-06-09 08:59:15 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-06-09 08:59:15 +0000 |
commit | 06f66e490b3de403784fb30bb22b0dab1a1c4e78 (patch) | |
tree | 68444888e2e916e66a2c677167abaef73bb2221c | |
parent | ff882bebf20deb04880c7aef37a8565a10f742c2 (diff) | |
parent | 0f82c4376f6e6f3db02b3acd1eeb136d844ea87d (diff) | |
download | ceilometer-06f66e490b3de403784fb30bb22b0dab1a1c4e78.tar.gz |
Merge "fix the value of query_spec.maxSample to advoid to be zero" into stable/juno
-rw-r--r-- | ceilometer/compute/virt/vmware/vsphere_operations.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ceilometer/compute/virt/vmware/vsphere_operations.py b/ceilometer/compute/virt/vmware/vsphere_operations.py index 2531e1af..ed5c2e02 100644 --- a/ceilometer/compute/virt/vmware/vsphere_operations.py +++ b/ceilometer/compute/virt/vmware/vsphere_operations.py @@ -206,7 +206,8 @@ class VsphereOperations(object): query_spec.intervalId = VC_REAL_TIME_SAMPLING_INTERVAL # We query all samples which are applicable over the specified duration samples_cnt = (int(duration / VC_REAL_TIME_SAMPLING_INTERVAL) - if duration else 1) + if duration and + duration >= VC_REAL_TIME_SAMPLING_INTERVAL else 1) query_spec.maxSample = samples_cnt perf_manager = session.vim.service_content.perfManager |