All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Eric Blake <eblake@redhat.com>, Amos Kong <akong@redhat.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, jyang@redhat.com,
	lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/2] monitor: introduce query-config-schema command
Date: Wed, 24 Apr 2013 11:45:28 -0500	[thread overview]
Message-ID: <87a9onlvx3.fsf@codemonkey.ws> (raw)
In-Reply-To: <5177EE61.7030909@redhat.com>

Eric Blake <eblake@redhat.com> writes:

> On 04/24/2013 06:47 AM, Amos Kong wrote:
>> Libvirt has no way to probe if an option or property is supported,
>> This patch introdues a new qmp command to query configuration schema
>> information. hmp command isn't added because it's not needed.
>
> Agreed that no HMP counterpart is needed.  However, I don't think we
> have quite the right interface yet.
>
>> 
>> Signed-off-by: Amos Kong <akong@redhat.com>
>> CC: Osier Yang <jyang@redhat.com>
>> CC: Anthony Liguori <aliguori@us.ibm.com>
>> ---
>>  qapi-schema.json   |   29 +++++++++++++++++++++++++++++
>>  qmp-commands.hx    |   40 ++++++++++++++++++++++++++++++++++++++++
>>  util/qemu-config.c |   40 ++++++++++++++++++++++++++++++++++++++++
>>  3 files changed, 109 insertions(+), 0 deletions(-)
>> 
>> diff --git a/qapi-schema.json b/qapi-schema.json
>> index 751d3c2..aeab057 100644
>> --- a/qapi-schema.json
>> +++ b/qapi-schema.json
>> @@ -3505,3 +3505,32 @@
>>      '*asl_compiler_rev':  'uint32',
>>      '*file':              'str',
>>      '*data':              'str' }}
>> +
>> +##
>> +# @ConfigSchemaInfo:
>> +#
>> +# Configration schema information.
>> +#
>> +# @option: option name
>> +#
>> +# @params: parameters strList of one option
>
> Why just a strList?  That only tells me option names.  But we already
> know so much more than that - we know the type and the help string.
>
>> +#
>> +# Since 1.5
>> +##
>> +{ 'type': 'ConfigSchemaInfo', 'data': {'option': 'str', 'params': ['str']} }
>
> I'd rather see an array of structs, more closely mirroring what
> include/qemu/option.h gives us:
>
> # JSON representation of values of QEMUOptionParType, may grow in future
> { 'enum': 'ConfigParamType',
>   'data': [ 'flag', 'number', 'size', 'string' ] }
>
> # JSON representation of QEMUOptionParameter, may grow in future
> # @help is optional if no text was present
> { 'type': 'ConfigParamInfo',
>   'data': { 'name': 'str', 'type': 'ConfigParamType', '*help':'str' } }
>
> # Each command line option, and its list of parameters
> { 'type': 'ConfigSchemaInfo',
>   'data': { 'option':'str', 'params': ['ConfigParamInfo'] } }
>
> And that means we no longer have ['str'], which bypasses the need for
> your patch 1/2.

Strong Ack on this schema.

Regards,

Anthony Liguori

  reply	other threads:[~2013-04-24 16:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24 12:47 [Qemu-devel] [RESEND PATCH 1/2] qapi: introduce strList and visit_type_strList() Amos Kong
2013-04-24 12:47 ` [Qemu-devel] [PATCH 2/2] monitor: introduce query-config-schema command Amos Kong
2013-04-24 14:38   ` Eric Blake
2013-04-24 16:45     ` Anthony Liguori [this message]
2013-04-24 17:33   ` [Qemu-devel] [PATCH] " Amos Kong
2013-04-24 17:36     ` [Qemu-devel] [PATCH v2] " Amos Kong
2013-04-24 18:20     ` [Qemu-devel] [PATCH] " Luiz Capitulino
2013-04-24 19:39       ` Eric Blake
2013-04-24 23:55         ` Eric Blake
2013-04-25  3:52         ` Amos Kong
2013-04-25  4:27           ` Osier Yang
2013-04-25  5:09             ` Amos Kong
2013-04-25 12:36           ` Luiz Capitulino
2013-04-25 13:30             ` Eric Blake
2013-04-25  1:14       ` Amos Kong
2013-04-25  1:35         ` Luiz Capitulino
2013-04-25  1:44           ` Eric Blake
2013-04-25  2:03             ` Amos Kong
2013-04-25  2:14             ` Luiz Capitulino
2013-04-25  1:43         ` Eric Blake
2013-04-25  3:38         ` Osier Yang
2013-04-24 14:01 ` [Qemu-devel] [RESEND PATCH 1/2] qapi: introduce strList and visit_type_strList() Eric Blake
2013-04-24 15:59   ` Amos Kong
2013-04-24 14:39 ` Eric Blake

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=87a9onlvx3.fsf@codemonkey.ws \
    --to=aliguori@us.ibm.com \
    --cc=akong@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jyang@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.