On Fri, Jan 31, 2014 at 07:12:09PM -0700, Eric Blake wrote:
These are the first async events in the qemu protocol, so this
patch looks rather big compared to most RPC additions. However,
a large majority of this patch is just mechanical copy-and-paste
from recently-added network events. It didn't help that this
is also the first virConnect rather than virDomain prefix
associated with a qemu-specific API.
* src/remote/qemu_protocol.x (qemu_*_domain_monitor_event_*): New
structs and RPC messages.
* src/rpc/gendispatch.pl: Adjust naming conventions.
* daemon/libvirtd.h (daemonClientPrivate): Track qemu events.
* daemon/remote.c (remoteClientFreeFunc): Likewise.
(remoteRelayDomainQemuMonitorEvent)
(qemuDispatchConnectDomainMonitorEventRegister)
(qemuDispatchConnectDomainMonitorEventDeregister): New functions.
* src/remote/remote_driver.c (qemuEvents): Handle qemu events.
(doRemoteOpen): Register for events.
(remoteNetworkBuildEventLifecycle)
(remoteConnectDomainQemuMonitorEventRegister)
(remoteConnectDomainQemuMonitorEventDeregister): New functions.
* src/qemu_protocol-structs: Regenerate.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
daemon/libvirtd.h | 2 +
daemon/remote.c | 209 +++++++++++++++++++++++++++++++++++++++++++++
src/qemu_protocol-structs | 22 +++++
src/remote/qemu_protocol.x | 50 ++++++++++-
src/remote/remote_driver.c | 149 +++++++++++++++++++++++++++++++-
src/rpc/gendispatch.pl | 13 +--
6 files changed, 434 insertions(+), 11 deletions(-)
It sure would be nice if we could keep all the QEMU specific
bits in QEMU code and have the driver register against some
daemon APIs somehow, but that's a cleanup for another day
long in the future.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|