From 4248becb86df45d87e6a641d19cbe29a8ef94cf5 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Fri, 12 Oct 2012 21:13:39 +0200 Subject: 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. --- 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