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 ?
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
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
"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"
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
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":
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",
>
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
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