xref: /openbmc/qemu/qapi/block-export.json (revision 8a9f1e1d9cc55f5eb0946cbf8fd1ef9a0e7d3dac)
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' }
95daa6bfdSKevin Wolf
105daa6bfdSKevin Wolf##
115daa6bfdSKevin Wolf# @NbdServerOptions:
125daa6bfdSKevin Wolf#
135daa6bfdSKevin Wolf# Keep this type consistent with the nbd-server-start arguments. The only
145daa6bfdSKevin Wolf# intended difference is using SocketAddress instead of SocketAddressLegacy.
155daa6bfdSKevin Wolf#
165daa6bfdSKevin Wolf# @addr: Address on which to listen.
175daa6bfdSKevin Wolf# @tls-creds: ID of the TLS credentials object (since 2.6).
185daa6bfdSKevin Wolf# @tls-authz: ID of the QAuthZ authorization object used to validate
195daa6bfdSKevin Wolf#             the client's x509 distinguished name. This object is
205daa6bfdSKevin Wolf#             is only resolved at time of use, so can be deleted and
215daa6bfdSKevin Wolf#             recreated on the fly while the NBD server is active.
225daa6bfdSKevin Wolf#             If missing, it will default to denying access (since 4.0).
231c8222b0SKevin Wolf# @max-connections: The maximum number of connections to allow at the same
241c8222b0SKevin Wolf#                   time, 0 for unlimited. (since 5.2; default: 0)
255daa6bfdSKevin Wolf#
265daa6bfdSKevin Wolf# Since: 4.2
275daa6bfdSKevin Wolf##
285daa6bfdSKevin Wolf{ 'struct': 'NbdServerOptions',
295daa6bfdSKevin Wolf  'data': { 'addr': 'SocketAddress',
305daa6bfdSKevin Wolf            '*tls-creds': 'str',
311c8222b0SKevin Wolf            '*tls-authz': 'str',
321c8222b0SKevin Wolf            '*max-connections': 'uint32' } }
335daa6bfdSKevin Wolf
345daa6bfdSKevin Wolf##
355daa6bfdSKevin Wolf# @nbd-server-start:
365daa6bfdSKevin Wolf#
375daa6bfdSKevin Wolf# Start an NBD server listening on the given host and port.  Block
385daa6bfdSKevin Wolf# devices can then be exported using @nbd-server-add.  The NBD
395daa6bfdSKevin Wolf# server will present them as named exports; for example, another
405daa6bfdSKevin Wolf# QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
415daa6bfdSKevin Wolf#
425daa6bfdSKevin Wolf# Keep this type consistent with the NbdServerOptions type. The only intended
435daa6bfdSKevin Wolf# difference is using SocketAddressLegacy instead of SocketAddress.
445daa6bfdSKevin Wolf#
455daa6bfdSKevin Wolf# @addr: Address on which to listen.
465daa6bfdSKevin Wolf# @tls-creds: ID of the TLS credentials object (since 2.6).
475daa6bfdSKevin Wolf# @tls-authz: ID of the QAuthZ authorization object used to validate
485daa6bfdSKevin Wolf#             the client's x509 distinguished name. This object is
495daa6bfdSKevin Wolf#             is only resolved at time of use, so can be deleted and
505daa6bfdSKevin Wolf#             recreated on the fly while the NBD server is active.
515daa6bfdSKevin Wolf#             If missing, it will default to denying access (since 4.0).
521c8222b0SKevin Wolf# @max-connections: The maximum number of connections to allow at the same
531c8222b0SKevin Wolf#                   time, 0 for unlimited. (since 5.2; default: 0)
545daa6bfdSKevin Wolf#
555daa6bfdSKevin Wolf# Returns: error if the server is already running.
565daa6bfdSKevin Wolf#
579bc6e893SMarkus Armbruster# Since: 1.3
585daa6bfdSKevin Wolf##
595daa6bfdSKevin Wolf{ 'command': 'nbd-server-start',
605daa6bfdSKevin Wolf  'data': { 'addr': 'SocketAddressLegacy',
615daa6bfdSKevin Wolf            '*tls-creds': 'str',
621c8222b0SKevin Wolf            '*tls-authz': 'str',
631c8222b0SKevin Wolf            '*max-connections': 'uint32' } }
645daa6bfdSKevin Wolf
655daa6bfdSKevin Wolf##
66cbad81ceSEric Blake# @BlockExportOptionsNbdBase:
675daa6bfdSKevin Wolf#
68cbad81ceSEric Blake# An NBD block export (common options shared between nbd-server-add and
69cbad81ceSEric Blake# the NBD branch of block-export-add).
705daa6bfdSKevin Wolf#
715daa6bfdSKevin Wolf# @name: Export name. If unspecified, the @device parameter is used as the
725daa6bfdSKevin Wolf#        export name. (Since 2.12)
735daa6bfdSKevin Wolf#
745daa6bfdSKevin Wolf# @description: Free-form description of the export, up to 4096 bytes.
755daa6bfdSKevin Wolf#               (Since 5.0)
765daa6bfdSKevin Wolf#
775daa6bfdSKevin Wolf# Since: 5.0
785daa6bfdSKevin Wolf##
79cbad81ceSEric Blake{ 'struct': 'BlockExportOptionsNbdBase',
80cbad81ceSEric Blake  'data': { '*name': 'str', '*description': 'str' } }
81cbad81ceSEric Blake
82cbad81ceSEric Blake##
83cbad81ceSEric Blake# @BlockExportOptionsNbd:
84cbad81ceSEric Blake#
85cbad81ceSEric Blake# An NBD block export (distinct options used in the NBD branch of
86cbad81ceSEric Blake# block-export-add).
87cbad81ceSEric Blake#
88cbad81ceSEric Blake# @bitmaps: Also export each of the named dirty bitmaps reachable from
89cbad81ceSEric Blake#           @device, so the NBD client can use NBD_OPT_SET_META_CONTEXT with
90cbad81ceSEric Blake#           the metadata context name "qemu:dirty-bitmap:BITMAP" to inspect
91cbad81ceSEric Blake#           each bitmap.
92cbad81ceSEric Blake#
93dbc7b014SEric Blake# @allocation-depth: Also export the allocation depth map for @device, so
94dbc7b014SEric Blake#                    the NBD client can use NBD_OPT_SET_META_CONTEXT with
95dbc7b014SEric Blake#                    the metadata context name "qemu:allocation-depth" to
96dbc7b014SEric Blake#                    inspect allocation details. (since 5.2)
97dbc7b014SEric Blake#
98cbad81ceSEric Blake# Since: 5.2
99cbad81ceSEric Blake##
100143ea767SKevin Wolf{ 'struct': 'BlockExportOptionsNbd',
101cbad81ceSEric Blake  'base': 'BlockExportOptionsNbdBase',
102dbc7b014SEric Blake  'data': { '*bitmaps': ['str'], '*allocation-depth': 'bool' } }
1035daa6bfdSKevin Wolf
1045daa6bfdSKevin Wolf##
10590fc91d5SStefan Hajnoczi# @BlockExportOptionsVhostUserBlk:
10690fc91d5SStefan Hajnoczi#
10790fc91d5SStefan Hajnoczi# A vhost-user-blk block export.
10890fc91d5SStefan Hajnoczi#
10990fc91d5SStefan Hajnoczi# @addr: The vhost-user socket on which to listen. Both 'unix' and 'fd'
11090fc91d5SStefan Hajnoczi#        SocketAddress types are supported. Passed fds must be UNIX domain
11190fc91d5SStefan Hajnoczi#        sockets.
11290fc91d5SStefan Hajnoczi# @logical-block-size: Logical block size in bytes. Defaults to 512 bytes.
113d9b495f9SStefan Hajnoczi# @num-queues: Number of request virtqueues. Must be greater than 0. Defaults
114d9b495f9SStefan Hajnoczi#              to 1.
11590fc91d5SStefan Hajnoczi#
11690fc91d5SStefan Hajnoczi# Since: 5.2
11790fc91d5SStefan Hajnoczi##
11890fc91d5SStefan Hajnoczi{ 'struct': 'BlockExportOptionsVhostUserBlk',
119d9b495f9SStefan Hajnoczi  'data': { 'addr': 'SocketAddress',
120d9b495f9SStefan Hajnoczi	    '*logical-block-size': 'size',
121d9b495f9SStefan Hajnoczi            '*num-queues': 'uint16'} }
12290fc91d5SStefan Hajnoczi
12390fc91d5SStefan Hajnoczi##
1248fc54f94SMax Reitz# @FuseExportAllowOther:
1258fc54f94SMax Reitz#
1268fc54f94SMax Reitz# Possible allow_other modes for FUSE exports.
1278fc54f94SMax Reitz#
1288fc54f94SMax Reitz# @off: Do not pass allow_other as a mount option.
1298fc54f94SMax Reitz#
1308fc54f94SMax Reitz# @on: Pass allow_other as a mount option.
1318fc54f94SMax Reitz#
1328fc54f94SMax Reitz# @auto: Try mounting with allow_other first, and if that fails, retry
1338fc54f94SMax Reitz#        without allow_other.
1348fc54f94SMax Reitz#
1358fc54f94SMax Reitz# Since: 6.1
1368fc54f94SMax Reitz##
1378fc54f94SMax Reitz{ 'enum': 'FuseExportAllowOther',
1388fc54f94SMax Reitz  'data': ['off', 'on', 'auto'] }
1398fc54f94SMax Reitz
1408fc54f94SMax Reitz##
1410c9b70d5SMax Reitz# @BlockExportOptionsFuse:
1420c9b70d5SMax Reitz#
1430c9b70d5SMax Reitz# Options for exporting a block graph node on some (file) mountpoint
1440c9b70d5SMax Reitz# as a raw image.
1450c9b70d5SMax Reitz#
1460c9b70d5SMax Reitz# @mountpoint: Path on which to export the block device via FUSE.
1470c9b70d5SMax Reitz#              This must point to an existing regular file.
1480c9b70d5SMax Reitz#
1494fba06d5SMax Reitz# @growable: Whether writes beyond the EOF should grow the block node
1504fba06d5SMax Reitz#            accordingly. (default: false)
1514fba06d5SMax Reitz#
1528fc54f94SMax Reitz# @allow-other: If this is off, only qemu's user is allowed access to
1538fc54f94SMax Reitz#               this export.  That cannot be changed even with chmod or
1548fc54f94SMax Reitz#               chown.
1558fc54f94SMax Reitz#               Enabling this option will allow other users access to
1568fc54f94SMax Reitz#               the export with the FUSE mount option "allow_other".
1578fc54f94SMax Reitz#               Note that using allow_other as a non-root user requires
1588fc54f94SMax Reitz#               user_allow_other to be enabled in the global fuse.conf
1598fc54f94SMax Reitz#               configuration file.
1608fc54f94SMax Reitz#               In auto mode (the default), the FUSE export driver will
1618fc54f94SMax Reitz#               first attempt to mount the export with allow_other, and
1628fc54f94SMax Reitz#               if that fails, try again without.
1638fc54f94SMax Reitz#               (since 6.1; default: auto)
1648fc54f94SMax Reitz#
1650c9b70d5SMax Reitz# Since: 6.0
1660c9b70d5SMax Reitz##
1670c9b70d5SMax Reitz{ 'struct': 'BlockExportOptionsFuse',
1684fba06d5SMax Reitz  'data': { 'mountpoint': 'str',
1698fc54f94SMax Reitz            '*growable': 'bool',
1708fc54f94SMax Reitz            '*allow-other': 'FuseExportAllowOther' },
171*8a9f1e1dSMarc-André Lureau  'if': 'CONFIG_FUSE' }
1720c9b70d5SMax Reitz
1730c9b70d5SMax Reitz##
174b6076afcSKevin Wolf# @NbdServerAddOptions:
175b6076afcSKevin Wolf#
176cbad81ceSEric Blake# An NBD block export, per legacy nbd-server-add command.
177b6076afcSKevin Wolf#
178b6076afcSKevin Wolf# @device: The device name or node name of the node to be exported
179b6076afcSKevin Wolf#
18030dbc81dSKevin Wolf# @writable: Whether clients should be able to write to the device via the
18130dbc81dSKevin Wolf#            NBD connection (default false).
18230dbc81dSKevin Wolf#
183cbad81ceSEric Blake# @bitmap: Also export a single dirty bitmap reachable from @device, so the
184cbad81ceSEric Blake#          NBD client can use NBD_OPT_SET_META_CONTEXT with the metadata
185cbad81ceSEric Blake#          context name "qemu:dirty-bitmap:BITMAP" to inspect the bitmap
186cbad81ceSEric Blake#          (since 4.0).
187cbad81ceSEric Blake#
188b6076afcSKevin Wolf# Since: 5.0
189b6076afcSKevin Wolf##
190b6076afcSKevin Wolf{ 'struct': 'NbdServerAddOptions',
191cbad81ceSEric Blake  'base': 'BlockExportOptionsNbdBase',
19230dbc81dSKevin Wolf  'data': { 'device': 'str',
193cbad81ceSEric Blake            '*writable': 'bool', '*bitmap': 'str' } }
194b6076afcSKevin Wolf
195b6076afcSKevin Wolf##
1965daa6bfdSKevin Wolf# @nbd-server-add:
1975daa6bfdSKevin Wolf#
1985daa6bfdSKevin Wolf# Export a block node to QEMU's embedded NBD server.
1995daa6bfdSKevin Wolf#
200d53be9ceSKevin Wolf# The export name will be used as the id for the resulting block export.
201d53be9ceSKevin Wolf#
202443127e8SKevin Wolf# Features:
203443127e8SKevin Wolf# @deprecated: This command is deprecated. Use @block-export-add instead.
204443127e8SKevin Wolf#
2055daa6bfdSKevin Wolf# Returns: error if the server is not running, or export with the same name
2065daa6bfdSKevin Wolf#          already exists.
2075daa6bfdSKevin Wolf#
2089bc6e893SMarkus Armbruster# Since: 1.3
2095daa6bfdSKevin Wolf##
2105daa6bfdSKevin Wolf{ 'command': 'nbd-server-add',
211443127e8SKevin Wolf  'data': 'NbdServerAddOptions', 'boxed': true, 'features': ['deprecated'] }
2125daa6bfdSKevin Wolf
2135daa6bfdSKevin Wolf##
2143c3bc462SKevin Wolf# @BlockExportRemoveMode:
2155daa6bfdSKevin Wolf#
2163c3bc462SKevin Wolf# Mode for removing a block export.
2175daa6bfdSKevin Wolf#
2185daa6bfdSKevin Wolf# @safe: Remove export if there are no existing connections, fail otherwise.
2195daa6bfdSKevin Wolf#
2205daa6bfdSKevin Wolf# @hard: Drop all connections immediately and remove export.
2215daa6bfdSKevin Wolf#
2225daa6bfdSKevin Wolf# Potential additional modes to be added in the future:
2235daa6bfdSKevin Wolf#
2245daa6bfdSKevin Wolf# hide: Just hide export from new clients, leave existing connections as is.
2255daa6bfdSKevin Wolf# Remove export after all clients are disconnected.
2265daa6bfdSKevin Wolf#
2275daa6bfdSKevin Wolf# soft: Hide export from new clients, answer with ESHUTDOWN for all further
2285daa6bfdSKevin Wolf# requests from existing clients.
2295daa6bfdSKevin Wolf#
2305daa6bfdSKevin Wolf# Since: 2.12
2315daa6bfdSKevin Wolf##
2323c3bc462SKevin Wolf{'enum': 'BlockExportRemoveMode', 'data': ['safe', 'hard']}
2335daa6bfdSKevin Wolf
2345daa6bfdSKevin Wolf##
2355daa6bfdSKevin Wolf# @nbd-server-remove:
2365daa6bfdSKevin Wolf#
2375daa6bfdSKevin Wolf# Remove NBD export by name.
2385daa6bfdSKevin Wolf#
2393c3bc462SKevin Wolf# @name: Block export id.
2405daa6bfdSKevin Wolf#
2413c3bc462SKevin Wolf# @mode: Mode of command operation. See @BlockExportRemoveMode description.
2425daa6bfdSKevin Wolf#        Default is 'safe'.
2435daa6bfdSKevin Wolf#
244443127e8SKevin Wolf# Features:
245443127e8SKevin Wolf# @deprecated: This command is deprecated. Use @block-export-del instead.
246443127e8SKevin Wolf#
2475daa6bfdSKevin Wolf# Returns: error if
2485daa6bfdSKevin Wolf#            - the server is not running
2495daa6bfdSKevin Wolf#            - export is not found
2505daa6bfdSKevin Wolf#            - mode is 'safe' and there are existing connections
2515daa6bfdSKevin Wolf#
2525daa6bfdSKevin Wolf# Since: 2.12
2535daa6bfdSKevin Wolf##
2545daa6bfdSKevin Wolf{ 'command': 'nbd-server-remove',
255443127e8SKevin Wolf  'data': {'name': 'str', '*mode': 'BlockExportRemoveMode'},
256443127e8SKevin Wolf  'features': ['deprecated'] }
2575daa6bfdSKevin Wolf
2585daa6bfdSKevin Wolf##
2595daa6bfdSKevin Wolf# @nbd-server-stop:
2605daa6bfdSKevin Wolf#
2615daa6bfdSKevin Wolf# Stop QEMU's embedded NBD server, and unregister all devices previously
2625daa6bfdSKevin Wolf# added via @nbd-server-add.
2635daa6bfdSKevin Wolf#
2649bc6e893SMarkus Armbruster# Since: 1.3
2655daa6bfdSKevin Wolf##
2665daa6bfdSKevin Wolf{ 'command': 'nbd-server-stop' }
2675daa6bfdSKevin Wolf
2685daa6bfdSKevin Wolf##
2695daa6bfdSKevin Wolf# @BlockExportType:
2705daa6bfdSKevin Wolf#
2715daa6bfdSKevin Wolf# An enumeration of block export types
2725daa6bfdSKevin Wolf#
2735daa6bfdSKevin Wolf# @nbd: NBD export
27490fc91d5SStefan Hajnoczi# @vhost-user-blk: vhost-user-blk export (since 5.2)
2750c9b70d5SMax Reitz# @fuse: FUSE export (since: 6.0)
2765daa6bfdSKevin Wolf#
2775daa6bfdSKevin Wolf# Since: 4.2
2785daa6bfdSKevin Wolf##
2795daa6bfdSKevin Wolf{ 'enum': 'BlockExportType',
2800c9b70d5SMax Reitz  'data': [ 'nbd', 'vhost-user-blk',
281*8a9f1e1dSMarc-André Lureau            { 'name': 'fuse', 'if': 'CONFIG_FUSE' } ] }
2825daa6bfdSKevin Wolf
2835daa6bfdSKevin Wolf##
284143ea767SKevin Wolf# @BlockExportOptions:
2855daa6bfdSKevin Wolf#
2865daa6bfdSKevin Wolf# Describes a block export, i.e. how single node should be exported on an
2875daa6bfdSKevin Wolf# external interface.
2885daa6bfdSKevin Wolf#
289d53be9ceSKevin Wolf# @id: A unique identifier for the block export (across all export types)
290d53be9ceSKevin Wolf#
291b6076afcSKevin Wolf# @node-name: The node name of the block node to be exported (since: 5.2)
292b6076afcSKevin Wolf#
29330dbc81dSKevin Wolf# @writable: True if clients should be able to write to the export
29430dbc81dSKevin Wolf#            (default false)
29530dbc81dSKevin Wolf#
296fefee85dSKevin Wolf# @writethrough: If true, caches are flushed after every write request to the
297fefee85dSKevin Wolf#                export before completion is signalled. (since: 5.2;
298fefee85dSKevin Wolf#                default: false)
299fefee85dSKevin Wolf#
300f51d23c8SStefan Hajnoczi# @iothread: The name of the iothread object where the export will run. The
301f51d23c8SStefan Hajnoczi#            default is to use the thread currently associated with the
302f51d23c8SStefan Hajnoczi#            block node. (since: 5.2)
303f51d23c8SStefan Hajnoczi#
304f51d23c8SStefan Hajnoczi# @fixed-iothread: True prevents the block node from being moved to another
305f51d23c8SStefan Hajnoczi#                  thread while the export is active. If true and @iothread is
306f51d23c8SStefan Hajnoczi#                  given, export creation fails if the block node cannot be
307f51d23c8SStefan Hajnoczi#                  moved to the iothread. The default is false. (since: 5.2)
308f51d23c8SStefan Hajnoczi#
3095daa6bfdSKevin Wolf# Since: 4.2
3105daa6bfdSKevin Wolf##
311143ea767SKevin Wolf{ 'union': 'BlockExportOptions',
312fefee85dSKevin Wolf  'base': { 'type': 'BlockExportType',
313d53be9ceSKevin Wolf            'id': 'str',
314f51d23c8SStefan Hajnoczi            '*fixed-iothread': 'bool',
315f51d23c8SStefan Hajnoczi            '*iothread': 'str',
316b6076afcSKevin Wolf            'node-name': 'str',
31730dbc81dSKevin Wolf            '*writable': 'bool',
318fefee85dSKevin Wolf            '*writethrough': 'bool' },
3195daa6bfdSKevin Wolf  'discriminator': 'type',
3205daa6bfdSKevin Wolf  'data': {
32190fc91d5SStefan Hajnoczi      'nbd': 'BlockExportOptionsNbd',
3220c9b70d5SMax Reitz      'vhost-user-blk': 'BlockExportOptionsVhostUserBlk',
3230c9b70d5SMax Reitz      'fuse': { 'type': 'BlockExportOptionsFuse',
324*8a9f1e1dSMarc-André Lureau                'if': 'CONFIG_FUSE' }
3255daa6bfdSKevin Wolf   } }
32656ee8626SKevin Wolf
32756ee8626SKevin Wolf##
32856ee8626SKevin Wolf# @block-export-add:
32956ee8626SKevin Wolf#
33056ee8626SKevin Wolf# Creates a new block export.
33156ee8626SKevin Wolf#
33256ee8626SKevin Wolf# Since: 5.2
33356ee8626SKevin Wolf##
33456ee8626SKevin Wolf{ 'command': 'block-export-add',
33556ee8626SKevin Wolf  'data': 'BlockExportOptions', 'boxed': true }
3363c3bc462SKevin Wolf
3373c3bc462SKevin Wolf##
3383c3bc462SKevin Wolf# @block-export-del:
3393c3bc462SKevin Wolf#
3403c3bc462SKevin Wolf# Request to remove a block export. This drops the user's reference to the
3413c3bc462SKevin Wolf# export, but the export may still stay around after this command returns until
3423c3bc462SKevin Wolf# the shutdown of the export has completed.
3433c3bc462SKevin Wolf#
3443c3bc462SKevin Wolf# @id: Block export id.
3453c3bc462SKevin Wolf#
3463c3bc462SKevin Wolf# @mode: Mode of command operation. See @BlockExportRemoveMode description.
3473c3bc462SKevin Wolf#        Default is 'safe'.
3483c3bc462SKevin Wolf#
3493c3bc462SKevin Wolf# Returns: Error if the export is not found or @mode is 'safe' and the export
3503c3bc462SKevin Wolf#          is still in use (e.g. by existing client connections)
3513c3bc462SKevin Wolf#
3523c3bc462SKevin Wolf# Since: 5.2
3533c3bc462SKevin Wolf##
3543c3bc462SKevin Wolf{ 'command': 'block-export-del',
3553c3bc462SKevin Wolf  'data': { 'id': 'str', '*mode': 'BlockExportRemoveMode' } }
3561a9f7a80SKevin Wolf
3571a9f7a80SKevin Wolf##
3581a9f7a80SKevin Wolf# @BLOCK_EXPORT_DELETED:
3591a9f7a80SKevin Wolf#
3601a9f7a80SKevin Wolf# Emitted when a block export is removed and its id can be reused.
3611a9f7a80SKevin Wolf#
3621a9f7a80SKevin Wolf# @id: Block export id.
3631a9f7a80SKevin Wolf#
3641a9f7a80SKevin Wolf# Since: 5.2
3651a9f7a80SKevin Wolf##
3661a9f7a80SKevin Wolf{ 'event': 'BLOCK_EXPORT_DELETED',
3671a9f7a80SKevin Wolf  'data': { 'id': 'str' } }
3688cade320SKevin Wolf
3698cade320SKevin Wolf##
3708cade320SKevin Wolf# @BlockExportInfo:
3718cade320SKevin Wolf#
3728cade320SKevin Wolf# Information about a single block export.
3738cade320SKevin Wolf#
3748cade320SKevin Wolf# @id: The unique identifier for the block export
3758cade320SKevin Wolf#
3768cade320SKevin Wolf# @type: The block export type
3778cade320SKevin Wolf#
3788cade320SKevin Wolf# @node-name: The node name of the block node that is exported
3798cade320SKevin Wolf#
3808cade320SKevin Wolf# @shutting-down: True if the export is shutting down (e.g. after a
3818cade320SKevin Wolf#                 block-export-del command, but before the shutdown has
3828cade320SKevin Wolf#                 completed)
3838cade320SKevin Wolf#
3848cade320SKevin Wolf# Since:  5.2
3858cade320SKevin Wolf##
3868cade320SKevin Wolf{ 'struct': 'BlockExportInfo',
3878cade320SKevin Wolf  'data': { 'id': 'str',
3888cade320SKevin Wolf            'type': 'BlockExportType',
3898cade320SKevin Wolf            'node-name': 'str',
3908cade320SKevin Wolf            'shutting-down': 'bool' } }
3918cade320SKevin Wolf
3928cade320SKevin Wolf##
3938cade320SKevin Wolf# @query-block-exports:
3948cade320SKevin Wolf#
3958cade320SKevin Wolf# Returns: A list of BlockExportInfo describing all block exports
3968cade320SKevin Wolf#
3978cade320SKevin Wolf# Since: 5.2
3988cade320SKevin Wolf##
3998cade320SKevin Wolf{ 'command': 'query-block-exports', 'returns': ['BlockExportInfo'] }
400