Pass parameter to the query in get_last_sample_values

In watcher/common/ceilometer_help.py:129,
there is an unused parameter, called limit:
  def get_last_sample_values(self, resource_id, meter_name, limit=1):

In the next line, there is a method call which can take this
currently unused 'limit' parameter. Probably, passing this 'limit'
parameter to the query was originally intended, however it wasn't
added to the query call.

Closes-Bug: #1541415
Change-Id: I025070c6004243d6b8a6ea7a1d83081480c4148b
This commit is contained in:
Gábor Antal 2016-02-03 15:35:37 +01:00
parent 25d27f0288
commit f32995228b
1 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,8 @@ class CeilometerHelper(object):
def get_last_sample_values(self, resource_id, meter_name, limit=1):
samples = self.query_sample(meter_name=meter_name,
query=self.build_query(resource_id))
query=self.build_query(resource_id),
limit=limit)
values = []
for index, sample in enumerate(samples):
values.append(