diff mbox

[V5,07/10] qapi: convert BlockdevOptions to use enum discriminator

Message ID 1387516996-27531-8-git-send-email-xiawenc@linux.vnet.ibm.com
State New
Headers show

Commit Message

Wayne Xia Dec. 20, 2013, 5:23 a.m. UTC
After this patch, hidden enum type BlockdevOptionsKind will not
be generated, and other API can use enum BlockdevDriver.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
 qapi-schema.json |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

Comments

Wayne Xia Jan. 6, 2014, 2:01 a.m. UTC | #1
于 2013/12/20 13:23, Wenchao Xia 写道:
> After this patch, hidden enum type BlockdevOptionsKind will not
> be generated, and other API can use enum BlockdevDriver.
> 
> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> ---
>   qapi-schema.json |   14 +++++++++++++-
>   1 files changed, 13 insertions(+), 1 deletions(-)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index c3c939c..9b51dcc 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -4046,6 +4046,18 @@
>               '*no-flush': 'bool' } }
> 
>   ##
> +# @BlockdevDriver
> +#
> +# Drivers that are supported in block device operations.
> +#
> +# Since: 2.0
> +##
> +{ 'enum': 'BlockdevDriver',
> +  'data': [ 'file', 'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'bochs',
> +            'cloop', 'cow', 'dmg', 'parallels', 'qcow', 'qcow2', 'qed', 'raw',
> +            'vdi', 'vhdx', 'vmdk', 'vpc' ] }
> +
> +##
>   # @BlockdevOptionsBase
>   #
>   # Options that are available for all block devices, independent of the block
> @@ -4068,7 +4080,7 @@
>   # Since: 1.7
>   ##
>   { 'type': 'BlockdevOptionsBase',
> -  'data': { 'driver': 'str',
> +  'data': { 'driver': 'BlockdevDriver',
>               '*id': 'str',
>               '*discard': 'BlockdevDiscardOptions',
>               '*cache': 'BlockdevCacheOptions',
> 
Hi Kevin,
  Could u take a look at this patch?
diff mbox

Patch

diff --git a/qapi-schema.json b/qapi-schema.json
index c3c939c..9b51dcc 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4046,6 +4046,18 @@ 
             '*no-flush': 'bool' } }
 
 ##
+# @BlockdevDriver
+#
+# Drivers that are supported in block device operations.
+#
+# Since: 2.0
+##
+{ 'enum': 'BlockdevDriver',
+  'data': [ 'file', 'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'bochs',
+            'cloop', 'cow', 'dmg', 'parallels', 'qcow', 'qcow2', 'qed', 'raw',
+            'vdi', 'vhdx', 'vmdk', 'vpc' ] }
+
+##
 # @BlockdevOptionsBase
 #
 # Options that are available for all block devices, independent of the block
@@ -4068,7 +4080,7 @@ 
 # Since: 1.7
 ##
 { 'type': 'BlockdevOptionsBase',
-  'data': { 'driver': 'str',
+  'data': { 'driver': 'BlockdevDriver',
             '*id': 'str',
             '*discard': 'BlockdevDiscardOptions',
             '*cache': 'BlockdevCacheOptions',