Beispiel #1
0
def _notify(event_type, body):
    LOG.debug("Notification about cluster is going to be sent. Notification "
              "type={type}".format(type=event_type))
    ctx = context.ctx()
    level = CONF.oslo_messaging_notifications.level

    body.update({'project_id': ctx.tenant_id, 'user_id': ctx.user_id})
    client = messaging.get_notifier(_get_publisher())

    method = getattr(client, level.lower())
    method(ctx, event_type, body)
Beispiel #2
0
def _notify(event_type, body):
    LOG.debug("Notification about cluster is going to be sent. Notification "
              "type={type}".format(type=event_type))
    ctx = context.ctx()
    level = CONF.oslo_messaging_notifications.level

    body.update({'project_id': ctx.tenant_id, 'user_id': ctx.user_id})
    client = messaging.get_notifier(_get_publisher())

    method = getattr(client, level.lower())
    method(ctx, event_type, body)
Beispiel #3
0
def _notify(context, event_type, level, body):
    client = messaging.get_notifier(_get_publisher())

    method = getattr(client, level.lower())
    method(context, event_type, body)
Beispiel #4
0
def _notify(context, event_type, level, body):
    client = messaging.get_notifier(_get_publisher())

    method = getattr(client, level.lower())
    method(context, event_type, body)