diff options
author | Martin Kletzander <mkletzan@redhat.com> | 2012-10-15 12:10:45 +0200 |
---|---|---|
committer | Jiri Denemark <jdenemar@redhat.com> | 2012-10-15 12:29:00 +0200 |
commit | 2508c934bc82e40a1b35271e6ad8bcd73c05a73b (patch) | |
tree | 3605803d8a853f449997e21da40de4fb44f712e9 /libvirt-override-virConnect.py | |
parent | cd4d093eef4a3a5ff7e2df436ba52501186634ec (diff) | |
download | libvirt-python-2508c934bc82e40a1b35271e6ad8bcd73c05a73b.tar.gz |
Add support for SUSPEND_DISK eventlibvirt-0.10.2-9.el6libvirt-0.10.2-8.el6libvirt-0.10.2-7.el6libvirt-0.10.2-6.el6libvirt-0.10.2-5.el6libvirt-0.10.2-4.el6libvirt-0.10.2-3.el6libvirt-0.10.2-18.el6libvirt-0.10.2-17.el6libvirt-0.10.2-16.el6libvirt-0.10.2-15.el6libvirt-0.10.2-14.el6libvirt-0.10.2-13.el6libvirt-0.10.2-12.el6libvirt-0.10.2-11.el6libvirt-0.10.2-10.el6
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)
Diffstat (limited to 'libvirt-override-virConnect.py')
-rw-r--r-- | libvirt-override-virConnect.py | 9 |
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 """ |