Skip to content

Commit

Permalink
qmp-commands: move 'blockdev-add' doc to schema
Browse files Browse the repository at this point in the history
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
  • Loading branch information
elmarco authored and Markus Armbruster committed Jan 16, 2017
1 parent 49b37c2 commit b474994
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 46 deletions.
46 changes: 0 additions & 46 deletions docs/qmp-commands.txt
Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions qapi/block-core.json
Expand Up @@ -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 }

Expand Down

0 comments on commit b474994

Please sign in to comment.