qapi: Move error documentation to new "Errors" sections
[qemu/armbru.git] / qapi / yank.json
bloba457284b45b8b375ccf4c4250682b2d12e175052
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = Yank feature
7 ##
9 ##
10 # @YankInstanceType:
12 # An enumeration of yank instance types.  See @YankInstance for more
13 # information.
15 # Since: 6.0
17 { 'enum': 'YankInstanceType',
18   'data': [ 'block-node', 'chardev', 'migration' ] }
21 # @YankInstanceBlockNode:
23 # Specifies which block graph node to yank.  See @YankInstance for
24 # more information.
26 # @node-name: the name of the block graph node
28 # Since: 6.0
30 { 'struct': 'YankInstanceBlockNode',
31   'data': { 'node-name': 'str' } }
34 # @YankInstanceChardev:
36 # Specifies which character device to yank.  See @YankInstance for
37 # more information.
39 # @id: the chardev's ID
41 # Since: 6.0
43 { 'struct': 'YankInstanceChardev',
44   'data': { 'id': 'str' } }
47 # @YankInstance:
49 # A yank instance can be yanked with the @yank qmp command to recover
50 # from a hanging QEMU.
52 # @type: yank instance type
54 # Currently implemented yank instances:
56 # - nbd block device: Yanking it will shut down the connection to the
57 #   nbd server without attempting to reconnect.
58 # - socket chardev: Yanking it will shut down the connected socket.
59 # - migration: Yanking it will shut down all migration connections.
60 #   Unlike @migrate_cancel, it will not notify the migration process,
61 #   so migration will go into @failed state, instead of @cancelled
62 #   state.  @yank should be used to recover from hangs.
64 # Since: 6.0
66 { 'union': 'YankInstance',
67   'base': { 'type': 'YankInstanceType' },
68   'discriminator': 'type',
69   'data': {
70       'block-node': 'YankInstanceBlockNode',
71       'chardev': 'YankInstanceChardev' } }
74 # @yank:
76 # Try to recover from hanging QEMU by yanking the specified instances.
77 # See @YankInstance for more information.
79 # @instances: the instances to be yanked
81 # Returns:
82 #     - Nothing on success
84 # Errors:
85 #     - @DeviceNotFound error, if any of the YankInstances doesn't exist
87 # Example:
89 #     -> { "execute": "yank",
90 #          "arguments": {
91 #              "instances": [
92 #                   { "type": "block-node",
93 #                     "node-name": "nbd0" }
94 #              ] } }
95 #     <- { "return": {} }
97 # Since: 6.0
99 { 'command': 'yank',
100   'data': { 'instances': ['YankInstance'] },
101   'allow-oob': true }
104 # @query-yank:
106 # Query yank instances.  See @YankInstance for more information.
108 # Returns: list of @YankInstance
110 # Example:
112 #     -> { "execute": "query-yank" }
113 #     <- { "return": [
114 #              { "type": "block-node",
115 #                "node-name": "nbd0" }
116 #          ] }
118 # Since: 6.0
120 { 'command': 'query-yank',
121   'returns': ['YankInstance'],
122   'allow-oob': true }