diff options
author | Osier Yang <jyang@redhat.com> | 2012-03-23 22:43:14 +0800 |
---|---|---|
committer | Osier Yang <jyang@redhat.com> | 2012-03-23 23:12:14 +0800 |
commit | 29b16a45d77586672631537bfe877455fa5527ac (patch) | |
tree | 82f4718f800d526cfda16f6343d16396f61f53e1 /libvirt-override-virConnect.py | |
parent | 4b6a7b3fce2e30e600db5bee484badfe25f8e3f2 (diff) | |
download | libvirt-python-v6-29b16a45d77586672631537bfe877455fa5527ac.tar.gz libvirt-python-v6-29b16a45d77586672631537bfe877455fa5527ac.tar.xz libvirt-python-v6-29b16a45d77586672631537bfe877455fa5527ac.zip |
Add support for the wakeup event
This patch introduces a new event type for the QMP event
WAKEUP:
VIR_DOMAIN_EVENT_ID_PMWAKEUP
The event doesn't take any data, but considering there might
be reason for wakeup in future, the callback definition is:
typedef void
(*virConnectDomainEventWakeupCallback)(virConnectPtr conn,
virDomainPtr dom,
int reason,
void *opaque);
"reason" is unused currently, always passes "0".
Diffstat (limited to 'libvirt-override-virConnect.py')
-rw-r--r-- | libvirt-override-virConnect.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libvirt-override-virConnect.py b/libvirt-override-virConnect.py index 82c2437..2d48828 100644 --- a/libvirt-override-virConnect.py +++ b/libvirt-override-virConnect.py @@ -143,6 +143,14 @@ cb(self, virDomain(self, _obj=dom), devAlias, reason, opaque) return 0; + def _dispatchDomainEventPMWakeupCallback(self, dom, reason, cbData): + """Dispatches event to python user domain pmwakeup 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 |