15daa6bfdSKevin Wolf# -*- Mode: Python -*- 25daa6bfdSKevin Wolf# vim: filetype=python 35daa6bfdSKevin Wolf 45daa6bfdSKevin Wolf## 55daa6bfdSKevin Wolf# == Block device exports 65daa6bfdSKevin Wolf## 75daa6bfdSKevin Wolf 85daa6bfdSKevin Wolf{ 'include': 'sockets.json' } 9e5fb29d5SVladimir Sementsov-Ogievskiy{ 'include': 'block-core.json' } 105daa6bfdSKevin Wolf 115daa6bfdSKevin Wolf## 125daa6bfdSKevin Wolf# @NbdServerOptions: 135daa6bfdSKevin Wolf# 145daa6bfdSKevin Wolf# Keep this type consistent with the nbd-server-start arguments. The only 155daa6bfdSKevin Wolf# intended difference is using SocketAddress instead of SocketAddressLegacy. 165daa6bfdSKevin Wolf# 175daa6bfdSKevin Wolf# @addr: Address on which to listen. 185daa6bfdSKevin Wolf# @tls-creds: ID of the TLS credentials object (since 2.6). 195daa6bfdSKevin Wolf# @tls-authz: ID of the QAuthZ authorization object used to validate 205daa6bfdSKevin Wolf# the client's x509 distinguished name. This object is 215daa6bfdSKevin Wolf# is only resolved at time of use, so can be deleted and 225daa6bfdSKevin Wolf# recreated on the fly while the NBD server is active. 235daa6bfdSKevin Wolf# If missing, it will default to denying access (since 4.0). 241c8222b0SKevin Wolf# @max-connections: The maximum number of connections to allow at the same 2558a6fdccSEric Blake# time, 0 for unlimited. Setting this to 1 also stops 2658a6fdccSEric Blake# the server from advertising multiple client support 2758a6fdccSEric Blake# (since 5.2; default: 0) 285daa6bfdSKevin Wolf# 295daa6bfdSKevin Wolf# Since: 4.2 305daa6bfdSKevin Wolf## 315daa6bfdSKevin Wolf{ 'struct': 'NbdServerOptions', 325daa6bfdSKevin Wolf 'data': { 'addr': 'SocketAddress', 335daa6bfdSKevin Wolf '*tls-creds': 'str', 341c8222b0SKevin Wolf '*tls-authz': 'str', 351c8222b0SKevin Wolf '*max-connections': 'uint32' } } 365daa6bfdSKevin Wolf 375daa6bfdSKevin Wolf## 385daa6bfdSKevin Wolf# @nbd-server-start: 395daa6bfdSKevin Wolf# 405daa6bfdSKevin Wolf# Start an NBD server listening on the given host and port. Block 415daa6bfdSKevin Wolf# devices can then be exported using @nbd-server-add. The NBD 425daa6bfdSKevin Wolf# server will present them as named exports; for example, another 435daa6bfdSKevin Wolf# QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME". 445daa6bfdSKevin Wolf# 455daa6bfdSKevin Wolf# Keep this type consistent with the NbdServerOptions type. The only intended 465daa6bfdSKevin Wolf# difference is using SocketAddressLegacy instead of SocketAddress. 475daa6bfdSKevin Wolf# 485daa6bfdSKevin Wolf# @addr: Address on which to listen. 495daa6bfdSKevin Wolf# @tls-creds: ID of the TLS credentials object (since 2.6). 505daa6bfdSKevin Wolf# @tls-authz: ID of the QAuthZ authorization object used to validate 515daa6bfdSKevin Wolf# the client's x509 distinguished name. This object is 525daa6bfdSKevin Wolf# is only resolved at time of use, so can be deleted and 535daa6bfdSKevin Wolf# recreated on the fly while the NBD server is active. 545daa6bfdSKevin Wolf# If missing, it will default to denying access (since 4.0). 551c8222b0SKevin Wolf# @max-connections: The maximum number of connections to allow at the same 5658a6fdccSEric Blake# time, 0 for unlimited. Setting this to 1 also stops 5758a6fdccSEric Blake# the server from advertising multiple client support 5858a6fdccSEric Blake# (since 5.2; default: 0). 595daa6bfdSKevin Wolf# 605daa6bfdSKevin Wolf# Returns: error if the server is already running. 615daa6bfdSKevin Wolf# 629bc6e893SMarkus Armbruster# Since: 1.3 635daa6bfdSKevin Wolf## 645daa6bfdSKevin Wolf{ 'command': 'nbd-server-start', 655daa6bfdSKevin Wolf 'data': { 'addr': 'SocketAddressLegacy', 665daa6bfdSKevin Wolf '*tls-creds': 'str', 671c8222b0SKevin Wolf '*tls-authz': 'str', 68*f55ba801SPaolo Bonzini '*max-connections': 'uint32' }, 69*f55ba801SPaolo Bonzini 'allow-preconfig': true } 705daa6bfdSKevin Wolf 715daa6bfdSKevin Wolf## 72cbad81ceSEric Blake# @BlockExportOptionsNbdBase: 735daa6bfdSKevin Wolf# 74cbad81ceSEric Blake# An NBD block export (common options shared between nbd-server-add and 75cbad81ceSEric Blake# the NBD branch of block-export-add). 765daa6bfdSKevin Wolf# 775daa6bfdSKevin Wolf# @name: Export name. If unspecified, the @device parameter is used as the 785daa6bfdSKevin Wolf# export name. (Since 2.12) 795daa6bfdSKevin Wolf# 805daa6bfdSKevin Wolf# @description: Free-form description of the export, up to 4096 bytes. 815daa6bfdSKevin Wolf# (Since 5.0) 825daa6bfdSKevin Wolf# 835daa6bfdSKevin Wolf# Since: 5.0 845daa6bfdSKevin Wolf## 85cbad81ceSEric Blake{ 'struct': 'BlockExportOptionsNbdBase', 86cbad81ceSEric Blake 'data': { '*name': 'str', '*description': 'str' } } 87cbad81ceSEric Blake 88cbad81ceSEric Blake## 89cbad81ceSEric Blake# @BlockExportOptionsNbd: 90cbad81ceSEric Blake# 91cbad81ceSEric Blake# An NBD block export (distinct options used in the NBD branch of 92cbad81ceSEric Blake# block-export-add). 93cbad81ceSEric Blake# 94cbad81ceSEric Blake# @bitmaps: Also export each of the named dirty bitmaps reachable from 95cbad81ceSEric Blake# @device, so the NBD client can use NBD_OPT_SET_META_CONTEXT with 96cbad81ceSEric Blake# the metadata context name "qemu:dirty-bitmap:BITMAP" to inspect 97cbad81ceSEric Blake# each bitmap. 98e5fb29d5SVladimir Sementsov-Ogievskiy# Since 7.1 bitmap may be specified by node/name pair. 99cbad81ceSEric Blake# 100dbc7b014SEric Blake# @allocation-depth: Also export the allocation depth map for @device, so 101dbc7b014SEric Blake# the NBD client can use NBD_OPT_SET_META_CONTEXT with 102dbc7b014SEric Blake# the metadata context name "qemu:allocation-depth" to 103dbc7b014SEric Blake# inspect allocation details. (since 5.2) 104dbc7b014SEric Blake# 105cbad81ceSEric Blake# Since: 5.2 106cbad81ceSEric Blake## 107143ea767SKevin Wolf{ 'struct': 'BlockExportOptionsNbd', 108cbad81ceSEric Blake 'base': 'BlockExportOptionsNbdBase', 109e5fb29d5SVladimir Sementsov-Ogievskiy 'data': { '*bitmaps': ['BlockDirtyBitmapOrStr'], 110e5fb29d5SVladimir Sementsov-Ogievskiy '*allocation-depth': 'bool' } } 1115daa6bfdSKevin Wolf 1125daa6bfdSKevin Wolf## 11390fc91d5SStefan Hajnoczi# @BlockExportOptionsVhostUserBlk: 11490fc91d5SStefan Hajnoczi# 11590fc91d5SStefan Hajnoczi# A vhost-user-blk block export. 11690fc91d5SStefan Hajnoczi# 11790fc91d5SStefan Hajnoczi# @addr: The vhost-user socket on which to listen. Both 'unix' and 'fd' 11890fc91d5SStefan Hajnoczi# SocketAddress types are supported. Passed fds must be UNIX domain 11990fc91d5SStefan Hajnoczi# sockets. 12090fc91d5SStefan Hajnoczi# @logical-block-size: Logical block size in bytes. Defaults to 512 bytes. 121d9b495f9SStefan Hajnoczi# @num-queues: Number of request virtqueues. Must be greater than 0. Defaults 122d9b495f9SStefan Hajnoczi# to 1. 12390fc91d5SStefan Hajnoczi# 12490fc91d5SStefan Hajnoczi# Since: 5.2 12590fc91d5SStefan Hajnoczi## 12690fc91d5SStefan Hajnoczi{ 'struct': 'BlockExportOptionsVhostUserBlk', 127d9b495f9SStefan Hajnoczi 'data': { 'addr': 'SocketAddress', 128d9b495f9SStefan Hajnoczi '*logical-block-size': 'size', 129d9b495f9SStefan Hajnoczi '*num-queues': 'uint16'} } 13090fc91d5SStefan Hajnoczi 13190fc91d5SStefan Hajnoczi## 1328fc54f94SMax Reitz# @FuseExportAllowOther: 1338fc54f94SMax Reitz# 1348fc54f94SMax Reitz# Possible allow_other modes for FUSE exports. 1358fc54f94SMax Reitz# 1368fc54f94SMax Reitz# @off: Do not pass allow_other as a mount option. 1378fc54f94SMax Reitz# 1388fc54f94SMax Reitz# @on: Pass allow_other as a mount option. 1398fc54f94SMax Reitz# 1408fc54f94SMax Reitz# @auto: Try mounting with allow_other first, and if that fails, retry 1418fc54f94SMax Reitz# without allow_other. 1428fc54f94SMax Reitz# 1438fc54f94SMax Reitz# Since: 6.1 1448fc54f94SMax Reitz## 1458fc54f94SMax Reitz{ 'enum': 'FuseExportAllowOther', 1468fc54f94SMax Reitz 'data': ['off', 'on', 'auto'] } 1478fc54f94SMax Reitz 1488fc54f94SMax Reitz## 1490c9b70d5SMax Reitz# @BlockExportOptionsFuse: 1500c9b70d5SMax Reitz# 1510c9b70d5SMax Reitz# Options for exporting a block graph node on some (file) mountpoint 1520c9b70d5SMax Reitz# as a raw image. 1530c9b70d5SMax Reitz# 1540c9b70d5SMax Reitz# @mountpoint: Path on which to export the block device via FUSE. 1550c9b70d5SMax Reitz# This must point to an existing regular file. 1560c9b70d5SMax Reitz# 1574fba06d5SMax Reitz# @growable: Whether writes beyond the EOF should grow the block node 1584fba06d5SMax Reitz# accordingly. (default: false) 1594fba06d5SMax Reitz# 1608fc54f94SMax Reitz# @allow-other: If this is off, only qemu's user is allowed access to 1618fc54f94SMax Reitz# this export. That cannot be changed even with chmod or 1628fc54f94SMax Reitz# chown. 1638fc54f94SMax Reitz# Enabling this option will allow other users access to 1648fc54f94SMax Reitz# the export with the FUSE mount option "allow_other". 1658fc54f94SMax Reitz# Note that using allow_other as a non-root user requires 1668fc54f94SMax Reitz# user_allow_other to be enabled in the global fuse.conf 1678fc54f94SMax Reitz# configuration file. 1688fc54f94SMax Reitz# In auto mode (the default), the FUSE export driver will 1698fc54f94SMax Reitz# first attempt to mount the export with allow_other, and 1708fc54f94SMax Reitz# if that fails, try again without. 1718fc54f94SMax Reitz# (since 6.1; default: auto) 1728fc54f94SMax Reitz# 1730c9b70d5SMax Reitz# Since: 6.0 1740c9b70d5SMax Reitz## 1750c9b70d5SMax Reitz{ 'struct': 'BlockExportOptionsFuse', 1764fba06d5SMax Reitz 'data': { 'mountpoint': 'str', 1778fc54f94SMax Reitz '*growable': 'bool', 1788fc54f94SMax Reitz '*allow-other': 'FuseExportAllowOther' }, 1798a9f1e1dSMarc-André Lureau 'if': 'CONFIG_FUSE' } 1800c9b70d5SMax Reitz 1810c9b70d5SMax Reitz## 182b6076afcSKevin Wolf# @NbdServerAddOptions: 183b6076afcSKevin Wolf# 184cbad81ceSEric Blake# An NBD block export, per legacy nbd-server-add command. 185b6076afcSKevin Wolf# 186b6076afcSKevin Wolf# @device: The device name or node name of the node to be exported 187b6076afcSKevin Wolf# 18830dbc81dSKevin Wolf# @writable: Whether clients should be able to write to the device via the 18930dbc81dSKevin Wolf# NBD connection (default false). 19030dbc81dSKevin Wolf# 191cbad81ceSEric Blake# @bitmap: Also export a single dirty bitmap reachable from @device, so the 192cbad81ceSEric Blake# NBD client can use NBD_OPT_SET_META_CONTEXT with the metadata 193cbad81ceSEric Blake# context name "qemu:dirty-bitmap:BITMAP" to inspect the bitmap 194cbad81ceSEric Blake# (since 4.0). 195cbad81ceSEric Blake# 196b6076afcSKevin Wolf# Since: 5.0 197b6076afcSKevin Wolf## 198b6076afcSKevin Wolf{ 'struct': 'NbdServerAddOptions', 199cbad81ceSEric Blake 'base': 'BlockExportOptionsNbdBase', 20030dbc81dSKevin Wolf 'data': { 'device': 'str', 201cbad81ceSEric Blake '*writable': 'bool', '*bitmap': 'str' } } 202b6076afcSKevin Wolf 203b6076afcSKevin Wolf## 2045daa6bfdSKevin Wolf# @nbd-server-add: 2055daa6bfdSKevin Wolf# 2065daa6bfdSKevin Wolf# Export a block node to QEMU's embedded NBD server. 2075daa6bfdSKevin Wolf# 208d53be9ceSKevin Wolf# The export name will be used as the id for the resulting block export. 209d53be9ceSKevin Wolf# 210443127e8SKevin Wolf# Features: 211443127e8SKevin Wolf# @deprecated: This command is deprecated. Use @block-export-add instead. 212443127e8SKevin Wolf# 2135daa6bfdSKevin Wolf# Returns: error if the server is not running, or export with the same name 2145daa6bfdSKevin Wolf# already exists. 2155daa6bfdSKevin Wolf# 2169bc6e893SMarkus Armbruster# Since: 1.3 2175daa6bfdSKevin Wolf## 2185daa6bfdSKevin Wolf{ 'command': 'nbd-server-add', 219*f55ba801SPaolo Bonzini 'data': 'NbdServerAddOptions', 'boxed': true, 'features': ['deprecated'], 220*f55ba801SPaolo Bonzini 'allow-preconfig': true } 2215daa6bfdSKevin Wolf 2225daa6bfdSKevin Wolf## 2233c3bc462SKevin Wolf# @BlockExportRemoveMode: 2245daa6bfdSKevin Wolf# 2253c3bc462SKevin Wolf# Mode for removing a block export. 2265daa6bfdSKevin Wolf# 2275daa6bfdSKevin Wolf# @safe: Remove export if there are no existing connections, fail otherwise. 2285daa6bfdSKevin Wolf# 2295daa6bfdSKevin Wolf# @hard: Drop all connections immediately and remove export. 2305daa6bfdSKevin Wolf# 23197cd74f7SVictor Toso# TODO: Potential additional modes to be added in the future: 2325daa6bfdSKevin Wolf# 2335daa6bfdSKevin Wolf# hide: Just hide export from new clients, leave existing connections as is. 2345daa6bfdSKevin Wolf# Remove export after all clients are disconnected. 2355daa6bfdSKevin Wolf# 2365daa6bfdSKevin Wolf# soft: Hide export from new clients, answer with ESHUTDOWN for all further 2375daa6bfdSKevin Wolf# requests from existing clients. 2385daa6bfdSKevin Wolf# 2395daa6bfdSKevin Wolf# Since: 2.12 2405daa6bfdSKevin Wolf## 2413c3bc462SKevin Wolf{'enum': 'BlockExportRemoveMode', 'data': ['safe', 'hard']} 2425daa6bfdSKevin Wolf 2435daa6bfdSKevin Wolf## 2445daa6bfdSKevin Wolf# @nbd-server-remove: 2455daa6bfdSKevin Wolf# 2465daa6bfdSKevin Wolf# Remove NBD export by name. 2475daa6bfdSKevin Wolf# 2483c3bc462SKevin Wolf# @name: Block export id. 2495daa6bfdSKevin Wolf# 2503c3bc462SKevin Wolf# @mode: Mode of command operation. See @BlockExportRemoveMode description. 2515daa6bfdSKevin Wolf# Default is 'safe'. 2525daa6bfdSKevin Wolf# 253443127e8SKevin Wolf# Features: 254443127e8SKevin Wolf# @deprecated: This command is deprecated. Use @block-export-del instead. 255443127e8SKevin Wolf# 2565daa6bfdSKevin Wolf# Returns: error if 2575daa6bfdSKevin Wolf# - the server is not running 2585daa6bfdSKevin Wolf# - export is not found 2595daa6bfdSKevin Wolf# - mode is 'safe' and there are existing connections 2605daa6bfdSKevin Wolf# 2615daa6bfdSKevin Wolf# Since: 2.12 2625daa6bfdSKevin Wolf## 2635daa6bfdSKevin Wolf{ 'command': 'nbd-server-remove', 264443127e8SKevin Wolf 'data': {'name': 'str', '*mode': 'BlockExportRemoveMode'}, 265*f55ba801SPaolo Bonzini 'features': ['deprecated'], 266*f55ba801SPaolo Bonzini 'allow-preconfig': true } 2675daa6bfdSKevin Wolf 2685daa6bfdSKevin Wolf## 2695daa6bfdSKevin Wolf# @nbd-server-stop: 2705daa6bfdSKevin Wolf# 2715daa6bfdSKevin Wolf# Stop QEMU's embedded NBD server, and unregister all devices previously 2725daa6bfdSKevin Wolf# added via @nbd-server-add. 2735daa6bfdSKevin Wolf# 2749bc6e893SMarkus Armbruster# Since: 1.3 2755daa6bfdSKevin Wolf## 276*f55ba801SPaolo Bonzini{ 'command': 'nbd-server-stop', 277*f55ba801SPaolo Bonzini 'allow-preconfig': true } 2785daa6bfdSKevin Wolf 2795daa6bfdSKevin Wolf## 2805daa6bfdSKevin Wolf# @BlockExportType: 2815daa6bfdSKevin Wolf# 2825daa6bfdSKevin Wolf# An enumeration of block export types 2835daa6bfdSKevin Wolf# 2845daa6bfdSKevin Wolf# @nbd: NBD export 28590fc91d5SStefan Hajnoczi# @vhost-user-blk: vhost-user-blk export (since 5.2) 2860c9b70d5SMax Reitz# @fuse: FUSE export (since: 6.0) 2875daa6bfdSKevin Wolf# 2885daa6bfdSKevin Wolf# Since: 4.2 2895daa6bfdSKevin Wolf## 2905daa6bfdSKevin Wolf{ 'enum': 'BlockExportType', 291bb01ea73SPhilippe Mathieu-Daudé 'data': [ 'nbd', 2923a8fa0edSPhilippe Mathieu-Daude { 'name': 'vhost-user-blk', 2933a8fa0edSPhilippe Mathieu-Daude 'if': 'CONFIG_VHOST_USER_BLK_SERVER' }, 2948a9f1e1dSMarc-André Lureau { 'name': 'fuse', 'if': 'CONFIG_FUSE' } ] } 2955daa6bfdSKevin Wolf 2965daa6bfdSKevin Wolf## 297143ea767SKevin Wolf# @BlockExportOptions: 2985daa6bfdSKevin Wolf# 2995daa6bfdSKevin Wolf# Describes a block export, i.e. how single node should be exported on an 3005daa6bfdSKevin Wolf# external interface. 3015daa6bfdSKevin Wolf# 302d53be9ceSKevin Wolf# @id: A unique identifier for the block export (across all export types) 303d53be9ceSKevin Wolf# 304b6076afcSKevin Wolf# @node-name: The node name of the block node to be exported (since: 5.2) 305b6076afcSKevin Wolf# 30630dbc81dSKevin Wolf# @writable: True if clients should be able to write to the export 30730dbc81dSKevin Wolf# (default false) 30830dbc81dSKevin Wolf# 309fefee85dSKevin Wolf# @writethrough: If true, caches are flushed after every write request to the 310fefee85dSKevin Wolf# export before completion is signalled. (since: 5.2; 311fefee85dSKevin Wolf# default: false) 312fefee85dSKevin Wolf# 313f51d23c8SStefan Hajnoczi# @iothread: The name of the iothread object where the export will run. The 314f51d23c8SStefan Hajnoczi# default is to use the thread currently associated with the 315f51d23c8SStefan Hajnoczi# block node. (since: 5.2) 316f51d23c8SStefan Hajnoczi# 317f51d23c8SStefan Hajnoczi# @fixed-iothread: True prevents the block node from being moved to another 318f51d23c8SStefan Hajnoczi# thread while the export is active. If true and @iothread is 319f51d23c8SStefan Hajnoczi# given, export creation fails if the block node cannot be 320f51d23c8SStefan Hajnoczi# moved to the iothread. The default is false. (since: 5.2) 321f51d23c8SStefan Hajnoczi# 3225daa6bfdSKevin Wolf# Since: 4.2 3235daa6bfdSKevin Wolf## 324143ea767SKevin Wolf{ 'union': 'BlockExportOptions', 325fefee85dSKevin Wolf 'base': { 'type': 'BlockExportType', 326d53be9ceSKevin Wolf 'id': 'str', 327f51d23c8SStefan Hajnoczi '*fixed-iothread': 'bool', 328f51d23c8SStefan Hajnoczi '*iothread': 'str', 329b6076afcSKevin Wolf 'node-name': 'str', 33030dbc81dSKevin Wolf '*writable': 'bool', 331fefee85dSKevin Wolf '*writethrough': 'bool' }, 3325daa6bfdSKevin Wolf 'discriminator': 'type', 3335daa6bfdSKevin Wolf 'data': { 33490fc91d5SStefan Hajnoczi 'nbd': 'BlockExportOptionsNbd', 335bb01ea73SPhilippe Mathieu-Daudé 'vhost-user-blk': { 'type': 'BlockExportOptionsVhostUserBlk', 336bb01ea73SPhilippe Mathieu-Daudé 'if': 'CONFIG_VHOST_USER_BLK_SERVER' }, 3370c9b70d5SMax Reitz 'fuse': { 'type': 'BlockExportOptionsFuse', 3388a9f1e1dSMarc-André Lureau 'if': 'CONFIG_FUSE' } 3395daa6bfdSKevin Wolf } } 34056ee8626SKevin Wolf 34156ee8626SKevin Wolf## 34256ee8626SKevin Wolf# @block-export-add: 34356ee8626SKevin Wolf# 34456ee8626SKevin Wolf# Creates a new block export. 34556ee8626SKevin Wolf# 34656ee8626SKevin Wolf# Since: 5.2 34756ee8626SKevin Wolf## 34856ee8626SKevin Wolf{ 'command': 'block-export-add', 349*f55ba801SPaolo Bonzini 'data': 'BlockExportOptions', 'boxed': true, 350*f55ba801SPaolo Bonzini 'allow-preconfig': true } 3513c3bc462SKevin Wolf 3523c3bc462SKevin Wolf## 3533c3bc462SKevin Wolf# @block-export-del: 3543c3bc462SKevin Wolf# 3553c3bc462SKevin Wolf# Request to remove a block export. This drops the user's reference to the 3563c3bc462SKevin Wolf# export, but the export may still stay around after this command returns until 3573c3bc462SKevin Wolf# the shutdown of the export has completed. 3583c3bc462SKevin Wolf# 3593c3bc462SKevin Wolf# @id: Block export id. 3603c3bc462SKevin Wolf# 3613c3bc462SKevin Wolf# @mode: Mode of command operation. See @BlockExportRemoveMode description. 3623c3bc462SKevin Wolf# Default is 'safe'. 3633c3bc462SKevin Wolf# 3643c3bc462SKevin Wolf# Returns: Error if the export is not found or @mode is 'safe' and the export 3653c3bc462SKevin Wolf# is still in use (e.g. by existing client connections) 3663c3bc462SKevin Wolf# 3673c3bc462SKevin Wolf# Since: 5.2 3683c3bc462SKevin Wolf## 3693c3bc462SKevin Wolf{ 'command': 'block-export-del', 370*f55ba801SPaolo Bonzini 'data': { 'id': 'str', '*mode': 'BlockExportRemoveMode' }, 371*f55ba801SPaolo Bonzini 'allow-preconfig': true } 3721a9f7a80SKevin Wolf 3731a9f7a80SKevin Wolf## 3741a9f7a80SKevin Wolf# @BLOCK_EXPORT_DELETED: 3751a9f7a80SKevin Wolf# 3761a9f7a80SKevin Wolf# Emitted when a block export is removed and its id can be reused. 3771a9f7a80SKevin Wolf# 3781a9f7a80SKevin Wolf# @id: Block export id. 3791a9f7a80SKevin Wolf# 3801a9f7a80SKevin Wolf# Since: 5.2 3811a9f7a80SKevin Wolf## 3821a9f7a80SKevin Wolf{ 'event': 'BLOCK_EXPORT_DELETED', 3831a9f7a80SKevin Wolf 'data': { 'id': 'str' } } 3848cade320SKevin Wolf 3858cade320SKevin Wolf## 3868cade320SKevin Wolf# @BlockExportInfo: 3878cade320SKevin Wolf# 3888cade320SKevin Wolf# Information about a single block export. 3898cade320SKevin Wolf# 3908cade320SKevin Wolf# @id: The unique identifier for the block export 3918cade320SKevin Wolf# 3928cade320SKevin Wolf# @type: The block export type 3938cade320SKevin Wolf# 3948cade320SKevin Wolf# @node-name: The node name of the block node that is exported 3958cade320SKevin Wolf# 3968cade320SKevin Wolf# @shutting-down: True if the export is shutting down (e.g. after a 3978cade320SKevin Wolf# block-export-del command, but before the shutdown has 3988cade320SKevin Wolf# completed) 3998cade320SKevin Wolf# 4008cade320SKevin Wolf# Since: 5.2 4018cade320SKevin Wolf## 4028cade320SKevin Wolf{ 'struct': 'BlockExportInfo', 4038cade320SKevin Wolf 'data': { 'id': 'str', 4048cade320SKevin Wolf 'type': 'BlockExportType', 4058cade320SKevin Wolf 'node-name': 'str', 4068cade320SKevin Wolf 'shutting-down': 'bool' } } 4078cade320SKevin Wolf 4088cade320SKevin Wolf## 4098cade320SKevin Wolf# @query-block-exports: 4108cade320SKevin Wolf# 4118cade320SKevin Wolf# Returns: A list of BlockExportInfo describing all block exports 4128cade320SKevin Wolf# 4138cade320SKevin Wolf# Since: 5.2 4148cade320SKevin Wolf## 415*f55ba801SPaolo Bonzini{ 'command': 'query-block-exports', 'returns': ['BlockExportInfo'], 416*f55ba801SPaolo Bonzini 'allow-preconfig': true } 417