예제 #1
0
def notify(message):
    """Sends a notification to the RabbitMQ"""
    context = nova.context.get_admin_context()
    priority = message.get('priority', FLAGS.default_notification_level)
    priority = priority.lower()
    topic = '%s.%s' % (FLAGS.notification_topic, priority)
    rpc.notify(context, topic, message)
예제 #2
0
def notify(message):
    """Sends a notification to the RabbitMQ"""
    context = nova.context.get_admin_context()
    priority = message.get('priority',
                           FLAGS.default_notification_level)
    priority = priority.lower()
    topic = '%s.%s' % (FLAGS.notification_topic, priority)
    rpc.notify(context, topic, message)
예제 #3
0
def notify(message):
    """Sends a notification to the RabbitMQ"""
    context = nova.context.get_admin_context()
    priority = message.get('priority',
                           FLAGS.default_notification_level)
    priority = priority.lower()
    for topic in FLAGS.notification_topics:
        topic = '%s.%s' % (topic, priority)
        try:
            rpc.notify(context, topic, message)
        except Exception, e:
            LOG.exception(_("Could not send notification to %(topic)s. "
                            "Payload=%(message)s" % locals()))
예제 #4
0
def notify(message):
    """Sends a notification to the RabbitMQ"""
    context = nova.context.get_admin_context()
    priority = message.get('priority', FLAGS.default_notification_level)
    priority = priority.lower()
    for topic in FLAGS.notification_topics:
        topic = '%s.%s' % (topic, priority)
        try:
            rpc.notify(context, topic, message)
        except Exception, e:
            LOG.exception(
                _("Could not send notification to %(topic)s. "
                  "Payload=%(message)s" % locals()))