This new API solves several problems: - calling virDomainGetInfo for just getting domain status is an overkill since it may result in sending requests to guest OS - since virDomainGetInfo can hang when guest OS is not responding and it is used by virsh list, listing domains can hang - virDomainGetState provides additional info about what action led to domain's current state, which can be used instead of listening to domain events I'm undecided whether this API should support flags parameter or not. On one hand the API seems simple and focused enough not to allow any fine-tuning but on the other hand we've already had too many issues with APIs that didn't support flags. Another thing is that it would be nice to somehow report that a domain is running but libvirt is currently waiting for reply from hypervisor and is not able to do anything else with the domain until it gets the reply. In case of qemu driver, this translates to the driver being stuck in comunication with qemu monitor. I'm not sure if we should somehow integrate this into virDomainGetState API. Probably not. Jiri Denemark (8): virDomainGetState public API Internal driver API for virDomainGetState virDomainGetState public API implementation Wire protocol format and dispatcher for virDomainGetState virsh: Prefer virDomainGetState over virDomainGetInfo remote: Implement virDomainGetState Implement basic virDomainGetState in all drivers Implement domain state reason daemon/remote.c | 33 ++++++ daemon/remote_dispatch_prototypes.h | 8 ++ daemon/remote_dispatch_table.h | 5 + include/libvirt/libvirt.h.in | 55 ++++++++++ python/generator.py | 1 + python/libvirt-override-api.xml | 5 + python/libvirt-override.c | 26 +++++ src/conf/domain_conf.c | 163 ++++++++++++++++++++++++++++- src/conf/domain_conf.h | 26 +++++- src/driver.h | 5 + src/esx/esx_driver.c | 53 ++++++++++ src/libvirt.c | 47 +++++++++ src/libvirt_private.syms | 4 + src/libvirt_public.syms | 5 + src/libxl/libxl_driver.c | 75 ++++++++++--- src/lxc/lxc_driver.c | 76 ++++++++++---- src/openvz/openvz_conf.c | 16 ++- src/openvz/openvz_driver.c | 52 ++++++++-- src/phyp/phyp_driver.c | 11 ++ src/qemu/qemu_driver.c | 90 ++++++++++++----- src/qemu/qemu_migration.c | 24 +++-- src/qemu/qemu_process.c | 61 +++++++----- src/qemu/qemu_process.h | 12 ++- src/remote/remote_driver.c | 30 ++++++ src/remote/remote_protocol.c | 20 ++++ src/remote/remote_protocol.h | 16 +++ src/remote/remote_protocol.x | 12 ++- src/remote_protocol-structs | 7 ++ src/test/test_driver.c | 102 +++++++++++++------ src/uml/uml_driver.c | 53 ++++++++-- src/vbox/vbox_tmpl.c | 55 ++++++++++ src/vmware/vmware_conf.c | 3 +- src/vmware/vmware_driver.c | 55 ++++++++--- src/xen/xen_driver.c | 17 +++ src/xen/xen_driver.h | 1 + src/xen/xen_hypervisor.c | 33 ++++++ src/xen/xen_hypervisor.h | 4 + src/xen/xen_inotify.c | 1 + src/xen/xend_internal.c | 96 +++++++++++++----- src/xen/xend_internal.h | 1 + src/xen/xm_internal.c | 18 +++ src/xen/xm_internal.h | 1 + src/xen/xs_internal.c | 31 ++++++ src/xen/xs_internal.h | 3 + src/xenapi/xenapi_driver.c | 44 ++++++++ tools/virsh.c | 195 +++++++++++++++++++++++++++++------ 46 files changed, 1415 insertions(+), 236 deletions(-) -- 1.7.5.rc3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list