Merge "Transform sample_cnt type to int"

This commit is contained in:
Jenkins 2014-07-16 03:44:04 +00:00 committed by Gerrit Code Review
commit 3fbeab2042

View File

@ -205,8 +205,8 @@ class VsphereOperations(object):
query_spec.metricId = [metric_id] query_spec.metricId = [metric_id]
query_spec.intervalId = VC_REAL_TIME_SAMPLING_INTERVAL query_spec.intervalId = VC_REAL_TIME_SAMPLING_INTERVAL
# We query all samples which are applicable over the specified duration # We query all samples which are applicable over the specified duration
samples_cnt = (duration / VC_REAL_TIME_SAMPLING_INTERVAL if duration samples_cnt = (int(duration / VC_REAL_TIME_SAMPLING_INTERVAL)
else 1) if duration else 1)
query_spec.maxSample = samples_cnt query_spec.maxSample = samples_cnt
perf_manager = session.vim.service_content.perfManager perf_manager = session.vim.service_content.perfManager