Merge "gnocchi: set start/stop when validating alarm"

This commit is contained in:
Jenkins 2017-07-31 20:48:05 +00:00 committed by Gerrit Code Review
commit 050fb3a8e5
2 changed files with 4 additions and 0 deletions

View File

@ -191,6 +191,8 @@ class AggregationMetricByResourcesLookupRule(AlarmGnocchiThresholdRule):
query=query,
aggregation=rule.aggregation_method,
needed_overlap=0,
start="-1 day",
stop="now",
resource_type=rule.resource_type)
except exceptions.ClientException as e:
if e.code == 404:

View File

@ -2721,6 +2721,8 @@ class TestAlarmsRuleGnocchi(TestAlarmsBase):
aggregation='count',
metrics='ameter',
needed_overlap=0,
start="-1 day",
stop="now",
query=expected_query,
resource_type="instance")],
c.metric.aggregation.mock_calls),