diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2010-04-08 16:01:00 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2010-04-09 16:24:28 +0100 |
commit | 73d5ccb8d2792ddf11c58e337039dd27f65923e2 (patch) | |
tree | 1c2740c99fa7a988998411ffb8caf5a385c0de4f /libvirt-override-virConnect.py | |
parent | 24f9a46106ff5f55bf225867f259573241061719 (diff) | |
download | libvirt-python-v6-73d5ccb8d2792ddf11c58e337039dd27f65923e2.tar.gz libvirt-python-v6-73d5ccb8d2792ddf11c58e337039dd27f65923e2.tar.xz libvirt-python-v6-73d5ccb8d2792ddf11c58e337039dd27f65923e2.zip |
More event callback fixesv0.8.0
In a couple of cases typos meant we were firing the wrong type
of event. In the python code my previous commit accidentally
missed some chunks of the code.
* python/libvirt-override-virConnect.py: Add missing python glue
accidentally left out of previous commit
* src/conf/domain_event.c, src/qemu/qemu_monitor_json.c: Fix typos
in event name / method name to invoke
Diffstat (limited to 'libvirt-override-virConnect.py')
-rw-r--r-- | libvirt-override-virConnect.py | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/libvirt-override-virConnect.py b/libvirt-override-virConnect.py index 444a499..cb38e3f 100644 --- a/libvirt-override-virConnect.py +++ b/libvirt-override-virConnect.py @@ -43,7 +43,7 @@ pass def dispatchDomainEventLifecycleCallback(self, dom, event, detail, cbData): - """Dispatches events to python user domain event callbacks + """Dispatches events to python user domain lifecycle event callbacks """ cb = cbData["cb"] opaque = cbData["opaque"] @@ -52,7 +52,7 @@ return 0 def dispatchDomainEventGenericCallback(self, dom, cbData): - """Dispatches events to python user domain event callbacks + """Dispatches events to python user domain generic event callbacks """ try: cb = cbData["cb"] @@ -63,6 +63,54 @@ except AttributeError: pass + def dispatchDomainEventRTCChangeCallback(self, dom, offset, cbData): + """Dispatches events to python user domain RTC change event callbacks + """ + try: + cb = cbData["cb"] + opaque = cbData["opaque"] + + cb(self, virDomain(self, _obj=dom), offset ,opaque) + return 0 + except AttributeError: + pass + + def dispatchDomainEventWatchdogCallback(self, dom, action, cbData): + """Dispatches events to python user domain watchdog event callbacks + """ + try: + cb = cbData["cb"] + opaque = cbData["opaque"] + + cb(self, virDomain(self, _obj=dom), action, opaque) + return 0 + except AttributeError: + pass + + def dispatchDomainEventIOErrorCallback(self, dom, srcPath, devAlias, action, cbData): + """Dispatches events to python user domain IO error event callbacks + """ + try: + cb = cbData["cb"] + opaque = cbData["opaque"] + + cb(self, virDomain(self, _obj=dom), opaque) + return 0 + except AttributeError: + pass + + def dispatchDomainEventGraphicsCallback(self, dom, phase, localAddr, remoteAddr, authScheme, subject, cbData): + """Dispatches events to python user domain graphics event callbacks + """ + try: + cb = cbData["cb"] + opaque = cbData["opaque"] + + cb(self, virDomain(self, _obj=dom), phase, localAddr, remoteAddr, authScheme, subject, opaque) + return 0 + except AttributeError: + pass + def domainEventDeregisterAny(self, callbackID): """Removes a Domain Event Callback. De-registering for a domain callback will disable delivery of this event type """ |