From: "Daniel P. Berrange" <berrange@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: aliguori@linux.vnet.ibm.com, avi@redhat.com,
qemu-devel@nongnu.org, armbru@redhat.com
Subject: [Qemu-devel] Re: QMP's success response
Date: Thu, 17 Dec 2009 17:46:32 +0000 [thread overview]
Message-ID: <20091217174632.GT23134@redhat.com> (raw)
In-Reply-To: <20091217154147.22845395@doriath>
On Thu, Dec 17, 2009 at 03:41:47PM -0200, Luiz Capitulino wrote:
>
> Hi there,
>
> Currently, when a regular command doesn't have any data to output,
> QMP will emit:
>
> { "return": "OK" }
>
> I thought this was a good idea because it has a clear meaning. Silly me,
> this is optimized for humans, but for machines it introduces the problem
> that such commands can't be changed to return values.
>
> I'm not sure this is will ever happen, but to stay safe a better way
> would be to return an empty dict, like this:
>
> { "return": {} }
>
> Which can be read as 'command succeeded, but didn't return any data'.
>
> As the release is not done yet we still can change it, is anyone against?
That's fine by me. libvirt merely checks for whether 'error' vs 'return'
exist when first deciding whether it has been successful. We only look at
the contents of the 'return' key for commands expecting actual data back.
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
next prev parent reply other threads:[~2009-12-17 17:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 17:41 [Qemu-devel] QMP's success response Luiz Capitulino
2009-12-17 17:46 ` Daniel P. Berrange [this message]
2009-12-17 18:32 ` Markus Armbruster
2009-12-17 19:09 ` Jamie Lokier
2009-12-17 19:19 ` Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091217174632.GT23134@redhat.com \
--to=berrange@redhat.com \
--cc=aliguori@linux.vnet.ibm.com \
--cc=armbru@redhat.com \
--cc=avi@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).