aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-06-23 14:54:05 +0200
committerMarkus Armbruster <armbru@redhat.com>2017-01-16 09:19:46 +0100
commitb4749948c1227bfdea340226beead0c8d0907eb7 (patch)
tree0691d955bb57cad7b3efb1748bb70b6921ee1589
parent49b37c23c70ddfed6c39a105ee59d8f140dee8e4 (diff)
qmp-commands: move 'blockdev-add' doc to schema
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
-rw-r--r--docs/qmp-commands.txt46
-rw-r--r--qapi/block-core.json39
2 files changed, 39 insertions, 46 deletions
diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt
index 7cd7bc03e9..25f45350f2 100644
--- a/docs/qmp-commands.txt
+++ b/docs/qmp-commands.txt
@@ -343,52 +343,6 @@ named schema entities. Entities are commands, events and various
types. See docs/qapi-code-gen.txt for information on their structure
and intended use.
-blockdev-add
-------------
-
-Add a block device.
-
-This command is still a work in progress. It doesn't support all
-block drivers among other things. Stay away from it unless you want
-to help with its development.
-
-For the arguments, see the QAPI schema documentation of BlockdevOptions.
-
-Example (1):
-
--> { "execute": "blockdev-add",
- "arguments": { "driver": "qcow2",
- "file": { "driver": "file",
- "filename": "test.qcow2" } } }
-<- { "return": {} }
-
-Example (2):
-
--> { "execute": "blockdev-add",
- "arguments": {
- "driver": "qcow2",
- "node-name": "my_disk",
- "discard": "unmap",
- "cache": {
- "direct": true,
- "writeback": true
- },
- "file": {
- "driver": "file",
- "filename": "/tmp/test.qcow2"
- },
- "backing": {
- "driver": "raw",
- "file": {
- "driver": "file",
- "filename": "/dev/fdset/4"
- }
- }
- }
- }
-
-<- { "return": {} }
-
x-blockdev-del
------------
Since 2.5
diff --git a/qapi/block-core.json b/qapi/block-core.json
index fba32219e3..a9964c1e95 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -2830,6 +2830,45 @@
# to help with its development.
#
# Since: 1.7
+#
+# Example:
+#
+# 1.
+# -> { "execute": "blockdev-add",
+# "arguments": {
+# "options" : { "driver": "qcow2",
+# "file": { "driver": "file",
+# "filename": "test.qcow2" } } } }
+# <- { "return": {} }
+#
+# 2.
+# -> { "execute": "blockdev-add",
+# "arguments": {
+# "options": {
+# "driver": "qcow2",
+# "node-name": "node0",
+# "discard": "unmap",
+# "cache": {
+# "direct": true,
+# "writeback": true
+# },
+# "file": {
+# "driver": "file",
+# "filename": "/tmp/test.qcow2"
+# },
+# "backing": {
+# "driver": "raw",
+# "file": {
+# "driver": "file",
+# "filename": "/dev/fdset/4"
+# }
+# }
+# }
+# }
+# }
+#
+# <- { "return": {} }
+#
##
{ 'command': 'blockdev-add', 'data': 'BlockdevOptions', 'boxed': true }