Re: [libvirt] RFE: virConnectListAllDomains()

2012-05-20 Thread Peter Krempa
On 05/19/2012 01:52 AM, Eric Blake wrote: Use of virConnectListDomains() and virConnectListDefinedDomains() is: 1. inherently racy. A domain can change between active and inactive between two back-to-back calls, and thus be entirely skipped or enumerated twice when concatenating lists. 2.

[libvirt] [PATCH 0/5] Atomic api to list all domains

2012-05-20 Thread Peter Krempa
This patchset adds a atomic way to list guests. A more detailed description is in patch 1. Peter Krempa (5): lib: Add public api to enable atomic listing of guest python: add API exports for virConnectListAllDomains() remote: implement remote protocol for virConnectListAllDomains() qemu:

[libvirt] [PATCH 4/5] qemu: implement virConnectListAllDomains() for qemu driver

2012-05-20 Thread Peter Krempa
This patch adds a basic implementation of the listing code for virConnectListAllDomains() to qemu driver. The listing code does not support any filtering flags yet, but they may be easily added later. --- src/qemu/qemu_driver.c | 97 1 files

[libvirt] [PATCH 2/5] python: add API exports for virConnectListAllDomains()

2012-05-20 Thread Peter Krempa
This patch adds export of the new API function virConnectListAllDomains() to the libvirt-python bindings. The virConnect object now has method listAllDomains that takes only the flags parameter and returns a python list of virDomain object corresponding to virDomainPtrs returned by the underlying

[libvirt] [PATCH 1/5] lib: Add public api to enable atomic listing of guest

2012-05-20 Thread Peter Krempa
This patch adds a new public api that lists domains. The new approach is different from those used before. There are four key points to this: 1) The list is acquired atomicaly and contains both active and inactive domains (guests). This eliminates the need to call two different list APIs, where

[libvirt] [PATCH 5/5] virsh: add support for virConnectListAllDomains and clean up cmdList

2012-05-20 Thread Peter Krempa
This patch makes use of the newly added api virConnectListAllDomains() to list domains in virsh. To enable fallback virsh now represents lists of domains using an internal structure vshDomainList. This structure contains the virDomainPtr list as provided by virConnectListAllDomains() and the

[libvirt] [PATCH 3/5] remote: implement remote protocol for virConnectListAllDomains()

2012-05-20 Thread Peter Krempa
This patch wires up the RPC protocol handlers for virConnectListAllDomains(). The RPC generator has no support for the way how virConnectListAllDomains() returns the results so the handler code had to be done manually. The new api is handled by REMOTE_PROC_CONNECT_LIST_ALL_DOMAINS, with number