qmp-commands: move 'x-blockdev-change' doc to schema
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
1965e98d51
commit
bd77ea2e5a
|
@ -216,47 +216,3 @@ Return the QMP wire schema. The returned value is a json-array of
|
||||||
named schema entities. Entities are commands, events and various
|
named schema entities. Entities are commands, events and various
|
||||||
types. See docs/qapi-code-gen.txt for information on their structure
|
types. See docs/qapi-code-gen.txt for information on their structure
|
||||||
and intended use.
|
and intended use.
|
||||||
|
|
||||||
x-blockdev-change
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
Dynamically reconfigure the block driver state graph. It can be used
|
|
||||||
to add, remove, insert or replace a graph node. Currently only the
|
|
||||||
Quorum driver implements this feature to add or remove its child. This
|
|
||||||
is useful to fix a broken quorum child.
|
|
||||||
|
|
||||||
If @node is specified, it will be inserted under @parent. @child
|
|
||||||
may not be specified in this case. If both @parent and @child are
|
|
||||||
specified but @node is not, @child will be detached from @parent.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
- "parent": the id or name of the parent node (json-string)
|
|
||||||
- "child": the name of a child under the given parent node (json-string, optional)
|
|
||||||
- "node": the name of the node that will be added (json-string, optional)
|
|
||||||
|
|
||||||
Note: this command is experimental, and not a stable API. It doesn't
|
|
||||||
support all kinds of operations, all kinds of children, nor all block
|
|
||||||
drivers.
|
|
||||||
|
|
||||||
Warning: The data in a new quorum child MUST be consistent with that of
|
|
||||||
the rest of the array.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
Add a new node to a quorum
|
|
||||||
-> { "execute": "blockdev-add",
|
|
||||||
"arguments": { "driver": "raw",
|
|
||||||
"node-name": "new_node",
|
|
||||||
"file": { "driver": "file",
|
|
||||||
"filename": "test.raw" } } }
|
|
||||||
<- { "return": {} }
|
|
||||||
-> { "execute": "x-blockdev-change",
|
|
||||||
"arguments": { "parent": "disk1",
|
|
||||||
"node": "new_node" } }
|
|
||||||
<- { "return": {} }
|
|
||||||
|
|
||||||
Delete a quorum's node
|
|
||||||
-> { "execute": "x-blockdev-change",
|
|
||||||
"arguments": { "parent": "disk1",
|
|
||||||
"child": "children.1" } }
|
|
||||||
<- { "return": {} }
|
|
||||||
|
|
|
@ -3455,6 +3455,28 @@
|
||||||
# the rest of the array.
|
# the rest of the array.
|
||||||
#
|
#
|
||||||
# Since: 2.7
|
# Since: 2.7
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
#
|
||||||
|
# 1. Add a new node to a quorum
|
||||||
|
# -> { "execute": "blockdev-add",
|
||||||
|
# "arguments": {
|
||||||
|
# "options": { "driver": "raw",
|
||||||
|
# "node-name": "new_node",
|
||||||
|
# "file": { "driver": "file",
|
||||||
|
# "filename": "test.raw" } } } }
|
||||||
|
# <- { "return": {} }
|
||||||
|
# -> { "execute": "x-blockdev-change",
|
||||||
|
# "arguments": { "parent": "disk1",
|
||||||
|
# "node": "new_node" } }
|
||||||
|
# <- { "return": {} }
|
||||||
|
#
|
||||||
|
# 2. Delete a quorum's node
|
||||||
|
# -> { "execute": "x-blockdev-change",
|
||||||
|
# "arguments": { "parent": "disk1",
|
||||||
|
# "child": "children.1" } }
|
||||||
|
# <- { "return": {} }
|
||||||
|
#
|
||||||
##
|
##
|
||||||
{ 'command': 'x-blockdev-change',
|
{ 'command': 'x-blockdev-change',
|
||||||
'data' : { 'parent': 'str',
|
'data' : { 'parent': 'str',
|
||||||
|
|
Loading…
Reference in a new issue