diff options
author | Eric Blake <eblake@redhat.com> | 2014-06-18 10:49:27 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2014-06-18 10:49:27 -0600 |
commit | 09a14b5d5e530e92c4c5f518b1188215140785b8 (patch) | |
tree | 3fe9045c9d4289b9b2effc84f6ab7ee777d328d8 /libvirt-override-virConnect.py | |
parent | b5e36a39581dbb8f64a9891fcd976c58af7f1e1e (diff) | |
download | libvirt-python-09a14b5d5e530e92c4c5f518b1188215140785b8.tar.gz |
blockjob: support new BLOCK_JOB_2 event
Libvirt 1.2.6 is introducing a new block job event that passes disk
information by target device rather than host file name. At the
python level, we are just a passthrough, so we can reuse all the
existing code and just wire up the new enum value.
* libvirt-override-virConnect.py
(_dispatchDomainEventBlockPullCallback): Rename...
(_dispatchDomainEventBlockJobCallback): ...to this, and make
generic to both events.
* libvirt-override.c
(libvirt_virConnectDomainEventBlockJobCallback): Match naming.
(libvirt_virConnectDomainEventRegisterAny): Allow new registration.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'libvirt-override-virConnect.py')
-rw-r--r-- | libvirt-override-virConnect.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libvirt-override-virConnect.py b/libvirt-override-virConnect.py index c228eb2..31d71a3 100644 --- a/libvirt-override-virConnect.py +++ b/libvirt-override-virConnect.py @@ -113,14 +113,14 @@ authScheme, subject, opaque) return 0 - def _dispatchDomainEventBlockPullCallback(self, dom, path, type, status, cbData): - """Dispatches events to python user domain blockJob event callbacks + def _dispatchDomainEventBlockJobCallback(self, dom, disk, type, status, cbData): + """Dispatches events to python user domain blockJob/blockJob2 event callbacks """ try: cb = cbData["cb"] opaque = cbData["opaque"] - cb(self, virDomain(self, _obj=dom), path, type, status, opaque) + cb(self, virDomain(self, _obj=dom), disk, type, status, opaque) return 0 except AttributeError: pass |