On 01/27/2016 11:51 PM, Vladimir Sementsov-Ogievskiy wrote: > The field is needed to distinguish pc-dimm and nvdimm. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]> > Signed-off-by: Denis V. Lunev <[email protected]> > CC: Stefan Hajnoczi <[email protected]> > CC: Xiao Guangrong <[email protected]> > CC: "Michael S. Tsirkin" <[email protected]> > CC: Igor Mammedov <[email protected]> > CC: Eric Blake <[email protected]> > CC: Markus Armbruster <[email protected]> > ---
> +++ b/qapi-schema.json
> @@ -3924,6 +3924,8 @@
> #
> # @hotpluggable: true if device if could be added/removed while machine is
> running
> #
> +# @type: device type: 'pc-dimm' or 'nvdimm' (since 2.6)
> +#
> # Since: 2.1
> ##
> { 'struct': 'PCDIMMDeviceInfo',
> @@ -3934,7 +3936,8 @@
> 'node': 'int',
> 'memdev': 'str',
> 'hotplugged': 'bool',
> - 'hotpluggable': 'bool'
> + 'hotpluggable': 'bool',
> + 'type': 'str'
No. Since it is a finite set of values (just two possible), you should
be using an enum here rather than open-coded 'str'. Something like:
{ 'enum': 'DIMMType', 'data': [ 'pc-dimm', 'nvdimm' ] }
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
