From 8a47e8eb592b30b010fe143eb2393d4033f0a79c Mon Sep 17 00:00:00 2001 From: Jeff Cody Date: Mon, 27 Feb 2017 01:16:41 -0500 Subject: block/rbd: add blockdev-add support Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- qapi/block-core.json | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'qapi') diff --git a/qapi/block-core.json b/qapi/block-core.json index cf24c04..803edc3 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2111,6 +2111,7 @@ # @replication: Since 2.8 # @ssh: Since 2.8 # @iscsi: Since 2.9 +# @rbd: Since 2.9 # # Since: 2.0 ## @@ -2119,7 +2120,7 @@ 'dmg', 'file', 'ftp', 'ftps', 'gluster', 'host_cdrom', 'host_device', 'http', 'https', 'iscsi', 'luks', 'nbd', 'nfs', 'null-aio', 'null-co', 'parallels', 'qcow', 'qcow2', 'qed', - 'quorum', 'raw', 'replication', 'ssh', 'vdi', 'vhdx', 'vmdk', + 'quorum', 'raw', 'rbd', 'replication', 'ssh', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat' ] } ## @@ -2666,6 +2667,34 @@ '*timeout': 'int' } } ## +# @BlockdevOptionsRbd: +# +# @pool: Ceph pool name. +# +# @image: Image name in the Ceph pool. +# +# @conf: #optional path to Ceph configuration file. Values +# in the configuration file will be overridden by +# options specified via QAPI. +# +# @snapshot: #optional Ceph snapshot name. +# +# @user: #optional Ceph id name. +# +# @password-secret: #optional The ID of a QCryptoSecret object providing +# the password for the login. +# +# Since: 2.9 +## +{ 'struct': 'BlockdevOptionsRbd', + 'data': { 'pool': 'str', + 'image': 'str', + '*conf': 'str', + '*snapshot': 'str', + '*user': 'str', + '*password-secret': 'str' } } + +## # @ReplicationMode: # # An enumeration of replication modes. @@ -2863,7 +2892,7 @@ 'qed': 'BlockdevOptionsGenericCOWFormat', 'quorum': 'BlockdevOptionsQuorum', 'raw': 'BlockdevOptionsRaw', -# TODO rbd: Wait for structured options + 'rbd': 'BlockdevOptionsRbd', 'replication':'BlockdevOptionsReplication', # TODO sheepdog: Wait for structured options 'ssh': 'BlockdevOptionsSsh', -- cgit v1.1 From 0a55679b4a5061f4d74bdb1a0e81611ba3390b00 Mon Sep 17 00:00:00 2001 From: Jeff Cody Date: Mon, 27 Feb 2017 12:36:46 -0500 Subject: block/rbd: add support for 'mon_host', 'auth_supported' via QAPI This adds support for three additional options that may be specified by QAPI in blockdev-add: server: host, port auth method: either 'cephx' or 'none' The "server" and "auth-supported" QAPI parameters are arrays. To conform with the rados API, the array items are join as a single string with a ';' character as a delimiter when setting the configuration values. Reviewed-by: Markus Armbruster Signed-off-by: Jeff Cody --- qapi/block-core.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'qapi') diff --git a/qapi/block-core.json b/qapi/block-core.json index 803edc3..2e01a95 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2666,6 +2666,28 @@ '*header-digest': 'IscsiHeaderDigest', '*timeout': 'int' } } + +## +# @RbdAuthSupport: +# +# An enumeration of RBD auth support +# +# Since: 2.9 +## +{ 'enum': 'RbdAuthSupport', + 'data': [ 'cephx', 'none' ] } + + +## +# @RbdAuthMethod: +# +# An enumeration of rados auth_supported types +# +# Since: 2.9 +## +{ 'struct': 'RbdAuthMethod', + 'data': { 'auth': 'RbdAuthSupport' } } + ## # @BlockdevOptionsRbd: # @@ -2681,6 +2703,11 @@ # # @user: #optional Ceph id name. # +# @server: #optional Monitor host address and port. This maps +# to the "mon_host" Ceph option. +# +# @auth-supported: #optional Authentication supported. +# # @password-secret: #optional The ID of a QCryptoSecret object providing # the password for the login. # @@ -2692,6 +2719,8 @@ '*conf': 'str', '*snapshot': 'str', '*user': 'str', + '*server': ['InetSocketAddress'], + '*auth-supported': ['RbdAuthMethod'], '*password-secret': 'str' } } ## -- cgit v1.1