Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-08-15 Thread Eric Blake
On 08/15/2012 02:49 AM, Benoît Canet wrote: >> I think an --format=json option would be a bit more extensible and >> better matches what most tools are doing these days. > > The qemu-img info subcommand already use the "-f" short option. > What alternative could be use instead of --format=json ?

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-08-15 Thread Benoît Canet
Le Friday 27 Jul 2012 à 08:50:43 (-0500), Anthony Liguori a écrit : > Wenchao Xia writes: > > > This patch would add option -j in qemu-img info command, which > > would generate json output in stdout. > > This is a great idea. > > > > > Signed-off-by: Wenchao Xia > > --- > > qemu-img.c | 3

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-30 Thread Stefan Hajnoczi
On Fri, Jul 27, 2012 at 06:20:48PM +0800, Wenchao Xia wrote: > This patch would add option -j in qemu-img info command, which > would generate json output in stdout. > > Signed-off-by: Wenchao Xia > --- > qemu-img.c | 306 +++ > 1 files

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Anthony Liguori
"Daniel P. Berrange" writes: > On Fri, Jul 27, 2012 at 12:49:53PM +0200, Paolo Bonzini wrote: >> Il 27/07/2012 12:33, Daniel P. Berrange ha scritto: >> > #qemu-img info -j /var/lib/libvirt/images/bar.qcow2 >> > { >> > "information": { >> > "actual_size": "139264", >> > "fmt"

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Anthony Liguori
Wenchao Xia writes: > This patch would add option -j in qemu-img info command, which > would generate json output in stdout. This is a great idea. > > Signed-off-by: Wenchao Xia > --- > qemu-img.c | 306 +++ > 1 files changed, 264 ins

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Daniel P. Berrange
On Fri, Jul 27, 2012 at 12:49:53PM +0200, Paolo Bonzini wrote: > Il 27/07/2012 12:33, Daniel P. Berrange ha scritto: > > #qemu-img info -j /var/lib/libvirt/images/bar.qcow2 > > { > > "information": { > > "actual_size": "139264", > > "fmt": "qcow2", > > "virtual_size":

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Paolo Bonzini
Il 27/07/2012 12:33, Daniel P. Berrange ha scritto: > #qemu-img info -j /var/lib/libvirt/images/bar.qcow2 > { > "information": { > "actual_size": "139264", > "fmt": "qcow2", > "virtual_size": "10485760", > "filename": "/var/lib/libvirt/images/bar.qcow2", >

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Daniel P. Berrange
On Fri, Jul 27, 2012 at 06:20:48PM +0800, Wenchao Xia wrote: > This patch would add option -j in qemu-img info command, which > would generate json output in stdout. I like this idea in general, because currently apps (oVirt, OpenStack, etc) rely on parsing the human format, which is just as evi

[Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Wenchao Xia
This patch would add option -j in qemu-img info command, which would generate json output in stdout. Signed-off-by: Wenchao Xia --- qemu-img.c | 306 +++ 1 files changed, 264 insertions(+), 42 deletions(-) diff --git a/qemu-img.c b/qemu