aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-02-24 15:29:57 +0100
committerKevin Wolf <kwolf@redhat.com>2020-03-06 17:21:28 +0100
commiteed8b691783264013142ed0273e08f5a7f913569 (patch)
tree0aa5c78e05a357345cc7719dd8e03df6b0cfbf8f /qapi
parentd6da78b5fdad8d4e7fbe6eebbb6ea369f84c0408 (diff)
qemu-storage-daemon: Add --nbd-server option
Add a --nbd-server option to qemu-storage-daemon to start the built-in NBD server right away. It maps the arguments for nbd-server-start to the command line, with the exception that it uses SocketAddress instead of SocketAddressLegacy: New interfaces shouldn't use legacy types, and the additional nesting would be nasty on the command line. Example (only with required options): --nbd-server addr.type=inet,addr.host=localhost,addr.port=10809 Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-10-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json24
1 files changed, 24 insertions, 0 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index b65b6a9f49..f8888f06c8 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -5063,6 +5063,27 @@
'*force': 'bool' } }
##
+# @NbdServerOptions:
+#
+# @addr: Address on which to listen.
+# @tls-creds: ID of the TLS credentials object (since 2.6).
+# @tls-authz: ID of the QAuthZ authorization object used to validate
+# the client's x509 distinguished name. This object is
+# is only resolved at time of use, so can be deleted and
+# recreated on the fly while the NBD server is active.
+# If missing, it will default to denying access (since 4.0).
+#
+# Keep this type consistent with the nbd-server-start arguments. The only
+# intended difference is using SocketAddress instead of SocketAddressLegacy.
+#
+# Since: 4.2
+##
+{ 'struct': 'NbdServerOptions',
+ 'data': { 'addr': 'SocketAddress',
+ '*tls-creds': 'str',
+ '*tls-authz': 'str'} }
+
+##
# @nbd-server-start:
#
# Start an NBD server listening on the given host and port. Block
@@ -5080,6 +5101,9 @@
#
# Returns: error if the server is already running.
#
+# Keep this type consistent with the NbdServerOptions type. The only intended
+# difference is using SocketAddressLegacy instead of SocketAddress.
+#
# Since: 1.3.0
##
{ 'command': 'nbd-server-start',