@staticmethod
def _event_lifecycle_callback(conn, dom, event, detail, opaque):
    'Receives lifecycle events from libvirt.\n\n        NB: this method is executing in a native thread, not\n        an eventlet coroutine. It can only invoke other libvirt\n        APIs, or use self.queue_event(). Any use of logging APIs\n        in particular is forbidden.\n        '
    self = opaque
    uuid = dom.UUIDString()
    transition = None
    if (event == libvirt.VIR_DOMAIN_EVENT_STOPPED):
        transition = virtevent.EVENT_LIFECYCLE_STOPPED
    elif (event == libvirt.VIR_DOMAIN_EVENT_STARTED):
        transition = virtevent.EVENT_LIFECYCLE_STARTED
    elif (event == libvirt.VIR_DOMAIN_EVENT_SUSPENDED):
        transition = virtevent.EVENT_LIFECYCLE_PAUSED
    elif (event == libvirt.VIR_DOMAIN_EVENT_RESUMED):
        transition = virtevent.EVENT_LIFECYCLE_RESUMED
    if (transition is not None):
        self._queue_event(virtevent.LifecycleEvent(uuid, transition))
Receives lifecycle events from libvirt.

NB: this method is executing in a native thread, not
an eventlet coroutine. It can only invoke other libvirt
APIs, or use self.queue_event(). Any use of logging APIs
in particular is forbidden.
@staticmethod
def _event_lifecycle_callback(conn, dom, event, detail, opaque):
    'Receives lifecycle events from libvirt.\n\n        NB: this method is executing in a native thread, not\n        an eventlet coroutine. It can only invoke other libvirt\n        APIs, or use self.queue_event(). Any use of logging APIs\n        in particular is forbidden.\n        '
    self = opaque
    uuid = dom.UUIDString()
    transition = None
    if (event == libvirt.VIR_DOMAIN_EVENT_STOPPED):
        transition = virtevent.EVENT_LIFECYCLE_STOPPED
    elif (event == libvirt.VIR_DOMAIN_EVENT_STARTED):
        transition = virtevent.EVENT_LIFECYCLE_STARTED
    elif (event == libvirt.VIR_DOMAIN_EVENT_SUSPENDED):
        transition = virtevent.EVENT_LIFECYCLE_PAUSED
    elif (event == libvirt.VIR_DOMAIN_EVENT_RESUMED):
        transition = virtevent.EVENT_LIFECYCLE_RESUMED
    if (transition is not None):
        self._queue_event(virtevent.LifecycleEvent(uuid, transition))