[libvirt] [Libvirt][PATCH] ESX: Fix ESX_VI__TEMPLATE__DYNAMIC_DEEP_COPY

2012-07-19 Thread Ata E Husain Bohra
Fix addresses two issues: 1. Fix generator code to allow deep copy operation for objects with Dynamic_Cast capabilities. 2. Add missing deep copy routine to Long datatype. Signed-off-by: Ata E Husain Bohra ata.hus...@hotmail.com --- src/esx/esx_vi_generator.py |2 +- src/esx/esx_vi_types.c

Re: [libvirt] [PATCH] Added timestamps to storage volumes

2012-07-19 Thread Hendrik Schwartke
I reconsidered the way timestamps are represented. I think that an event at 100.91 happened before 100.200 is misleading. So I changed that. Furthermore I would appreciate if the timestamps are available in 0.10.0, so I splitted the patch. The first patch doesn't use stat-time and the second

[libvirt] [PATCH 1/2] Added timestamps to storage volumes

2012-07-19 Thread Hendrik Schwartke
The access, birth, modification and change times are added to storage volumes and corresponding xml representations. --- docs/formatstorage.html.in| 27 +++ docs/schemas/storagevol.rng | 39 +++ src/conf/storage_conf.c |

[libvirt] [PATCH 2/2] Add stat-time to get timestamps

2012-07-19 Thread Hendrik Schwartke
!!! DON'T PUSH until stat-time lgpl 3 issue is fixed !!! To tests this change lgpl version to 3 in bootstrap.conf:176 stat-time offers a much cleaner way of getting timestamps than the current implementation. Therefor the implementation is changed. --- bootstrap.conf|1 +

Re: [libvirt] [PATCH 01/16] Add missing deps on driver modules in libvirt RPM

2012-07-19 Thread Daniel Veillard
On Wed, Jul 18, 2012 at 05:32:22PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Turning on the building of driver modules in libvirt.spec.in means that installing 'libvirt' no longer pulls in all the drivers. For upgrade compatibility we need to list all

Re: [libvirt] [PATCH 02/16] Don't autostart domains when reloading config

2012-07-19 Thread Daniel Veillard
On Wed, Jul 18, 2012 at 05:32:23PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When sending SIGHUP to libvirtd, it will trigger the virStateDriver reload operation. This is intended to reload the configuration files for guests. For unknown historical reasons

Re: [libvirt] [PATCH 04/16] If in delay close mode for an RPC client, don't read further data

2012-07-19 Thread Daniel Veillard
On Wed, Jul 18, 2012 at 05:32:25PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com In the delayed close mode, we're just waiting for final data to be written back to the client. While waiting, we should not bother to read more data from the client.

Re: [libvirt] [PATCH 05/16] Reset the 'quit' flag in virNetServerRun

2012-07-19 Thread Daniel Veillard
On Wed, Jul 18, 2012 at 05:32:26PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com To allow virNetServerRun/virNetServerQuit to be invoked multiple times, we must reset the 'quit' flag in virNetServerRun Signed-off-by: Daniel P. Berrange berra...@redhat.com

Re: [libvirt] [PATCH 06/16] Process all pending I/O for a RPC client before checking EOF

2012-07-19 Thread Daniel Veillard
On Wed, Jul 18, 2012 at 05:32:27PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com In the socket event handler for the RPC client we must deal with read/write events, before checking for EOF, otherwise we might close the socket before we've read acted upon the

Re: [libvirt] [PATCH 07/16] Add lots of internal symbols to libvirt_private.syms

2012-07-19 Thread Daniel Veillard
On Wed, Jul 18, 2012 at 05:32:28PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Make sure that libvirt_private.syms has all the internal symbols from APIs in src/rpc/*.h and src/util/cgroup.h, since the LXC controller/driver will shortly need them

Re: [libvirt] [PATCH 03/16] Add callback to virNetClient to be invoked on EOF

2012-07-19 Thread Daniel Veillard
On Wed, Jul 18, 2012 at 05:32:24PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Allow detection of EOF in virNetClient via an callback function, triggered from the socket event handler Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

Re: [libvirt] [PATCH 08/16] Move LXC domain private data into separate file

2012-07-19 Thread Daniel Veillard
On Wed, Jul 18, 2012 at 05:32:29PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Move the LXC driver code related to the virDomainObjPtr private data into separate lxc_domain.{c,h} files to reduce the size of lxc_driver.c Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH 09/16] Move cgroup setup code out of lxc_controller.c

2012-07-19 Thread Daniel Veillard
On Wed, Jul 18, 2012 at 05:32:30PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Move the cgroup setup code out of the lxc_controller.c file and into lxc_cgroup.{c,h}. This reduces the size of the lxc_controller.c file and paves the way to invoke cgroup setup

Re: [libvirt] [PATCH 09/16] Move cgroup setup code out of lxc_controller.c

2012-07-19 Thread Daniel P. Berrange
On Thu, Jul 19, 2012 at 04:37:14PM +0800, Daniel Veillard wrote: On Wed, Jul 18, 2012 at 05:32:30PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Move the cgroup setup code out of the lxc_controller.c file and into lxc_cgroup.{c,h}. This reduces the size

Re: [libvirt] [PATCH libvirt-glib] gobject: add GVir.DomainXMLFlags binding

2012-07-19 Thread Christophe Fergeau
On Wed, Jul 18, 2012 at 07:02:43PM +0200, Marc-André Lureau wrote: --- libvirt-gobject/libvirt-gobject-domain.c |2 +- libvirt-gobject/libvirt-gobject-domain.h | 14 ++ libvirt-gobject/libvirt-gobject.sym |5 + 3 files changed, 20 insertions(+), 1 deletion(-)

Re: [libvirt] [PATCH 09/16] Move cgroup setup code out of lxc_controller.c

2012-07-19 Thread Daniel Veillard
On Thu, Jul 19, 2012 at 09:54:31AM +0100, Daniel P. Berrange wrote: On Thu, Jul 19, 2012 at 04:37:14PM +0800, Daniel Veillard wrote: On Wed, Jul 18, 2012 at 05:32:30PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Move the cgroup setup code out of the

Re: [libvirt] [PATCH 03/16] Add callback to virNetClient to be invoked on EOF

2012-07-19 Thread Daniel P. Berrange
On Thu, Jul 19, 2012 at 04:18:33PM +0800, Daniel Veillard wrote: @@ -1636,17 +1657,21 @@ void virNetClientIncomingEvent(virNetSocketPtr sock, VIR_DEBUG(%s : VIR_EVENT_HANDLE_HANGUP or VIR_EVENT_HANDLE_ERROR encountered, __FUNCTION__);

Re: [libvirt] [PATCH 03/16] Add callback to virNetClient to be invoked on EOF

2012-07-19 Thread Jiri Denemark
On Wed, Jul 18, 2012 at 17:32:24 +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Allow detection of EOF in virNetClient via an callback function, triggered from the socket event handler EOF callback is nice but since we have keepalive, sockets can also be closed

[libvirt] [PATCH] doc: update the minimum value for nodesuspend time duration

2012-07-19 Thread Guannan Ren
libvirt asks the duration time is above 60 seconds in code src/util/virnodesuspend.c: define MIN_TIME_REQ_FOR_SUSPEND 60 /* in seconds */ We should update the information in virsh help and manpage. --- tools/virsh.c |3 ++- tools/virsh.pod |3 ++- 2 files changed, 4 insertions(+),

Re: [libvirt] [PATCH 03/16] Add callback to virNetClient to be invoked on EOF

2012-07-19 Thread Daniel P. Berrange
On Thu, Jul 19, 2012 at 10:59:40AM +0200, Jiri Denemark wrote: On Wed, Jul 18, 2012 at 17:32:24 +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Allow detection of EOF in virNetClient via an callback function, triggered from the socket event handler EOF

Re: [libvirt] [PATCH 03/16] Add callback to virNetClient to be invoked on EOF

2012-07-19 Thread Daniel Veillard
On Thu, Jul 19, 2012 at 09:58:58AM +0100, Daniel P. Berrange wrote: On Thu, Jul 19, 2012 at 04:18:33PM +0800, Daniel Veillard wrote: @@ -1636,17 +1657,21 @@ void virNetClientIncomingEvent(virNetSocketPtr sock, VIR_DEBUG(%s : VIR_EVENT_HANDLE_HANGUP or

Re: [libvirt] [PATCH 03/16] Add callback to virNetClient to be invoked on EOF

2012-07-19 Thread Daniel P. Berrange
On Thu, Jul 19, 2012 at 05:44:13PM +0800, Daniel Veillard wrote: On Thu, Jul 19, 2012 at 09:58:58AM +0100, Daniel P. Berrange wrote: On Thu, Jul 19, 2012 at 04:18:33PM +0800, Daniel Veillard wrote: @@ -1636,17 +1657,21 @@ void virNetClientIncomingEvent(virNetSocketPtr sock,

Re: [libvirt] [PATCH 19/23] Replace use of qemuReportError with virReportError

2012-07-19 Thread Peter Krempa
On 07/18/12 20:40, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the QEMU driver to use virReportError instead of the qemuReportError custom macro Signed-off-by: Daniel P. Berrange berra...@redhat.com --- cfg.mk |1 -

[libvirt] Unable to startVM in Power PC

2012-07-19 Thread B Veera-B37207
Hi, Here is my xml file domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0' nameTest/name uuidaaec5748-56a9-e2fe-655c-c08ca3a4c097/uuid memory unit='KiB'65536/memory currentMemory unit='KiB'65536/currentMemory vcpu placement='static'1/vcpu os type

[libvirt] [PATCH v2] virsh man page - domain-id consistency

2012-07-19 Thread Jan Tomko
Using 'domain' to represent domain name, domain id or uuid all over the man page, to be consistent with virsh help. --- diff to v1: I used domain-id instead of domain, per Eric's review comments. tools/virsh.pod | 145 +++ 1 files changed, 72

Re: [libvirt] [PATCH 02/23] Replace use of umlReportError with virReportError

2012-07-19 Thread Peter Krempa
On 07/18/12 20:40, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the UML driver to use virReportError instead of the umlReportError custom macro Signed-off-by: Daniel P. Berrange berra...@redhat.com --- cfg.mk |1 - src/uml/uml_conf.c |

Re: [libvirt] [PATCH] [libvirt-java] Fix javadoc warnings.

2012-07-19 Thread Claudio Bley
ping... ?! Isn't this the appropriate list? What's the status of libvirt-java? Best Regards, Claudio At Mon, 09 Jul 2012 10:23:42 +0200, Claudio Bley wrote: Here's a patch fixing these javadoc warnings: --- [javadoc] x:\src\libvirt-java\src\main\java\org\libvirt\Connect.java:387:

Re: [libvirt] [PATCH 21/23] Replace use of xenapiError with virReportError

2012-07-19 Thread Peter Krempa
On 07/18/12 20:40, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the XenAPI driver to use virReportError instead of the xenapiError custom macro Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/xenapi/xenapi_driver.c | 12 1 file

Re: [libvirt] [PATCH v2 4/5] Support for multiple default security drivers in QEMU config

2012-07-19 Thread Michal Privoznik
On 18.07.2012 03:28, Marcelo Cerri wrote: This patch replaces the key security_driver in QEMU config by security_drivers, which accepts a list of default drivers. If security_drivers can't be found, libvirt will use security_driver to ensure that it will remain compatible with older version of

Re: [libvirt] [PATCH v2 5/5] Update the remote API

2012-07-19 Thread Michal Privoznik
re: $SUBJ well, you are introducing whole new API, so it is not just a remote :) And maybe it's worth splitting into separate commits as advised here: http://libvirt.org/api_extension.html But from time to time we accept new API completely introduced, documented and implemented in one patch.

[libvirt] libvirt qemu cgroup problem

2012-07-19 Thread faicker mo
I want to use the cgroup with libvirt+qemu. The VM runs well. But the libvirt report error, here is the libvirt debug info: 2012-07-19 09:40:10.726+: 32341: debug : virCgroupNew:603 : New group / 2012-07-19 09:40:10.726+: 32341: info : qemudStartup:597 : Unable to create cgroup for

Re: [libvirt] [PATCH] doc: update the minimum value for nodesuspend time duration

2012-07-19 Thread Eric Blake
On 07/19/2012 03:05 AM, Guannan Ren wrote: libvirt asks the duration time is above 60 seconds in code src/util/virnodesuspend.c: define MIN_TIME_REQ_FOR_SUSPEND 60 /* in seconds */ We should update the information in virsh help and manpage. --- tools/virsh.c |3 ++-

Re: [libvirt] [PATCHv2 2/6] domain_conf: Add USB controler model none

2012-07-19 Thread Peter Krempa
On 07/18/12 23:40, Daniel P. Berrange wrote: On Thu, Jul 12, 2012 at 11:30:56AM +0200, Peter Krempa wrote: Libvirt adds a USB controller to the guest even if the user does not specify any in the XML. This is due to back-compat reasons. To allow disabling USB for a guest this patch adds a new

Re: [libvirt] [PATCH] [libvirt-java] Fix javadoc warnings.

2012-07-19 Thread Eric Blake
On 07/19/2012 06:31 AM, Claudio Bley wrote: ping... ?! Isn't this the appropriate list? What's the status of libvirt-java? This is the right list. Unfortunately, at the moment libvirt-java does not have an active maintainer; there have been several patches proposed lately by various

Re: [libvirt] [PATCH 19/23] Replace use of qemuReportError with virReportError

2012-07-19 Thread Daniel P. Berrange
On Thu, Jul 19, 2012 at 12:51:04PM +0200, Peter Krempa wrote: On 07/18/12 20:40, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the QEMU driver to use virReportError instead of the qemuReportError custom macro Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH] Added timestamps to storage volumes

2012-07-19 Thread Eric Blake
On 07/19/2012 01:13 AM, Hendrik Schwartke wrote: I reconsidered the way timestamps are represented. I think that an event at 100.91 happened before 100.200 is misleading. Yep, definite bug - you have to zero-pad the subsecond resolution, and also consider whether to strip trailing zeros. So I

Re: [libvirt] [PATCH] qemu: Set reasonable RSS limit on domain startup

2012-07-19 Thread Paolo Bonzini
Il 18/07/2012 22:17, Daniel P. Berrange ha scritto: Looks like a good change. My only question would be if its better to look up the guest video RAM instead of assuming that QEMU overhead + guest video RAM will amount to no more than about 200MB (I say about because of the 1.02 fudge

Re: [libvirt] [PATCH 03/13] Rewrite virAtomic APIs using GLib's atomic ops code

2012-07-19 Thread Eric Blake
On 07/18/2012 07:07 PM, Hu Tao wrote: ... + +# define virAtomicIntGet(atomic) \ +(__extension__ ({ \ +verify (sizeof(*(atomic)) == sizeof(int)); \ +(void)

Re: [libvirt] [PATCH 03/23] Replace use of vboxError with virReportError

2012-07-19 Thread Peter Krempa
On 07/18/12 20:40, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the VirtualBox driver to use virReportError instead of the vboxError custom macro Signed-off-by: Daniel P. Berrange berra...@redhat.com --- cfg.mk |1 -

Re: [libvirt] [PATCH 1/2] Added timestamps to storage volumes

2012-07-19 Thread Eric Blake
On 07/19/2012 01:13 AM, Hendrik Schwartke wrote: The access, birth, modification and change times are added to storage volumes and corresponding xml representations. --- docs/formatstorage.html.in| 27 +++ docs/schemas/storagevol.rng | 39

Re: [libvirt] [PATCH 03/23] Replace use of vboxError with virReportError

2012-07-19 Thread Eric Blake
On 07/18/2012 12:40 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the VirtualBox driver to use virReportError instead of the vboxError custom macro Signed-off-by: Daniel P. Berrange berra...@redhat.com --- ACK. -- Eric Blake ebl...@redhat.com

Re: [libvirt] [PATCH 05/23] Replace use of virCPUReportError with virReportError

2012-07-19 Thread Jiri Denemark
On Wed, Jul 18, 2012 at 19:40:41 +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the CPU helper APIs to use virReportError instead of the virCPUReportError custom macor Signed-off-by: Daniel P. Berrange berra...@redhat.com --- cfg.mk|

Re: [libvirt] [PATCH 07/23] Replace use of XENXS_ERROR with virReportError

2012-07-19 Thread Jiri Denemark
On Wed, Jul 18, 2012 at 19:40:43 +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the XenXS shared code to use virReportError instead of the XENXS_ERROR custom macro Signed-off-by: Daniel P. Berrange berra...@redhat.com --- cfg.mk|

Re: [libvirt] [PATCH 04/23] Replace use of testError with virReportError

2012-07-19 Thread Peter Krempa
On 07/18/12 20:40, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the test driver to use virReportError instead of the testError custom macro Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/test/test_driver.c | 509

Re: [libvirt] [PATCH 08/23] Replace use of vmwareError with virReportError

2012-07-19 Thread Peter Krempa
On 07/18/12 20:40, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the VMWare driver to use virReportError instead of the vmwareError custom macro Signed-off-by: Daniel P. Berrange berra...@redhat.com --- cfg.mk |1 -

Re: [libvirt] [PATCH 18/23] Replace use of streamsReportError with virReportError

2012-07-19 Thread Peter Krempa
On 07/18/12 20:40, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the streams code to use virReportError instead of the streamsReportError custom macro Signed-off-by: Daniel P. Berrange berra...@redhat.com --- cfg.mk |1 - src/fdstream.c | 69

[libvirt] [PATCH 3/5] Add callback to virNetClient to be invoked on connection close

2012-07-19 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Allow detection of socket close in virNetClient via an callback function, triggered on any condition that causes the socket to be close. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/rpc/virnetclient.c | 35

[libvirt] [PATCH 2/5] Ensure client is marked for close in all error paths

2012-07-19 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently if the keepalive timer triggers, the 'markClose' flag is set on the virNetClient. A controlled shutdown will then be performed. If an I/O error occurs during read or write of the connection an error is raised back to the caller, but the

[libvirt] [PATCH 1/5] Add public API to register a callback to be invoked on connection close

2012-07-19 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Define a new virConnectSetCloseCallback() public API which allows registering a callback to be invoked when the connection to a hypervisor is closed. The callback is provided with the reason for the close, which may be 'error', 'eof' or 'keepalive'.

[libvirt] [PATCH 4/5] Update remote driver to support the connection close callbacks

2012-07-19 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Update the remote driver to use the virNetClient close callback to trigger the virConnectPtr close callbacks Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/remote/remote_driver.c | 18 ++ 1 file changed, 18

Re: [libvirt] [PATCH] qemu: Set reasonable RSS limit on domain startup

2012-07-19 Thread Eric Blake
On 07/19/2012 08:10 AM, Paolo Bonzini wrote: Il 18/07/2012 22:17, Daniel P. Berrange ha scritto: Looks like a good change. My only question would be if its better to look up the guest video RAM instead of assuming that QEMU overhead + guest video RAM will amount to no more than about 200MB (I

[libvirt] [PATCH 5/5] Extend events demo to show close callbacks in use

2012-07-19 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Use a driver close callback to trigger shutdown of the events demo program Signed-off-by: Daniel P. Berrange berra...@redhat.com --- examples/domain-events/events-c/event-test.c | 33 -- 1 file changed, 31 insertions(+), 2

[libvirt] [PATCH] Fix Xen driver to have sensible error messages

2012-07-19 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The Xen driver had a number of error reports which passed a constant string without format specifiers and was missing %s. Furthermore the errors were related to failing system calls, but virReportSystemError was not used. So the only useful piece of

Re: [libvirt] [PATCH 12/23] Replace use of custom macros with virReportError in the Xen drivers

2012-07-19 Thread Daniel P. Berrange
On Wed, Jul 18, 2012 at 07:40:48PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update the legacy Xen drivers to use virReportError instead of the statsError, virXenInotifyError, virXenStoreError, virXendError, xenUnifiedError, xenXMError custom macros

[libvirt] [PATCH 05/50] list: Add helpers for listing storage pool objects

2012-07-19 Thread Osier Yang
src/conf/virobjectlist.c: Add virStoragePoolMatch to filter the pools; Add virStoragePoolList to iterate over the pool objects with filter. src/conf/virobjectlist.h: Declare virStoragePoolMatch, virStoragePoolList, and the macros for filters. src/libvirt_private.syms: Export helper

[libvirt] [PATCH 00/50] Atomic APIs to list objects

2012-07-19 Thread Osier Yang
Except the already supported APIs for domain and domain snapshot, this series add the APIs for all the left objects, including storage pool, storage vol, network, interface, node device, nwfilter, secret. * Storage pool: - Support filtering the returned pool objects by active|inactive,

[libvirt] [PATCH 13/50] virsh: Use vshPrint instead of printf

2012-07-19 Thread Osier Yang
--- tools/virsh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 2415053..aee0290 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -18369,7 +18369,7 @@ cmdQemuMonitorCommand(vshControl *ctl, const vshCmd *cmd) if

[libvirt] [PATCH 09/50] list: Add helper to convert strings separated by ', ' to array

2012-07-19 Thread Osier Yang
tools/virsh.c: New helper function vshStringToArray, use the helper in cmdUndefine. --- tools/virsh.c | 107 +++-- 1 files changed, 66 insertions(+), 41 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 40f3be3..9c3b565 100644 ---

[libvirt] [PATCH 01/50] Fix indentions

2012-07-19 Thread Osier Yang
Some of the macros use tab, while the left use spaces, this patch change it to always use the tab. And a few aligning fixes. --- src/datatypes.h | 48 1 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/datatypes.h

[libvirt] [PATCH 04/50] list: Define new API virStorageListALlStoragePools

2012-07-19 Thread Osier Yang
This introduces a new API to list the storage pool objects, 4 groups of flags are provided to filter the returned pools: * Active or not * Autostarting or not * Persistent or not * And the pool type. include/libvirt/libvirt.h.in: New enum virConnectListAllStoragePoolFlags;

[libvirt] [PATCH 06/50] list: Implement the RPC calls for virConnectListAllStoragePools

2012-07-19 Thread Osier Yang
The RPC generator doesn't support returning list of object, this patch do the work manually. * daemon/remote.c: Implement the server side handler remoteDispatchConnectListAllStoragePools * src/remote/remote_driver.c: Add remote driver handler remoteConnectListAllStoragePools. *

[libvirt] [PATCH 07/50] list: Implement listAllStoragePools for storage driver

2012-07-19 Thread Osier Yang
src/storage/storage_driver.c: Implement listAllStoragePools. --- src/storage/storage_driver.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 39dc13b..1356a96 100644 ---

[libvirt] [PATCH 23/50] list: Add helpers to list network objects

2012-07-19 Thread Osier Yang
src/conf/virobjectlist.c: Add virNetworkMatch to filter the networks; and virNetworkList to iterate over all the networks with the filter. src/conf/virobjectlist.h: Declare virNetworkList and define the macros for filters. src/libvirt_private.syms: Export virNetworkList. ---

[libvirt] [PATCH 17/50] list: Implement virStoragePoolListAllVolumes for storage driver

2012-07-19 Thread Osier Yang
src/storage/storage_driver.c: Implement poolListAllVolumes. --- src/storage/storage_driver.c | 67 ++ 1 files changed, 67 insertions(+), 0 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 1356a96..31ceb00 100644

[libvirt] [PATCH 08/50] list: Implement listAllStoragePools for test driver

2012-07-19 Thread Osier Yang
src/test/test_driver.c: Implement listAllStoragePools --- src/test/test_driver.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 0207dc6..8aee142 100644 --- a/src/test/test_driver.c +++

[libvirt] [PATCH 20/50] list: Expose virStoragePoolListAllVolumes to Python binding

2012-07-19 Thread Osier Yang
The implementation is done manually as the generator does not support wrapping lists of C pointers into Python objects. python/libvirt-override-api.xml: Document python/libvirt-override-virStoragePool.py: * New file, includes implementation of listAllVolumes. python/libvirt-override.c:

[libvirt] [PATCH 02/50] list: Expose pool type via virStoragePoolGetInfo

2012-07-19 Thread Osier Yang
Mainly for later patches' use, to filter the pools by pool type. include/libvirt/libvirt.h.in: Add enum virStoragePoolType; Add pool type to virStoragePoolInfo. src/conf/storage_conf.h: Remove enum virStoragePoolType. src/storage/storage_driver.c: Expose pool type via storagePoolGetInfo. ---

[libvirt] [PATCH 15/50] list: Define new API virStoragePoolListAllVolumes

2012-07-19 Thread Osier Yang
Simply returns the storage volume objects. No supported filter flags. include/libvirt/libvirt.h.in: Declare the API python/generator.py: Skip the function for generating. virStoragePool.py will be added in later patch. src/driver.h: virDrvStoragePoolListVolumesFlags

[libvirt] [PATCH 03/50] list: Rename virdomainlist.[ch] for common use

2012-07-19 Thread Osier Yang
Except objects of domains, domain snapshots, we will also add APIs to list objects like storage pools, storage vols, network, interface, etc. And it's deserved to have the small helper functions in a common file instead of in separate files. This patch renames virdomainlist.[ch] to

[libvirt] [PATCH 10/50] virsh: Fix the wrong doc for pool-list

2012-07-19 Thread Osier Yang
The storage pool's management doesn't relate with a domain, it probably was a intention, but not achieved yet. And the fact is only active pools are listed by default. --- tools/virsh.pod |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/virsh.pod

[libvirt] [PATCH 29/50] list: Define new API virConnectListAllInterfaces

2012-07-19 Thread Osier Yang
This is to list the interface objects, supported filtering flags are: active|inactive. include/libvirt/libvirt.h.in: Declare enum virConnectListAllInterfaceFlags and virConnectListAllInterfaces. python/generator.py: Skip auto-generating src/driver.h:

[libvirt] [PATCH 14/50] python: Expose virStorageListAllStoragePools to python binding

2012-07-19 Thread Osier Yang
The implementation is done manually as the generator does not support wrapping lists of C pointers into Python objects. python/libvirt-override-api.xml: Document python/libvirt-override-virConnect.py: Add listAllStoragePools python/libvirt-override.c: Implementation for the wrapper. ---

[libvirt] [PATCH 12/50] list: Use virConnectListAllStoragePools in virsh

2012-07-19 Thread Osier Yang
tools/virsh.c: * vshStoragePoolSorter to sort the pool list by pool name. * struct vshStoragePoolList to present the pool list, pool info is collected by list-poolinfo if 'details' is specified by user. * vshStoragePoolListFree to free the pool list * vshStoragePoolListCollect

[libvirt] [PATCH 30/50] list: Implemente RPC calls for virConnectListAllInterfaces

2012-07-19 Thread Osier Yang
The RPC generator doesn't support returning list of object yet, this patch do the work manually. * daemon/remote.c: Implemente the server side handler remoteDispatchConnectListAllInterfaces. * src/remote/remote_driver.c: Add remote driver handler remoteConnectListAllInterfaces. *

[libvirt] [PATCH 16/50] list: Implemente RPC calls for virStoragePoolListAllVolumes

2012-07-19 Thread Osier Yang
The RPC generator doesn't returning support list of object, this patch do the work manually. * daemon/remote.c: Implemente the server side handler remoteDispatchStoragePoolListAllVolumes * src/remote/remote_driver.c: Add remote driver handler remoteStoragePoolListAllVolumes *

[libvirt] [PATCH 22/50] list: Implement RPC calls for virConnectListAllNetworks

2012-07-19 Thread Osier Yang
The RPC generator doesn't support returning list of object, this patch do the work manually. * daemon/remote.c: Implemente the server side handler remoteDispatchConnectListAllNetworks. * src/remote/remote_driver.c: Add remote driver handler remoteConnectListAllNetworks. *

[libvirt] [PATCH 18/50] list: Implement virStoragePoolListAllVolumes for test driver

2012-07-19 Thread Osier Yang
src/test/test_driver.c: Implement poolListAllVolumes. --- src/test/test_driver.c | 67 1 files changed, 67 insertions(+), 0 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 8aee142..bf85fe0 100644 ---

[libvirt] [PATCH 21/50] list: Define new API virConnectListAllNetworks

2012-07-19 Thread Osier Yang
This is to list the network objects, supported filtering flags are: active|inactive, persistent|transient, autostart|no-autostart. include/libvirt/libvirt.h.in: Declare enum virConnectListAllNetworkFlags and virConnectListAllNetworks. python/generator.py: Skip

[libvirt] [PATCH 35/50] list: Implemente RPC calls for virConnectListAllNodeDevices

2012-07-19 Thread Osier Yang
The RPC generator doesn't support returning list of object yet, this patch do the work manually. * daemon/remote.c: Implemente the server side handler remoteDispatchConnectListAllNodeDevices. * src/remote/remote_driver.c: Add remote driver handler remoteConnectListAllNodeDevices.

[libvirt] [PATCH 36/50] list: Add helpers for listing node devices

2012-07-19 Thread Osier Yang
src/conf/virobjectlist.h: * New macro VIR_CONNECT_LIST_NODE_DEVICES_FILTERS_CAP * Declare virNodeDeviceList src/conf/virobjectlist.c: * New helpers virNodeDeviceCapMatch, virNodeDeviceMatch. virNodeDeviceCapMatch looks up the list of all the caps the device support, to see if the

[libvirt] [PATCH 11/50] list: Change MATCH for common use in virsh

2012-07-19 Thread Osier Yang
tools/virsh.c: Change MATCH for common use. It's safe, only the new helpers to collect objects use it. --- tools/virsh.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 9c3b565..2d4567d 100644 --- a/tools/virsh.c +++ b/tools/virsh.c

[libvirt] [PATCH 42/50] list: Implement RPC calls for virConnectListAllNWFilters

2012-07-19 Thread Osier Yang
The RPC generator doesn't support returning list of object yet, this patch do the work manually. * daemon/remote.c: Implemente the server side handler remoteDispatchConnectListAllNWFilters. * src/remote/remote_driver.c: Add remote driver handler remoteConnectListAllNWFilters. *

[libvirt] [PATCH 25/50] list: Implement listAllNetworks for test driver

2012-07-19 Thread Osier Yang
src/test/test_driver.c: Implement listAllNetworks. --- src/test/test_driver.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index bf85fe0..ae9f99a 100644 --- a/src/test/test_driver.c +++

[libvirt] [PATCH 43/50] list: Implement listAllNWFilters

2012-07-19 Thread Osier Yang
Simply returns the object list. No filtering. src/nwfilter/nwfilter_driver.c: Implement listAllNWFilters --- src/nwfilter/nwfilter_driver.c | 57 1 files changed, 57 insertions(+), 0 deletions(-) diff --git a/src/nwfilter/nwfilter_driver.c

[libvirt] [PATCH 19/50] list: Use virStoragePoolListAllVolumes in virsh

2012-07-19 Thread Osier Yang
tools/virsh.c: * vshStorageVolSorter to sort storage vols by name * vshStorageVolumeListFree to free the volume objects list * vshStorageVolumeListCollect to collect the volume objects, trying to use new API first, fall back to older APIs if it's not supported. --- tools/virsh.c |

[libvirt] [PATCH 26/50] list: Use virConnectListAllNetworks in virsh

2012-07-19 Thread Osier Yang
tools/virsh.c: * vshNetworkSorter to sort networks by name * vshNetworkListFree to free the network objects list. * vshNetworkListCollect to collect the network objects, trying to use new API first, fall back to older APIs if it's not supported. * New options --persistent,

[libvirt] [PATCH 50/50] list: Expose virConnectListAllSecrets to Python binding

2012-07-19 Thread Osier Yang
The implementation is done manually as the generator does not support wrapping lists of C pointers into Python objects. python/libvirt-override-api.xml: Document python/libvirt-override-virConnect.py: Implementation for listAllSecrets. python/libvirt-override.c: Implementation for the wrapper.

[libvirt] [PATCH 47/50] list: Implement RPC calls for virConnectListAllSecrets

2012-07-19 Thread Osier Yang
The RPC generator doesn't support returning list of object yet, this patch do the work manually. * daemon/remote.c: Implemente the server side handler remoteDispatchConnectListAllSecrets. * src/remote/remote_driver.c: Add remote driver handler remoteConnectListAllSecrets. *

[libvirt] [PATCH 27/50] list: Expose virConnectListAllNetworks to Python binding

2012-07-19 Thread Osier Yang
The implementation is done manually as the generator does not support wrapping lists of C pointers into Python objects. python/libvirt-override-api.xml: Document python/libvirt-override-virConnect.py: Implement listAllNetworks. python/libvirt-override.c: Implementation for the wrapper. ---

[libvirt] [PATCH 24/50] list: Implement listAllNetworks for network driver

2012-07-19 Thread Osier Yang
src/network/bridge_driver.c: Implement listAllNetworks. --- src/network/bridge_driver.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 5bf1412..ffb830b 100644 ---

[libvirt] [PATCH 49/50] list: Use virConnectListAllSecrets in virsh

2012-07-19 Thread Osier Yang
tools/virsh.c: * vshSecretSorter to sort secret object by name * vshSecretListFree to free the secret objects list. * vshSecretListCollect to collect the secret objects, trying to use new API first, fall back to older APIs if it's not supported. --- tools/virsh.c | 192

[libvirt] [PATCH 32/50] list: Use virConnectListAllInterfaces in virsh

2012-07-19 Thread Osier Yang
tools/virsh.c: * vshInterfaceSorter to sort interfaces by name * vshInterfaceListFree to free the interface objects list. * vshInterfaceListCollect to collect the interface objects, trying to use new API first, fall back to older APIs if it's not supported. --- tools/virsh.c | 258

[libvirt] [PATCH 38/50] list: Expose virConnectListAllNodeDevices to Python binding

2012-07-19 Thread Osier Yang
The implementation is done manually as the generator does not support wrapping lists of C pointers into Python objects. python/libvirt-override-api.xml: Document python/libvirt-override-virConnect.py: * Implementation for listAllNodeDevices. python/libvirt-override.c: Implementation for the

[libvirt] [PATCH 31/50] list: Implement listAllInterfaces

2012-07-19 Thread Osier Yang
This is not that ideal as API for other objects, as it's still O(n). Because interface driver uses netcf APIs to manage the stuffs, instead of by itself. And netcf APIs don't return a object. It provides APIs like old libvirt APIs: ncf_number_of_interfaces ncf_list_interfaces

[libvirt] [PATCH 28/50] daemon: Fix the wrong macro name

2012-07-19 Thread Osier Yang
WITH_INTERFACE is not defined, it should be WITH_NETCF there to load the interface driver. Eric posted patch weeks ago to resolve the problems in the whole build system, but it's not finalised yet: https://www.redhat.com/archives/libvir-list/2012-June/msg01299.html I'm going to simply fix the

[libvirt] [PATCH 33/50] list: Expose virConnectListAllInterfaces to Python binding

2012-07-19 Thread Osier Yang
The implementation is done manually as the generator does not support wrapping lists of C pointers into Python objects. python/libvirt-override-api.xml: Document python/libvirt-override-virConnect.py: * New file, includes implementation of listAllInterfaces. python/libvirt-override.c:

[libvirt] [PATCH 34/50] list: Define new API virConnectListAllNodeDevices

2012-07-19 Thread Osier Yang
This is to list the node device objects, supports to filter the results by capability types. include/libvirt/libvirt.h.in: Declare enum virConnectListAllNodeDeviceFlags and virConnectListAllNodeDevices. python/generator.py: Skip auto-generating src/driver.h:

[libvirt] [PATCH 37/50] list: Implement listAllNodeDevices

2012-07-19 Thread Osier Yang
This simply implements listAllNodeDevices using helper virNodeDeviceList src/node_device/node_device_driver.h: * Declare nodeListAllNodeDevices. src/node_device/node_device_driver.c: * Implement nodeListAllNodeDevices. src/node_device/node_device_hal.c: * Hook listAllNodeDevices to

[libvirt] [PATCH 39/50] virsh: Fix a bug of nodedev-list

2012-07-19 Thread Osier Yang
Output of commands like '%virsh nodedev-list --tree --cap pci' could be empty. Remove the useless checking. --- tools/virsh.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 0d56934..1494620 100644 --- a/tools/virsh.c +++

[libvirt] [PATCH 41/50] list: Define new API virConnectListAllNWFilters

2012-07-19 Thread Osier Yang
This is to list the network fitler objects. No flags are supported include/libvirt/libvirt.h.in: Declare enum virConnectListAllNWFilterFlags and virConnectListAllNWFilters. python/generator.py: Skip auto-generating src/driver.h: (virDrvConnectListAllNWFilters)

  1   2   >