On Wed, Jul 07, 2010 at 10:07:09AM -0300, Luiz Capitulino wrote: > On Mon, 5 Jul 2010 16:34:22 -0300 > Miguel Di Ciurcio Filho <miguel.fi...@gmail.com> wrote: > > > Possible values for "type" are defined in the patch on the > > qdev_property_type_to_string() function. To spot them in the current > > code, hw/qdev.c:77: > > > > enum PropertyType { > > PROP_TYPE_UNSPEC = 0, > > PROP_TYPE_UINT8, > > PROP_TYPE_UINT16, > > PROP_TYPE_UINT32, > > PROP_TYPE_INT32, > > PROP_TYPE_UINT64, > > PROP_TYPE_TADDR, > > PROP_TYPE_MACADDR, > > PROP_TYPE_DRIVE, > > PROP_TYPE_CHR, > > PROP_TYPE_STRING, > > PROP_TYPE_NETDEV, > > PROP_TYPE_VLAN, > > PROP_TYPE_PTR, > > PROP_TYPE_BIT, > > }; > > > > So it is a mix of json-(string|integer|boolean). It seams to me that a > > device_add using QMP will use just use strings. Need to confirm that. > > There are integers too. > > Daniel, can you clarify how libvirt is going to use this member?
We're not actively planning to use this field. When I wrote the patch originally, I was aiming to provide the maximim semantically useful information possible, rather than just the generic json data type. This ensures that this is fully self-documenting. > Maybe we could have something like this: > > "type": { "qdev": "macaddr", "qmp": "string" } Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|