From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33605 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OYfZN-0007sD-GV for qemu-devel@nongnu.org; Tue, 13 Jul 2010 09:30:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OYfZ3-0008Uu-PO for qemu-devel@nongnu.org; Tue, 13 Jul 2010 09:30:27 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:35825) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYfZ3-0008Ug-Jt for qemu-devel@nongnu.org; Tue, 13 Jul 2010 09:30:25 -0400 Received: by wyb35 with SMTP id 35so4475284wyb.4 for ; Tue, 13 Jul 2010 06:30:24 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1278699228-7665-1-git-send-email-miguel.filho@gmail.com> Date: Tue, 13 Jul 2010 10:30:24 -0300 Message-ID: Subject: Re: [Qemu-devel] [PATCH v2] QMP: Introduce the documentation for query-qdm From: Miguel Di Ciurcio Filho Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: avi@redhat.com, Gerd Hoffmann , qemu-devel@nongnu.org, lcapitulino@redhat.com On Tue, Jul 13, 2010 at 8:49 AM, Markus Armbruster wrot= e: >> +- "bus": the name of the bus type for the device (json-string) >> + =A0 =A0- Possible values: PCI, SCSI, I2C, ISA, SSI, USB, virtio-serial= -bus, System > > Missing: IDE (hw/ide/qdev.c) and s390-virtio (hw/s390-virtio-bus.c). Ack. > >> +- "alias": an alias by which the device is also known (json-string, opt= ional) >> +- "description": description of the device =A0(json-string, optional) >> +- "creatable": whether this device can be created on command line (json= -boolean) > > "on the command line" is misleading; it applies to monitor (human & QMP) > as well. > > "by the user"? Ack. >> +- "properties": a list where each element is an json-object that descri= bes a >> + =A0property of the device. Each json-object contains the following: >> + =A0 =A0 - "name": the name of the property (json-string) >> + =A0 =A0 - "type": a json-object that contains the following: >> + =A0 =A0 =A0 =A0- "qdev": the internal name of the type of the property= (json-string) >> + =A0 =A0 =A0 =A0 =A0 =A0- Possible values: uint8, uint16, uint32, uint6= 4, int32, macaddr, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0drive, chr, string, netdev, bit, taddr >> + =A0 =A0 =A0 =A0- "qmp": the json equivalent type of the internal type = (json-string) >> + =A0 =A0 =A0 =A0 =A0 =A0- Possible values: integer, string, boolean > > Fairly close to JSON Schema, but there are differences. > > Do we need "qdev"? =A0Is exposing it wise? =A0Smells a bit too much of > internal detail for comfort... > > Could we use "type" just like JSON Schema? =A0Drop "qdev" or move it out > of "type", then make "type" what its member "qmp" is now. > I think it is better not to expose too much the internals to. My initial concern and Daniel's too was to make clear what is the meaning of the property. Like, give me a proper formated MAC address or an id of a properly created netdev. But I think we could drop the qdev properties stuff and return the proper error in case of parsing problems. Regards, Miguel