import json
import logging
+from json import JSONDecodeError
import six
import yaml
"""
try:
values = json.loads(message.value)
- except ValueError:
+ except JSONDecodeError:
values = yaml.safe_load(message.value)
log.info("OpenStack alarm action required.")
if metric_name not in METRIC_MAPPINGS.keys():
raise KeyError("Metric {} is not supported.".format(metric_name))
+ #FIXME
if 'granularity' in vim_config and 'granularity' not in values:
values['granularity'] = vim_config['granularity']
payload = self.check_payload(values, metric_name, resource_id,