"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "aodh/api/controllers/v2/alarm_rules/gnocchi.py" between
aodh-14.0.0.tar.gz and aodh-15.0.0.tar.gz

About: OpenStack Aodh provides alarms and notifications based on metrics.
The "Zed" series (latest release).

gnocchi.py  (aodh-14.0.0):gnocchi.py  (aodh-15.0.0)
skipping to change at line 216 skipping to change at line 216
], ],
search=query, search=query,
needed_overlap=0, needed_overlap=0,
start="-1 day", start="-1 day",
stop="now", stop="now",
resource_type=rule.resource_type) resource_type=rule.resource_type)
except exceptions.ClientException as e: except exceptions.ClientException as e:
if e.code == 404: if e.code == 404:
# NOTE(sileht): We are fine here, we just want to ensure the # NOTE(sileht): We are fine here, we just want to ensure the
# 'query' payload is valid for Gnocchi If the metric # 'query' payload is valid for Gnocchi If the metric
# doesn't exists yet, it doesn't matter # doesn't exists yet, it doesn't matter.
return
if e.code == 400 and 'Metrics not found' in e.message["cause"]:
# NOTE(tkajinam): Gnocchi<4.5 returns 400 instead of 404
return return
raise base.ClientSideError(e.message, status_code=e.code) raise base.ClientSideError(e.message, status_code=e.code)
except Exception as e: except Exception as e:
raise GnocchiUnavailable(e) raise GnocchiUnavailable(e)
class AggregationMetricsByIdLookupRule(AlarmGnocchiThresholdRule): class AggregationMetricsByIdLookupRule(AlarmGnocchiThresholdRule):
metrics = wsme.wsattr([wtypes.text], mandatory=True) metrics = wsme.wsattr([wtypes.text], mandatory=True)
"A list of metric Ids" "A list of metric Ids"
def as_dict(self): def as_dict(self):
 End of changes. 1 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)