Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-25 Thread Eric Blake
On 04/25/2013 06:36 AM, Luiz Capitulino wrote: >>> One other concern - you document that if a flag parameter is omitted, >>> then it defaults to 1. Is that really true? >> >> >> I'm wrong. If it's omitted in cmdline, we will give it a default value. >> >> This kind of default info is only added

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-25 Thread Luiz Capitulino
On Thu, 25 Apr 2013 11:52:58 +0800 Amos Kong wrote: > On Wed, Apr 24, 2013 at 01:39:08PM -0600, Eric Blake wrote: > > On 04/24/2013 12:20 PM, Luiz Capitulino wrote: > > > On Thu, 25 Apr 2013 01:33:24 +0800 > > > Amos Kong wrote: > > > > > >> Libvirt has no way to probe if an option or property

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Amos Kong
On Thu, Apr 25, 2013 at 12:27:16PM +0800, Osier Yang wrote: > On 25/04/13 11:52, Amos Kong wrote: > >On Wed, Apr 24, 2013 at 01:39:08PM -0600, Eric Blake wrote: > >>On 04/24/2013 12:20 PM, Luiz Capitulino wrote: > >>>On Thu, 25 Apr 2013 01:33:24 +0800 > >>>Amos Kong wrote: > >>> > Libvirt has

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Osier Yang
On 25/04/13 11:52, Amos Kong wrote: On Wed, Apr 24, 2013 at 01:39:08PM -0600, Eric Blake wrote: On 04/24/2013 12:20 PM, Luiz Capitulino wrote: On Thu, 25 Apr 2013 01:33:24 +0800 Amos Kong wrote: Libvirt has no way to probe if an option or property is supported, This patch introdues a new qmp

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Amos Kong
On Wed, Apr 24, 2013 at 01:39:08PM -0600, Eric Blake wrote: > On 04/24/2013 12:20 PM, Luiz Capitulino wrote: > > On Thu, 25 Apr 2013 01:33:24 +0800 > > 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

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Osier Yang
On 25/04/13 09:14, Amos Kong wrote: On Wed, Apr 24, 2013 at 02:20:20PM -0400, Luiz Capitulino wrote: On Thu, 25 Apr 2013 01:33:24 +0800 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 info

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Luiz Capitulino
On Wed, 24 Apr 2013 19:44:37 -0600 Eric Blake wrote: > On 04/24/2013 07:35 PM, Luiz Capitulino wrote: > > >> case QEMU_OPT_SIZE: > >> > >> param_info->type = CONFIG_PARAM_TYPE_SIZE; > >>

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Amos Kong
On Wed, Apr 24, 2013 at 07:44:37PM -0600, Eric Blake wrote: > On 04/24/2013 07:35 PM, Luiz Capitulino wrote: > > >> case QEMU_OPT_SIZE: > >> > >> param_info->type = CONFIG_PARAM_TYPE_SIZE; >

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Eric Blake
On 04/24/2013 07:35 PM, Luiz Capitulino wrote: >> case QEMU_OPT_SIZE: >> >> param_info->type = CONFIG_PARAM_TYPE_SIZE; >> >> break; >>

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Eric Blake
On 04/24/2013 07:14 PM, Amos Kong wrote: >>> +## >>> +{'command': 'query-config-schema', 'data': {'*option': 'str'}, >> >> Please, let's not make option optional. It makes the code slightly more >> complex for no good reason. > > For the human, if they don't know the detail name of one option, the

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Luiz Capitulino
On Thu, 25 Apr 2013 09:14:51 +0800 Amos Kong wrote: > On Wed, Apr 24, 2013 at 02:20:20PM -0400, Luiz Capitulino wrote: > > On Thu, 25 Apr 2013 01:33:24 +0800 > > Amos Kong wrote: > > > > > Libvirt has no way to probe if an option or property is supported, > > > This patch introdues a new qmp co

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Amos Kong
On Wed, Apr 24, 2013 at 02:20:20PM -0400, Luiz Capitulino wrote: > On Thu, 25 Apr 2013 01:33:24 +0800 > 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 i

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Eric Blake
On 04/24/2013 01:39 PM, Eric Blake wrote: > On 04/24/2013 12:20 PM, Luiz Capitulino wrote: >> On Thu, 25 Apr 2013 01:33:24 +0800 >> 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 >>

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Eric Blake
On 04/24/2013 12:20 PM, Luiz Capitulino wrote: > On Thu, 25 Apr 2013 01:33:24 +0800 > 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

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Luiz Capitulino
On Thu, 25 Apr 2013 01:33:24 +0800 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. > > V2: fix jaso schema and comments (Er

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-23 Thread Luiz Capitulino
On Tue, 23 Apr 2013 09:32:31 -0600 Eric Blake wrote: > On 04/23/2013 07:20 AM, Luiz Capitulino wrote: > > On Mon, 22 Apr 2013 09:00:05 -0600 > > Eric Blake wrote: > > > >> At any rate, we really DO want introspection, and having it in 1.5 is a > >> worthwhile goal. Even if the introspection tu

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-23 Thread Eric Blake
On 04/23/2013 07:20 AM, Luiz Capitulino wrote: > On Mon, 22 Apr 2013 09:00:05 -0600 > Eric Blake wrote: > >> At any rate, we really DO want introspection, and having it in 1.5 is a >> worthwhile goal. Even if the introspection turns up empty on legacy >> options, having it for the sake of new op

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-23 Thread Luiz Capitulino
On Mon, 22 Apr 2013 09:00:05 -0600 Eric Blake wrote: > At any rate, we really DO want introspection, and having it in 1.5 is a > worthwhile goal. Even if the introspection turns up empty on legacy > options, having it for the sake of new options is worth the effort. Agreed. But as you said in a

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-22 Thread Amos Kong
On Mon, Apr 22, 2013 at 05:16:02PM +0200, Paolo Bonzini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Il 22/04/2013 17:00, Eric Blake ha scritto: > > On 04/22/2013 06:07 AM, Paolo Bonzini wrote: > >> Il 22/04/2013 13:48, Amos Kong ha scritto: > >>> Libvirt doesn't have a stable

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-22 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 22/04/2013 17:00, Eric Blake ha scritto: > On 04/22/2013 06:07 AM, Paolo Bonzini wrote: >> Il 22/04/2013 13:48, Amos Kong ha scritto: >>> Libvirt doesn't have a stable way to know option >>> support detail. This patch introdued a new qmp com

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-22 Thread Eric Blake
On 04/22/2013 06:07 AM, Paolo Bonzini wrote: > Il 22/04/2013 13:48, Amos Kong ha scritto: >> Libvirt doesn't have a stable way to know option support >> detail. This patch introdued a new qmp command to query >> configuration schema information. hmp command isn't added. Can yo

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-22 Thread Paolo Bonzini
Il 22/04/2013 13:48, Amos Kong ha scritto: >>> > > Libvirt doesn't have a stable way to know option support >>> > > detail. This patch introdued a new qmp command to query >>> > > configuration schema information. hmp command isn't added. >> > >> > Can you introspect QemuOpts instead? All new opt

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-22 Thread Amos Kong
On Fri, Apr 19, 2013 at 05:21:37PM +0200, Paolo Bonzini wrote: > Il 19/04/2013 11:52, Amos Kong ha scritto: > > Libvirt doesn't have a stable way to know option support > > detail. This patch introdued a new qmp command to query > > configuration schema information. hmp command isn't added. > > Ca

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-19 Thread Paolo Bonzini
Il 19/04/2013 11:52, Amos Kong ha scritto: > Libvirt doesn't have a stable way to know option support > detail. This patch introdued a new qmp command to query > configuration schema information. hmp command isn't added. Can you introspect QemuOpts instead? All new options are added there. Paolo

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-19 Thread Osier Yang
On 19/04/13 20:39, Eric Blake wrote: On 04/19/2013 03:52 AM, Amos Kong wrote: Libvirt doesn't have a stable way to know option support detail. This patch introdued a new qmp command to query configuration schema information. hmp command isn't added. Agreed; HMP is not needed: by the time you ca

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-19 Thread Osier Yang
On 19/04/13 20:02, Osier Yang wrote: On 19/04/13 17:52, Amos Kong wrote: Libvirt doesn't have a stable way to know option support Actually no way now. Libvirt swtiched to use qmp to collect the qemu capabilities for qemu newer than 1.2.0, thus there is no way to probe either if a option or a

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-19 Thread Eric Blake
On 04/19/2013 03:52 AM, Amos Kong wrote: > Libvirt doesn't have a stable way to know option support > detail. This patch introdued a new qmp command to query > configuration schema information. hmp command isn't added. Agreed; HMP is not needed: by the time you can connect to a human monitor, you'

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-19 Thread Eric Blake
On 04/19/2013 06:02 AM, Osier Yang wrote: > On 19/04/13 17:52, Amos Kong wrote: >> Libvirt doesn't have a stable way to know option support > > Actually no way now. > >> + >> +## >> +# @ConfigSchemaInfo: >> +# >> +# Configration schema information. >> +# >> +# @option: option name >> +# >> +# @c

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-19 Thread Osier Yang
On 19/04/13 17:52, Amos Kong wrote: Libvirt doesn't have a stable way to know option support Actually no way now. Libvirt swtiched to use qmp to collect the qemu capabilities for qemu newer than 1.2.0, thus there is no way to probe either if a option or a property is supported or not by QEMU.