Fixing evaluation of gnocchi aggregation-by-metric
A typo in metric parameters for requests Change-Id: I8bb81a645b69ee065dd8f88b9b996ab1d116f84d Closes-bug: #1513738 (cherry picked from commit bbb9e3c7b0ab5a8cb35e7d3cd264f3d94ea43fe8)
This commit is contained in:
@@ -97,7 +97,7 @@ class GnocchiThresholdEvaluator(evaluator.Evaluator):
|
||||
|
||||
elif alarm.type == 'gnocchi_aggregation_by_metrics_threshold':
|
||||
req['url'] += "/aggregation/metric"
|
||||
req['params']['metric[]'] = alarm.rule['metrics']
|
||||
req['params']['metric'] = alarm.rule['metrics']
|
||||
|
||||
elif alarm.type == 'gnocchi_resources_threshold':
|
||||
req['url'] += "/resource/%s/%s/metric/%s/measures" % (
|
||||
|
||||
@@ -224,7 +224,7 @@ class TestGnocchiThresholdEvaluate(base.TestEvaluatorBase):
|
||||
mock.call(url='http://localhost:8041/v1/aggregation/metric',
|
||||
params={'aggregation': 'max',
|
||||
'start': start_alarm2, 'end': end,
|
||||
'metric[]': [
|
||||
'metric': [
|
||||
'0bb1604d-1193-4c0a-b4b8-74b170e35e83',
|
||||
'9ddc209f-42f8-41e1-b8f1-8804f59c4053']},
|
||||
headers=expected_headers)],
|
||||
|
||||
Reference in New Issue
Block a user