mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-07-17 00:59:36 +03:00
Add support for SUSPEND_DISK event
This patch adds support for SUSPEND_DISK event; both lifecycle and separated. The support is added for QEMU, machines are changed to PMSUSPENDED, but as QEMU sends SHUTDOWN afterwards, the state changes to shut-off. This and much more needs to be done in order for libvirt to work with transient devices, wake-ups etc. This patch is not aiming for that functionality.
This commit is contained in:
@ -170,6 +170,15 @@
|
||||
cb(self, virDomain(self, _obj=dom), actual, opaque)
|
||||
return 0
|
||||
|
||||
def _dispatchDomainEventPMSuspendDiskCallback(self, dom, reason, cbData):
|
||||
"""Dispatches event to python user domain pmsuspend-disk event callbacks
|
||||
"""
|
||||
cb = cbData["cb"]
|
||||
opaque = cbData["opaque"]
|
||||
|
||||
cb(self, virDomain(self, _obj=dom), reason, opaque)
|
||||
return 0;
|
||||
|
||||
def domainEventDeregisterAny(self, callbackID):
|
||||
"""Removes a Domain Event Callback. De-registering for a
|
||||
domain callback will disable delivery of this event type """
|
||||
|
Reference in New Issue
Block a user