From 2508c934bc82e40a1b35271e6ad8bcd73c05a73b Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Mon, 15 Oct 2012 12:10:45 +0200 Subject: Add support for SUSPEND_DISK event https://bugzilla.redhat.com/show_bug.cgi?id=839661 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. (cherry picked from commit 7ba5defb5a34bb82de2f16467c2b8d157cd14d2d) --- libvirt-override-virConnect.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libvirt-override-virConnect.py') diff --git a/libvirt-override-virConnect.py b/libvirt-override-virConnect.py index 6bec66d..cb8d892 100644 --- a/libvirt-override-virConnect.py +++ b/libvirt-override-virConnect.py @@ -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 """ -- cgit v1.2.1