transaction.json (856f9fa9a2c528dc29693d3b3a64a9b93bf866a2) | transaction.json (a937b6aa739f65f2cae2ad9a7eb65a309ad2a359) |
---|---|
1# -*- Mode: Python -*- 2# vim: filetype=python 3# 4 5## 6# = Transactions 7## 8 --- 9 unchanged lines hidden (view full) --- 18{ 'struct': 'Abort', 19 'data': { } } 20 21## 22# @ActionCompletionMode: 23# 24# An enumeration of Transactional completion modes. 25# | 1# -*- Mode: Python -*- 2# vim: filetype=python 3# 4 5## 6# = Transactions 7## 8 --- 9 unchanged lines hidden (view full) --- 18{ 'struct': 'Abort', 19 'data': { } } 20 21## 22# @ActionCompletionMode: 23# 24# An enumeration of Transactional completion modes. 25# |
26# @individual: Do not attempt to cancel any other Actions if any Actions fail 27# after the Transaction request succeeds. All Actions that 28# can complete successfully will do so without waiting on others. 29# This is the default. | 26# @individual: Do not attempt to cancel any other Actions if any 27# Actions fail after the Transaction request succeeds. All 28# Actions that can complete successfully will do so without 29# waiting on others. This is the default. |
30# | 30# |
31# @grouped: If any Action fails after the Transaction succeeds, cancel all 32# Actions. Actions do not complete until all Actions are ready to 33# complete. May be rejected by Actions that do not support this 34# completion mode. | 31# @grouped: If any Action fails after the Transaction succeeds, cancel 32# all Actions. Actions do not complete until all Actions are 33# ready to complete. May be rejected by Actions that do not 34# support this completion mode. |
35# 36# Since: 2.5 37## 38{ 'enum': 'ActionCompletionMode', 39 'data': [ 'individual', 'grouped' ] } 40 41## 42# @TransactionActionKind: 43# 44# @abort: Since 1.6 | 35# 36# Since: 2.5 37## 38{ 'enum': 'ActionCompletionMode', 39 'data': [ 'individual', 'grouped' ] } 40 41## 42# @TransactionActionKind: 43# 44# @abort: Since 1.6 |
45# |
|
45# @block-dirty-bitmap-add: Since 2.5 | 46# @block-dirty-bitmap-add: Since 2.5 |
47# |
|
46# @block-dirty-bitmap-remove: Since 4.2 | 48# @block-dirty-bitmap-remove: Since 4.2 |
49# |
|
47# @block-dirty-bitmap-clear: Since 2.5 | 50# @block-dirty-bitmap-clear: Since 2.5 |
51# |
|
48# @block-dirty-bitmap-enable: Since 4.0 | 52# @block-dirty-bitmap-enable: Since 4.0 |
53# |
|
49# @block-dirty-bitmap-disable: Since 4.0 | 54# @block-dirty-bitmap-disable: Since 4.0 |
55# |
|
50# @block-dirty-bitmap-merge: Since 4.0 | 56# @block-dirty-bitmap-merge: Since 4.0 |
57# |
|
51# @blockdev-backup: Since 2.3 | 58# @blockdev-backup: Since 2.3 |
59# |
|
52# @blockdev-snapshot: Since 2.5 | 60# @blockdev-snapshot: Since 2.5 |
61# |
|
53# @blockdev-snapshot-internal-sync: Since 1.7 | 62# @blockdev-snapshot-internal-sync: Since 1.7 |
63# |
|
54# @blockdev-snapshot-sync: since 1.1 | 64# @blockdev-snapshot-sync: since 1.1 |
65# |
|
55# @drive-backup: Since 1.6 56# 57# Features: | 66# @drive-backup: Since 1.6 67# 68# Features: |
69# |
|
58# @deprecated: Member @drive-backup is deprecated. Use member | 70# @deprecated: Member @drive-backup is deprecated. Use member |
59# @blockdev-backup instead. | 71# @blockdev-backup instead. |
60# 61# Since: 1.1 62## 63{ 'enum': 'TransactionActionKind', 64 'data': [ 'abort', 'block-dirty-bitmap-add', 'block-dirty-bitmap-remove', 65 'block-dirty-bitmap-clear', 'block-dirty-bitmap-enable', 66 'block-dirty-bitmap-disable', 'block-dirty-bitmap-merge', 67 'blockdev-backup', 'blockdev-snapshot', --- 99 unchanged lines hidden (view full) --- 167 } } 168 169## 170# @TransactionProperties: 171# 172# Optional arguments to modify the behavior of a Transaction. 173# 174# @completion-mode: Controls how jobs launched asynchronously by | 72# 73# Since: 1.1 74## 75{ 'enum': 'TransactionActionKind', 76 'data': [ 'abort', 'block-dirty-bitmap-add', 'block-dirty-bitmap-remove', 77 'block-dirty-bitmap-clear', 'block-dirty-bitmap-enable', 78 'block-dirty-bitmap-disable', 'block-dirty-bitmap-merge', 79 'blockdev-backup', 'blockdev-snapshot', --- 99 unchanged lines hidden (view full) --- 179 } } 180 181## 182# @TransactionProperties: 183# 184# Optional arguments to modify the behavior of a Transaction. 185# 186# @completion-mode: Controls how jobs launched asynchronously by |
175# Actions will complete or fail as a group. 176# See @ActionCompletionMode for details. | 187# Actions will complete or fail as a group. See 188# @ActionCompletionMode for details. |
177# 178# Since: 2.5 179## 180{ 'struct': 'TransactionProperties', 181 'data': { 182 '*completion-mode': 'ActionCompletionMode' 183 } 184} 185 186## 187# @transaction: 188# | 189# 190# Since: 2.5 191## 192{ 'struct': 'TransactionProperties', 193 'data': { 194 '*completion-mode': 'ActionCompletionMode' 195 } 196} 197 198## 199# @transaction: 200# |
189# Executes a number of transactionable QMP commands atomically. If any 190# operation fails, then the entire set of actions will be abandoned and the 191# appropriate error returned. | 201# Executes a number of transactionable QMP commands atomically. If 202# any operation fails, then the entire set of actions will be 203# abandoned and the appropriate error returned. |
192# | 204# |
193# For external snapshots, the dictionary contains the device, the file to use for 194# the new snapshot, and the format. The default format, if not specified, is 195# qcow2. | 205# For external snapshots, the dictionary contains the device, the file 206# to use for the new snapshot, and the format. The default format, if 207# not specified, is qcow2. |
196# 197# Each new snapshot defaults to being created by QEMU (wiping any | 208# 209# Each new snapshot defaults to being created by QEMU (wiping any |
198# contents if the file already exists), but it is also possible to reuse 199# an externally-created file. In the latter case, you should ensure that 200# the new image file has the same contents as the current one; QEMU cannot 201# perform any meaningful check. Typically this is achieved by using the 202# current image file as the backing file for the new image. | 210# contents if the file already exists), but it is also possible to 211# reuse an externally-created file. In the latter case, you should 212# ensure that the new image file has the same contents as the current 213# one; QEMU cannot perform any meaningful check. Typically this is 214# achieved by using the current image file as the backing file for the 215# new image. |
203# 204# On failure, the original disks pre-snapshot attempt will be used. 205# 206# For internal snapshots, the dictionary contains the device and the | 216# 217# On failure, the original disks pre-snapshot attempt will be used. 218# 219# For internal snapshots, the dictionary contains the device and the |
207# snapshot's name. If an internal snapshot matching name already exists, 208# the request will be rejected. Only some image formats support it, for 209# example, qcow2, and rbd, | 220# snapshot's name. If an internal snapshot matching name already 221# exists, the request will be rejected. Only some image formats 222# support it, for example, qcow2, and rbd, |
210# | 223# |
211# On failure, qemu will try delete the newly created internal snapshot in the 212# transaction. When an I/O error occurs during deletion, the user needs to fix 213# it later with qemu-img or other command. | 224# On failure, qemu will try delete the newly created internal snapshot 225# in the transaction. When an I/O error occurs during deletion, the 226# user needs to fix it later with qemu-img or other command. |
214# | 227# |
215# @actions: List of @TransactionAction; 216# information needed for the respective operations. | 228# @actions: List of @TransactionAction; information needed for the 229# respective operations. |
217# 218# @properties: structure of additional options to control the | 230# 231# @properties: structure of additional options to control the |
219# execution of the transaction. See @TransactionProperties 220# for additional detail. | 232# execution of the transaction. See @TransactionProperties for 233# additional detail. |
221# 222# Returns: nothing on success 223# | 234# 235# Returns: nothing on success 236# |
224# Errors depend on the operations of the transaction | 237# Errors depend on the operations of the transaction |
225# | 238# |
226# Note: The transaction aborts on the first failure. Therefore, there will be 227# information on only one failed operation returned in an error condition, and 228# subsequent actions will not have been attempted. | 239# Note: The transaction aborts on the first failure. Therefore, there 240# will be information on only one failed operation returned in an 241# error condition, and subsequent actions will not have been 242# attempted. |
229# 230# Since: 1.1 231# 232# Example: 233# 234# -> { "execute": "transaction", 235# "arguments": { "actions": [ 236# { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0", --- 7 unchanged lines hidden (view full) --- 244# { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1", 245# "snapshot-file": "/some/place/my-image2", 246# "mode": "existing", 247# "format": "qcow2" } }, 248# { "type": "blockdev-snapshot-internal-sync", "data" : { 249# "device": "ide-hd2", 250# "name": "snapshot0" } } ] } } 251# <- { "return": {} } | 243# 244# Since: 1.1 245# 246# Example: 247# 248# -> { "execute": "transaction", 249# "arguments": { "actions": [ 250# { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0", --- 7 unchanged lines hidden (view full) --- 258# { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1", 259# "snapshot-file": "/some/place/my-image2", 260# "mode": "existing", 261# "format": "qcow2" } }, 262# { "type": "blockdev-snapshot-internal-sync", "data" : { 263# "device": "ide-hd2", 264# "name": "snapshot0" } } ] } } 265# <- { "return": {} } |
252# | |
253## 254{ 'command': 'transaction', 255 'data': { 'actions': [ 'TransactionAction' ], 256 '*properties': 'TransactionProperties' 257 } 258} | 266## 267{ 'command': 'transaction', 268 'data': { 'actions': [ 'TransactionAction' ], 269 '*properties': 'TransactionProperties' 270 } 271} |