yank.json 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # -*- Mode: Python -*-
  2. # vim: filetype=python
  3. #
  4. ##
  5. # = Yank feature
  6. ##
  7. ##
  8. # @YankInstanceType:
  9. #
  10. # An enumeration of yank instance types. See @YankInstance for more
  11. # information.
  12. #
  13. # Since: 6.0
  14. ##
  15. { 'enum': 'YankInstanceType',
  16. 'data': [ 'block-node', 'chardev', 'migration' ] }
  17. ##
  18. # @YankInstanceBlockNode:
  19. #
  20. # Specifies which block graph node to yank. See @YankInstance for
  21. # more information.
  22. #
  23. # @node-name: the name of the block graph node
  24. #
  25. # Since: 6.0
  26. ##
  27. { 'struct': 'YankInstanceBlockNode',
  28. 'data': { 'node-name': 'str' } }
  29. ##
  30. # @YankInstanceChardev:
  31. #
  32. # Specifies which character device to yank. See @YankInstance for
  33. # more information.
  34. #
  35. # @id: the chardev's ID
  36. #
  37. # Since: 6.0
  38. ##
  39. { 'struct': 'YankInstanceChardev',
  40. 'data': { 'id': 'str' } }
  41. ##
  42. # @YankInstance:
  43. #
  44. # A yank instance can be yanked with the @yank qmp command to recover
  45. # from a hanging QEMU.
  46. #
  47. # @type: yank instance type
  48. #
  49. # Currently implemented yank instances:
  50. #
  51. # - nbd block device: Yanking it will shut down the connection to the
  52. # nbd server without attempting to reconnect.
  53. # - socket chardev: Yanking it will shut down the connected socket.
  54. # - migration: Yanking it will shut down all migration connections.
  55. # Unlike @migrate_cancel, it will not notify the migration process,
  56. # so migration will go into @failed state, instead of @cancelled
  57. # state. @yank should be used to recover from hangs.
  58. #
  59. # Since: 6.0
  60. ##
  61. { 'union': 'YankInstance',
  62. 'base': { 'type': 'YankInstanceType' },
  63. 'discriminator': 'type',
  64. 'data': {
  65. 'block-node': 'YankInstanceBlockNode',
  66. 'chardev': 'YankInstanceChardev' } }
  67. ##
  68. # @yank:
  69. #
  70. # Try to recover from hanging QEMU by yanking the specified instances.
  71. # See @YankInstance for more information.
  72. #
  73. # @instances: the instances to be yanked
  74. #
  75. # Errors:
  76. # - If any of the YankInstances doesn't exist, DeviceNotFound
  77. #
  78. # .. qmp-example::
  79. #
  80. # -> { "execute": "yank",
  81. # "arguments": {
  82. # "instances": [
  83. # { "type": "block-node",
  84. # "node-name": "nbd0" }
  85. # ] } }
  86. # <- { "return": {} }
  87. #
  88. # Since: 6.0
  89. ##
  90. { 'command': 'yank',
  91. 'data': { 'instances': ['YankInstance'] },
  92. 'allow-oob': true }
  93. ##
  94. # @query-yank:
  95. #
  96. # Query yank instances. See @YankInstance for more information.
  97. #
  98. # Returns: list of @YankInstance
  99. #
  100. # .. qmp-example::
  101. #
  102. # -> { "execute": "query-yank" }
  103. # <- { "return": [
  104. # { "type": "block-node",
  105. # "node-name": "nbd0" }
  106. # ] }
  107. #
  108. # Since: 6.0
  109. ##
  110. { 'command': 'query-yank',
  111. 'returns': ['YankInstance'],
  112. 'allow-oob': true }