'Dispatches an event to the compute manager.
Invokes the event callback registered by the
compute manager to dispatch the event. This
must only be invoked from a green thread.'

def emit_event(self, event):

    if (not self._compute_event_callback):
        LOG.debug('Discarding    event    %s', six.text_type(event))
        return
    if (not isinstance(event, virtevent.Event)):
        raise ValueError(_('Event    must    be    an    instance    of    nova.virt.event.Event'))
    try:
        LOG.debug('Emitting    event    %s', six.text_type(event))
        self._compute_event_callback(event)
    except Exception as ex:
        LOG.error('Exception    dispatching    event    %(event)s:    %(ex)s', {'event': event, 'ex': ex})
