summaryrefslogtreecommitdiffstats
path: root/libvirt-override-virConnect.py
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2012-10-12 21:13:39 +0200
committerMartin Kletzander <mkletzan@redhat.com>2012-10-15 12:09:10 +0200
commit4248becb86df45d87e6a641d19cbe29a8ef94cf5 (patch)
tree38c2a0d962b831bbf0501b78a25fdf993792fd97 /libvirt-override-virConnect.py
parentc360b84ba0d464c06d0e617ed753a71a84e8e8ee (diff)
downloadlibvirt-python-v9-4248becb86df45d87e6a641d19cbe29a8ef94cf5.tar.gz
libvirt-python-v9-4248becb86df45d87e6a641d19cbe29a8ef94cf5.tar.xz
libvirt-python-v9-4248becb86df45d87e6a641d19cbe29a8ef94cf5.zip
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.
Diffstat (limited to 'libvirt-override-virConnect.py')
-rw-r--r--libvirt-override-virConnect.py9
1 files changed, 9 insertions, 0 deletions
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 """