# Path: aodh/messaging.py
# DEFAULT_URL = "__default__"
# TRANSPORTS = {}
# _SERIALIZER = oslo_serializer.JsonPayloadSerializer()
# def setup():
# def get_transport(conf, url=None, optional=False, cache=True):
# def get_batch_notification_listener(transport, targets, endpoints,
#                                     allow_requeue=False,
#                                     batch_size=1, batch_timeout=None):
# def get_notifier(transport, publisher_id):
# 
# Path: aodh/storage/models.py
# class Alarm(base.Model):
# class AlarmChange(base.Model):
# class Quota(base.Model):
#     ALARM_INSUFFICIENT_DATA = 'insufficient data'
#     ALARM_OK = 'ok'
#     ALARM_ALARM = 'alarm'
#     ALARM_ACTIONS_MAP = {
#         ALARM_INSUFFICIENT_DATA: 'insufficient_data_actions',
#         ALARM_OK: 'ok_actions',
#         ALARM_ALARM: 'alarm_actions',
#     }
#     ALARM_LEVEL_LOW = 'low'
#     ALARM_LEVEL_MODERATE = 'moderate'
#     ALARM_LEVEL_CRITICAL = 'critical'
#     SUPPORT_SORT_KEYS = (
#         'alarm_id', 'enabled', 'name', 'type', 'severity', 'timestamp',
#         'user_id', 'project_id', 'state', 'repeat_actions', 'state_timestamp')
#     DEFAULT_SORT = [('timestamp', 'desc')]
#     PRIMARY_KEY = 'alarm_id'
#     CREATION = 'creation'
#     RULE_CHANGE = 'rule change'
#     STATE_TRANSITION = 'state transition'
#     DELETION = 'deletion'
#     SUPPORT_SORT_KEYS = (
#         'event_id', 'alarm_id', 'on_behalf_of', 'project_id', 'user_id',
#         'type', 'timestamp', 'severity')
#     DEFAULT_SORT = [('timestamp', 'desc')]
#     PRIMARY_KEY = 'event_id'
#     def __init__(self, alarm_id, type, enabled, name, description,
#                  timestamp, user_id, project_id, state, state_timestamp,
#                  state_reason, ok_actions, alarm_actions,
#                  insufficient_data_actions, repeat_actions, rule,
#                  time_constraints, severity=None, evaluate_timestamp=None):
#     def __init__(self,
#                  event_id,
#                  alarm_id,
#                  type,
#                  detail,
#                  user_id,
#                  project_id,
#                  on_behalf_of,
#                  severity=None,
#                  timestamp=None
#                  ):
#     def __init__(self, project_id, resource, limit):


from oslo_config import cfg
from oslo_log import log
from aodh import messaging
from aodh.storage import models
import oslo_messaging
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.



OPTS = [
    cfg.StrOpt('notifier_topic',
               default='alarming',
               help='The topic that aodh uses for alarm notifier '
                    'messages.'),
]

LOG = log.getLogger(__name__)


class AlarmNotifier(object):
    def __init__(self, conf):
        self.notifier = oslo_messaging.Notifier(

# Path: aodh/messaging.py
# DEFAULT_URL = "__default__"
# TRANSPORTS = {}
# _SERIALIZER = oslo_serializer.JsonPayloadSerializer()
# def setup():
# def get_transport(conf, url=None, optional=False, cache=True):
# def get_batch_notification_listener(transport, targets, endpoints,
#                                     allow_requeue=False,
#                                     batch_size=1, batch_timeout=None):
# def get_notifier(transport, publisher_id):
# 
# Path: aodh/storage/models.py
# class Alarm(base.Model):
# class AlarmChange(base.Model):
# class Quota(base.Model):
#     ALARM_INSUFFICIENT_DATA = 'insufficient data'
#     ALARM_OK = 'ok'
#     ALARM_ALARM = 'alarm'
#     ALARM_ACTIONS_MAP = {
#         ALARM_INSUFFICIENT_DATA: 'insufficient_data_actions',
#         ALARM_OK: 'ok_actions',
#         ALARM_ALARM: 'alarm_actions',
#     }
#     ALARM_LEVEL_LOW = 'low'
#     ALARM_LEVEL_MODERATE = 'moderate'
#     ALARM_LEVEL_CRITICAL = 'critical'
#     SUPPORT_SORT_KEYS = (
#         'alarm_id', 'enabled', 'name', 'type', 'severity', 'timestamp',
#         'user_id', 'project_id', 'state', 'repeat_actions', 'state_timestamp')
#     DEFAULT_SORT = [('timestamp', 'desc')]
#     PRIMARY_KEY = 'alarm_id'
#     CREATION = 'creation'
#     RULE_CHANGE = 'rule change'
#     STATE_TRANSITION = 'state transition'
#     DELETION = 'deletion'
#     SUPPORT_SORT_KEYS = (
#         'event_id', 'alarm_id', 'on_behalf_of', 'project_id', 'user_id',
#         'type', 'timestamp', 'severity')
#     DEFAULT_SORT = [('timestamp', 'desc')]
#     PRIMARY_KEY = 'event_id'
#     def __init__(self, alarm_id, type, enabled, name, description,
#                  timestamp, user_id, project_id, state, state_timestamp,
#                  state_reason, ok_actions, alarm_actions,
#                  insufficient_data_actions, repeat_actions, rule,
#                  time_constraints, severity=None, evaluate_timestamp=None):
#     def __init__(self,
#                  event_id,
#                  alarm_id,
#                  type,
#                  detail,
#                  user_id,
#                  project_id,
#                  on_behalf_of,
#                  severity=None,
#                  timestamp=None
#                  ):
#     def __init__(self, project_id, resource, limit):


# Path: aodh/queue.py
from oslo_config import cfg
from oslo_log import log
from aodh import messaging
from aodh.storage import models
import oslo_messaging

#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.



OPTS = [
    cfg.StrOpt('notifier_topic',
               default='alarming',
               help='The topic that aodh uses for alarm notifier '
                    'messages.'),
]

LOG = log.getLogger(__name__)


class AlarmNotifier(object):
    def __init__(self, conf):
        self.notifier = oslo_messaging.Notifier(

            messaging.get_transport(conf),