QAPI patches patches for 2024-02-26

-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmXcXWUSHGFybWJydUBy
 ZWRoYXQuY29tAAoJEDhwtADrkYZTMqQP/3aZ8Jm48Bh4sG5JxJ01aM3iX//cuA8X
 0xoKBfDWkwKvUDE+sv+2qH1WxcNGS4wb/lLaT6Jf0S8EzzelDx5zYGwXXsmBljoZ
 Kh8BI7Oe1SQwI5Z36q/efG9isQ6nqGyxR9xu1BTbJCSOZXzxpOBljbSyXOtKc5C/
 HM4TK82geLLgm04gMkoPmFdu3BXDfPYnGJ3UNLE9hTPoW7XL4EGFAOOWuDcrSF5n
 OdHjfK9TK9PcxsJGqVUqLHwfRQYLMBni6OkurdFOVdLM1v4C707NuryjaGQc1WEI
 xKwsJDKR+zG7vGu4y594HN/Ivoaqci8MMTbDgVmHZ3LaI3RUfSplGTDSYLjCp8jz
 XDx82+hhmb/2ZMmE0tarUQyv0dimrZSEh6cWWHMvp63edKTywoB/eIDR9lBteTZe
 wRvkSKmN6oKJI8cNiiXZqw5y2JPvhNag4Xdr8kHKwHgxVWP+SneInLCC+T2SMgio
 EeC+S4CVTdjPvEC96dOGrsqKn+gl/h74PK5ZdTaD1B6XCuIalsRn6REujqW6Ew6n
 rj7Iec/noejeOsflzBWRKT91t2Zck/MRLhX9nYqybBxyxUFvFS7M6ok/iq4oEtZR
 lJooF6iiq8xtEzoLselfGFAZTUxhwLdUfXPVDx7p5HDpJci88xv6zmav9eE84JbH
 mBD55GEH17ka
 =81Zq
 -----END PGP SIGNATURE-----

Merge tag 'pull-qapi-2024-02-26' of https://repo.or.cz/qemu/armbru into staging

QAPI patches patches for 2024-02-26

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmXcXWUSHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTMqQP/3aZ8Jm48Bh4sG5JxJ01aM3iX//cuA8X
# 0xoKBfDWkwKvUDE+sv+2qH1WxcNGS4wb/lLaT6Jf0S8EzzelDx5zYGwXXsmBljoZ
# Kh8BI7Oe1SQwI5Z36q/efG9isQ6nqGyxR9xu1BTbJCSOZXzxpOBljbSyXOtKc5C/
# HM4TK82geLLgm04gMkoPmFdu3BXDfPYnGJ3UNLE9hTPoW7XL4EGFAOOWuDcrSF5n
# OdHjfK9TK9PcxsJGqVUqLHwfRQYLMBni6OkurdFOVdLM1v4C707NuryjaGQc1WEI
# xKwsJDKR+zG7vGu4y594HN/Ivoaqci8MMTbDgVmHZ3LaI3RUfSplGTDSYLjCp8jz
# XDx82+hhmb/2ZMmE0tarUQyv0dimrZSEh6cWWHMvp63edKTywoB/eIDR9lBteTZe
# wRvkSKmN6oKJI8cNiiXZqw5y2JPvhNag4Xdr8kHKwHgxVWP+SneInLCC+T2SMgio
# EeC+S4CVTdjPvEC96dOGrsqKn+gl/h74PK5ZdTaD1B6XCuIalsRn6REujqW6Ew6n
# rj7Iec/noejeOsflzBWRKT91t2Zck/MRLhX9nYqybBxyxUFvFS7M6ok/iq4oEtZR
# lJooF6iiq8xtEzoLselfGFAZTUxhwLdUfXPVDx7p5HDpJci88xv6zmav9eE84JbH
# mBD55GEH17ka
# =81Zq
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 26 Feb 2024 09:44:05 GMT
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* tag 'pull-qapi-2024-02-26' of https://repo.or.cz/qemu/armbru:
  qapi: Divorce QAPIDoc from QAPIParseError
  qapi: Reject multiple and empty feature descriptions
  qapi: Rewrite doc comment parser
  qapi: Merge adjacent untagged sections
  qapi: Call QAPIDoc.check() always
  qapi: Recognize section tags and 'Features:' only after blank line
  qapi: Require descriptions and tagged sections to be indented
  qapi: Reject section heading in the middle of a doc comment
  qapi: Rename QAPIDoc.Section.name to .tag
  qapi: Improve error message for empty doc sections
  qapi: Improve error position for bogus invalid "Returns" section
  qapi: Improve error position for bogus argument descriptions
  sphinx/qapidoc: Drop code to generate doc for simple union branch
  tests/qapi-schema: Cover 'Features:' not followed by descriptions
  tests/qapi-schema: Cover duplicate 'Features:' line
  tests/qapi-schema: Fix test 'QAPI rST doc'
  qapi: Misc cleanups to migrate QAPIs

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2024-02-26 11:22:32 +00:00
commit 03d496a992
58 changed files with 2624 additions and 2630 deletions

View File

@ -973,7 +973,7 @@ commands and events), member (for structs and unions), branch (for
alternates), or value (for enums), a description of each feature (if alternates), or value (for enums), a description of each feature (if
any), and finally optional tagged sections. any), and finally optional tagged sections.
Descriptions start with '\@name:'. The description text should be Descriptions start with '\@name:'. The description text must be
indented like this:: indented like this::
# @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
@ -986,19 +986,20 @@ indented like this::
Extensions added after the definition was first released carry a Extensions added after the definition was first released carry a
"(since x.y.z)" comment. "(since x.y.z)" comment.
The feature descriptions must be preceded by a line "Features:", like The feature descriptions must be preceded by a blank line and then a
this:: line "Features:", like this::
#
# Features: # Features:
# #
# @feature: Description text # @feature: Description text
A tagged section starts with one of the following words: A tagged section begins with a paragraph that starts with one of the
"Note:"/"Notes:", "Since:", "Example:"/"Examples:", "Returns:", following words: "Note:"/"Notes:", "Since:", "Example:"/"Examples:",
"TODO:". The section ends with the start of a new section. "Returns:", "TODO:". It ends with the start of a new section.
The second and subsequent lines of sections other than The second and subsequent lines of tagged sections must be indented
"Example"/"Examples" should be indented like this:: like this::
# Note: Ut enim ad minim veniam, quis nostrud exercitation ullamco # Note: Ut enim ad minim veniam, quis nostrud exercitation ullamco
# laboris nisi ut aliquip ex ea commodo consequat. # laboris nisi ut aliquip ex ea commodo consequat.
@ -1049,11 +1050,10 @@ For example::
# #
# Example: # Example:
# #
# -> { "execute": "query-blockstats" } # -> { "execute": "query-blockstats" }
# <- { # <- {
# ... lots of output ... # ... lots of output ...
# } # }
#
## ##
{ 'command': 'query-blockstats', { 'command': 'query-blockstats',
'data': { '*query-nodes': 'bool' }, 'data': { '*query-nodes': 'bool' },
@ -1087,8 +1087,10 @@ need to line up with each other, like this::
# or cache associativity unknown) # or cache associativity unknown)
# (since 5.0) # (since 5.0)
Section tags are case-sensitive and end with a colon. Good example:: Section tags are case-sensitive and end with a colon. They are only
recognized after a blank line. Good example::
#
# Since: 7.1 # Since: 7.1
Bad examples (all ordinary paragraphs):: Bad examples (all ordinary paragraphs)::

View File

@ -180,17 +180,13 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
if variants: if variants:
for v in variants.variants: for v in variants.variants:
if v.type.is_implicit(): if v.type.name == 'q_empty':
assert not v.type.base and not v.type.variants continue
for m in v.type.local_members: assert not v.type.is_implicit()
term = self._nodes_for_one_member(m) term = [nodes.Text('The members of '),
term.extend(self._nodes_for_variant_when(variants, v)) nodes.literal('', v.type.doc_type())]
dlnode += self._make_dlitem(term, None) term.extend(self._nodes_for_variant_when(variants, v))
else: dlnode += self._make_dlitem(term, None)
term = [nodes.Text('The members of '),
nodes.literal('', v.type.doc_type())]
term.extend(self._nodes_for_variant_when(variants, v))
dlnode += self._make_dlitem(term, None)
if not dlnode.children: if not dlnode.children:
return [] return []
@ -243,8 +239,8 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
seen_item = False seen_item = False
dlnode = nodes.definition_list() dlnode = nodes.definition_list()
for section in doc.features.values(): for section in doc.features.values():
dlnode += self._make_dlitem([nodes.literal('', section.name)], dlnode += self._make_dlitem(
section.text) [nodes.literal('', section.member.name)], section.text)
seen_item = True seen_item = True
if not seen_item: if not seen_item:
@ -262,11 +258,11 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
"""Return list of doctree nodes for additional sections""" """Return list of doctree nodes for additional sections"""
nodelist = [] nodelist = []
for section in doc.sections: for section in doc.sections:
if section.name and section.name == 'TODO': if section.tag and section.tag == 'TODO':
# Hide TODO: sections # Hide TODO: sections
continue continue
snode = self._make_section(section.name) snode = self._make_section(section.tag)
if section.name and section.name.startswith('Example'): if section.tag and section.tag.startswith('Example'):
snode += self._nodes_for_example(section.text) snode += self._nodes_for_example(section.text)
else: else:
self._parse_text_into_node(section.text, snode) self._parse_text_into_node(section.text, snode)

View File

@ -113,12 +113,12 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-acpi-ospm-status" } # -> { "execute": "query-acpi-ospm-status" }
# <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0}, # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
# { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0}, # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
# { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0}, # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
# { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0} # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
# ]} # ]}
## ##
{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] } { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
@ -133,10 +133,10 @@
# #
# Example: # Example:
# #
# <- { "event": "ACPI_DEVICE_OST", # <- { "event": "ACPI_DEVICE_OST",
# "data": { "info": { "device": "d1", "slot": "0", # "data": { "info": { "device": "d1", "slot": "0",
# "slot-type": "DIMM", "source": 1, "status": 0 } }, # "slot-type": "DIMM", "source": 1, "status": 0 } },
# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
## ##
{ 'event': 'ACPI_DEVICE_OST', { 'event': 'ACPI_DEVICE_OST',
'data': { 'info': 'ACPIOSTInfo' } } 'data': { 'info': 'ACPIOSTInfo' } }

File diff suppressed because it is too large Load Diff

View File

@ -120,8 +120,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "eject", "arguments": { "id": "ide1-0-1" } } # -> { "execute": "eject", "arguments": { "id": "ide1-0-1" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'eject', { 'command': 'eject',
'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] }, 'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] },
@ -164,17 +164,17 @@
# #
# Example: # Example:
# #
# -> { "execute": "blockdev-open-tray", # -> { "execute": "blockdev-open-tray",
# "arguments": { "id": "ide0-1-0" } } # "arguments": { "id": "ide0-1-0" } }
# #
# <- { "timestamp": { "seconds": 1418751016, # <- { "timestamp": { "seconds": 1418751016,
# "microseconds": 716996 }, # "microseconds": 716996 },
# "event": "DEVICE_TRAY_MOVED", # "event": "DEVICE_TRAY_MOVED",
# "data": { "device": "ide1-cd0", # "data": { "device": "ide1-cd0",
# "id": "ide0-1-0", # "id": "ide0-1-0",
# "tray-open": true } } # "tray-open": true } }
# #
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'blockdev-open-tray', { 'command': 'blockdev-open-tray',
'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] }, 'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] },
@ -202,17 +202,17 @@
# #
# Example: # Example:
# #
# -> { "execute": "blockdev-close-tray", # -> { "execute": "blockdev-close-tray",
# "arguments": { "id": "ide0-1-0" } } # "arguments": { "id": "ide0-1-0" } }
# #
# <- { "timestamp": { "seconds": 1418751345, # <- { "timestamp": { "seconds": 1418751345,
# "microseconds": 272147 }, # "microseconds": 272147 },
# "event": "DEVICE_TRAY_MOVED", # "event": "DEVICE_TRAY_MOVED",
# "data": { "device": "ide1-cd0", # "data": { "device": "ide1-cd0",
# "id": "ide0-1-0", # "id": "ide0-1-0",
# "tray-open": false } } # "tray-open": false } }
# #
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'blockdev-close-tray', { 'command': 'blockdev-close-tray',
'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] }, 'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] },
@ -234,28 +234,28 @@
# #
# Example: # Example:
# #
# -> { "execute": "blockdev-remove-medium", # -> { "execute": "blockdev-remove-medium",
# "arguments": { "id": "ide0-1-0" } } # "arguments": { "id": "ide0-1-0" } }
# #
# <- { "error": { "class": "GenericError", # <- { "error": { "class": "GenericError",
# "desc": "Tray of device 'ide0-1-0' is not open" } } # "desc": "Tray of device 'ide0-1-0' is not open" } }
# #
# -> { "execute": "blockdev-open-tray", # -> { "execute": "blockdev-open-tray",
# "arguments": { "id": "ide0-1-0" } } # "arguments": { "id": "ide0-1-0" } }
# #
# <- { "timestamp": { "seconds": 1418751627, # <- { "timestamp": { "seconds": 1418751627,
# "microseconds": 549958 }, # "microseconds": 549958 },
# "event": "DEVICE_TRAY_MOVED", # "event": "DEVICE_TRAY_MOVED",
# "data": { "device": "ide1-cd0", # "data": { "device": "ide1-cd0",
# "id": "ide0-1-0", # "id": "ide0-1-0",
# "tray-open": true } } # "tray-open": true } }
# #
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute": "blockdev-remove-medium", # -> { "execute": "blockdev-remove-medium",
# "arguments": { "id": "ide0-1-0" } } # "arguments": { "id": "ide0-1-0" } }
# #
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'blockdev-remove-medium', { 'command': 'blockdev-remove-medium',
'data': { 'id': 'str' } } 'data': { 'id': 'str' } }
@ -275,19 +275,19 @@
# #
# Example: # Example:
# #
# -> { "execute": "blockdev-add", # -> { "execute": "blockdev-add",
# "arguments": { # "arguments": {
# "node-name": "node0", # "node-name": "node0",
# "driver": "raw", # "driver": "raw",
# "file": { "driver": "file", # "file": { "driver": "file",
# "filename": "fedora.iso" } } } # "filename": "fedora.iso" } } }
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute": "blockdev-insert-medium", # -> { "execute": "blockdev-insert-medium",
# "arguments": { "id": "ide0-1-0", # "arguments": { "id": "ide0-1-0",
# "node-name": "node0" } } # "node-name": "node0" } }
# #
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'blockdev-insert-medium', { 'command': 'blockdev-insert-medium',
'data': { 'id': 'str', 'data': { 'id': 'str',
@ -345,33 +345,33 @@
# #
# Examples: # Examples:
# #
# 1. Change a removable medium # 1. Change a removable medium
# #
# -> { "execute": "blockdev-change-medium", # -> { "execute": "blockdev-change-medium",
# "arguments": { "id": "ide0-1-0", # "arguments": { "id": "ide0-1-0",
# "filename": "/srv/images/Fedora-12-x86_64-DVD.iso", # "filename": "/srv/images/Fedora-12-x86_64-DVD.iso",
# "format": "raw" } } # "format": "raw" } }
# <- { "return": {} } # <- { "return": {} }
# #
# 2. Load a read-only medium into a writable drive # 2. Load a read-only medium into a writable drive
# #
# -> { "execute": "blockdev-change-medium", # -> { "execute": "blockdev-change-medium",
# "arguments": { "id": "floppyA", # "arguments": { "id": "floppyA",
# "filename": "/srv/images/ro.img", # "filename": "/srv/images/ro.img",
# "format": "raw", # "format": "raw",
# "read-only-mode": "retain" } } # "read-only-mode": "retain" } }
# #
# <- { "error": # <- { "error":
# { "class": "GenericError", # { "class": "GenericError",
# "desc": "Could not open '/srv/images/ro.img': Permission denied" } } # "desc": "Could not open '/srv/images/ro.img': Permission denied" } }
# #
# -> { "execute": "blockdev-change-medium", # -> { "execute": "blockdev-change-medium",
# "arguments": { "id": "floppyA", # "arguments": { "id": "floppyA",
# "filename": "/srv/images/ro.img", # "filename": "/srv/images/ro.img",
# "format": "raw", # "format": "raw",
# "read-only-mode": "read-only" } } # "read-only-mode": "read-only" } }
# #
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'blockdev-change-medium', { 'command': 'blockdev-change-medium',
'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] }, 'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] },
@ -400,12 +400,12 @@
# #
# Example: # Example:
# #
# <- { "event": "DEVICE_TRAY_MOVED", # <- { "event": "DEVICE_TRAY_MOVED",
# "data": { "device": "ide1-cd0", # "data": { "device": "ide1-cd0",
# "id": "/machine/unattached/device[22]", # "id": "/machine/unattached/device[22]",
# "tray-open": true # "tray-open": true
# }, # },
# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
## ##
{ 'event': 'DEVICE_TRAY_MOVED', { 'event': 'DEVICE_TRAY_MOVED',
'data': { 'device': 'str', 'id': 'str', 'tray-open': 'bool' } } 'data': { 'device': 'str', 'id': 'str', 'tray-open': 'bool' } }
@ -424,11 +424,11 @@
# #
# Example: # Example:
# #
# <- { "event": "PR_MANAGER_STATUS_CHANGED", # <- { "event": "PR_MANAGER_STATUS_CHANGED",
# "data": { "id": "pr-helper0", # "data": { "id": "pr-helper0",
# "connected": true # "connected": true
# }, # },
# "timestamp": { "seconds": 1519840375, "microseconds": 450486 } } # "timestamp": { "seconds": 1519840375, "microseconds": 450486 } }
## ##
{ 'event': 'PR_MANAGER_STATUS_CHANGED', { 'event': 'PR_MANAGER_STATUS_CHANGED',
'data': { 'id': 'str', 'connected': 'bool' } } 'data': { 'id': 'str', 'connected': 'bool' } }
@ -467,41 +467,41 @@
# #
# Examples: # Examples:
# #
# -> { "execute": "block_set_io_throttle", # -> { "execute": "block_set_io_throttle",
# "arguments": { "id": "virtio-blk-pci0/virtio-backend", # "arguments": { "id": "virtio-blk-pci0/virtio-backend",
# "bps": 0, # "bps": 0,
# "bps_rd": 0, # "bps_rd": 0,
# "bps_wr": 0, # "bps_wr": 0,
# "iops": 512, # "iops": 512,
# "iops_rd": 0, # "iops_rd": 0,
# "iops_wr": 0, # "iops_wr": 0,
# "bps_max": 0, # "bps_max": 0,
# "bps_rd_max": 0, # "bps_rd_max": 0,
# "bps_wr_max": 0, # "bps_wr_max": 0,
# "iops_max": 0, # "iops_max": 0,
# "iops_rd_max": 0, # "iops_rd_max": 0,
# "iops_wr_max": 0, # "iops_wr_max": 0,
# "bps_max_length": 0, # "bps_max_length": 0,
# "iops_size": 0 } } # "iops_size": 0 } }
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute": "block_set_io_throttle", # -> { "execute": "block_set_io_throttle",
# "arguments": { "id": "ide0-1-0", # "arguments": { "id": "ide0-1-0",
# "bps": 1000000, # "bps": 1000000,
# "bps_rd": 0, # "bps_rd": 0,
# "bps_wr": 0, # "bps_wr": 0,
# "iops": 0, # "iops": 0,
# "iops_rd": 0, # "iops_rd": 0,
# "iops_wr": 0, # "iops_wr": 0,
# "bps_max": 8000000, # "bps_max": 8000000,
# "bps_rd_max": 0, # "bps_rd_max": 0,
# "bps_wr_max": 0, # "bps_wr_max": 0,
# "iops_max": 0, # "iops_max": 0,
# "iops_rd_max": 0, # "iops_rd_max": 0,
# "iops_wr_max": 0, # "iops_wr_max": 0,
# "bps_max_length": 60, # "bps_max_length": 60,
# "iops_size": 0 } } # "iops_size": 0 } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'block_set_io_throttle', 'boxed': true, { 'command': 'block_set_io_throttle', 'boxed': true,
'data': 'BlockIOThrottle', 'data': 'BlockIOThrottle',
@ -547,43 +547,43 @@
# #
# Example: # Example:
# #
# Set new histograms for all io types with intervals [0, 10), [10, # Set new histograms for all io types with intervals [0, 10), [10,
# 50), [50, 100), [100, +inf): # 50), [50, 100), [100, +inf):
# #
# -> { "execute": "block-latency-histogram-set", # -> { "execute": "block-latency-histogram-set",
# "arguments": { "id": "drive0", # "arguments": { "id": "drive0",
# "boundaries": [10, 50, 100] } } # "boundaries": [10, 50, 100] } }
# <- { "return": {} } # <- { "return": {} }
# #
# Example: # Example:
# #
# Set new histogram only for write, other histograms will remain not # Set new histogram only for write, other histograms will remain not
# changed (or not created): # changed (or not created):
# #
# -> { "execute": "block-latency-histogram-set", # -> { "execute": "block-latency-histogram-set",
# "arguments": { "id": "drive0", # "arguments": { "id": "drive0",
# "boundaries-write": [10, 50, 100] } } # "boundaries-write": [10, 50, 100] } }
# <- { "return": {} } # <- { "return": {} }
# #
# Example: # Example:
# #
# Set new histograms with the following intervals: read, flush: [0, # Set new histograms with the following intervals: read, flush: [0,
# 10), [10, 50), [50, 100), [100, +inf) write: [0, 1000), [1000, # 10), [10, 50), [50, 100), [100, +inf) write: [0, 1000), [1000,
# 5000), [5000, +inf) # 5000), [5000, +inf)
# #
# -> { "execute": "block-latency-histogram-set", # -> { "execute": "block-latency-histogram-set",
# "arguments": { "id": "drive0", # "arguments": { "id": "drive0",
# "boundaries": [10, 50, 100], # "boundaries": [10, 50, 100],
# "boundaries-write": [1000, 5000] } } # "boundaries-write": [1000, 5000] } }
# <- { "return": {} } # <- { "return": {} }
# #
# Example: # Example:
# #
# Remove all latency histograms: # Remove all latency histograms:
# #
# -> { "execute": "block-latency-histogram-set", # -> { "execute": "block-latency-histogram-set",
# "arguments": { "id": "drive0" } } # "arguments": { "id": "drive0" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'block-latency-histogram-set', { 'command': 'block-latency-histogram-set',
'data': {'id': 'str', 'data': {'id': 'str',

View File

@ -42,26 +42,26 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-chardev" } # -> { "execute": "query-chardev" }
# <- { # <- {
# "return": [ # "return": [
# { # {
# "label": "charchannel0", # "label": "charchannel0",
# "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server=on", # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server=on",
# "frontend-open": false # "frontend-open": false
# }, # },
# { # {
# "label": "charmonitor", # "label": "charmonitor",
# "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server=on", # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server=on",
# "frontend-open": true # "frontend-open": true
# }, # },
# { # {
# "label": "charserial0", # "label": "charserial0",
# "filename": "pty:/dev/pts/2", # "filename": "pty:/dev/pts/2",
# "frontend-open": true # "frontend-open": true
# } # }
# ] # ]
# } # }
## ##
{ 'command': 'query-chardev', 'returns': ['ChardevInfo'], { 'command': 'query-chardev', 'returns': ['ChardevInfo'],
'allow-preconfig': true } 'allow-preconfig': true }
@ -88,23 +88,23 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-chardev-backends" } # -> { "execute": "query-chardev-backends" }
# <- { # <- {
# "return":[ # "return":[
# { # {
# "name":"udp" # "name":"udp"
# }, # },
# { # {
# "name":"tcp" # "name":"tcp"
# }, # },
# { # {
# "name":"unix" # "name":"unix"
# }, # },
# { # {
# "name":"spiceport" # "name":"spiceport"
# } # }
# ] # ]
# } # }
## ##
{ 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] } { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
@ -145,11 +145,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "ringbuf-write", # -> { "execute": "ringbuf-write",
# "arguments": { "device": "foo", # "arguments": { "device": "foo",
# "data": "abcdefgh", # "data": "abcdefgh",
# "format": "utf8" } } # "format": "utf8" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'ringbuf-write', { 'command': 'ringbuf-write',
'data': { 'device': 'str', 'data': { 'device': 'str',
@ -181,11 +181,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "ringbuf-read", # -> { "execute": "ringbuf-read",
# "arguments": { "device": "foo", # "arguments": { "device": "foo",
# "size": 1000, # "size": 1000,
# "format": "utf8" } } # "format": "utf8" } }
# <- { "return": "abcdefgh" } # <- { "return": "abcdefgh" }
## ##
{ 'command': 'ringbuf-read', { 'command': 'ringbuf-read',
'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'}, 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
@ -703,21 +703,21 @@
# #
# Examples: # Examples:
# #
# -> { "execute" : "chardev-add", # -> { "execute" : "chardev-add",
# "arguments" : { "id" : "foo", # "arguments" : { "id" : "foo",
# "backend" : { "type" : "null", "data" : {} } } } # "backend" : { "type" : "null", "data" : {} } } }
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute" : "chardev-add", # -> { "execute" : "chardev-add",
# "arguments" : { "id" : "bar", # "arguments" : { "id" : "bar",
# "backend" : { "type" : "file", # "backend" : { "type" : "file",
# "data" : { "out" : "/tmp/bar.log" } } } } # "data" : { "out" : "/tmp/bar.log" } } } }
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute" : "chardev-add", # -> { "execute" : "chardev-add",
# "arguments" : { "id" : "baz", # "arguments" : { "id" : "baz",
# "backend" : { "type" : "pty", "data" : {} } } } # "backend" : { "type" : "pty", "data" : {} } } }
# <- { "return": { "pty" : "/dev/pty/42" } } # <- { "return": { "pty" : "/dev/pty/42" } }
## ##
{ 'command': 'chardev-add', { 'command': 'chardev-add',
'data': { 'id': 'str', 'data': { 'id': 'str',
@ -739,26 +739,26 @@
# #
# Examples: # Examples:
# #
# -> { "execute" : "chardev-change", # -> { "execute" : "chardev-change",
# "arguments" : { "id" : "baz", # "arguments" : { "id" : "baz",
# "backend" : { "type" : "pty", "data" : {} } } } # "backend" : { "type" : "pty", "data" : {} } } }
# <- { "return": { "pty" : "/dev/pty/42" } } # <- { "return": { "pty" : "/dev/pty/42" } }
# #
# -> {"execute" : "chardev-change", # -> {"execute" : "chardev-change",
# "arguments" : { # "arguments" : {
# "id" : "charchannel2", # "id" : "charchannel2",
# "backend" : { # "backend" : {
# "type" : "socket", # "type" : "socket",
# "data" : { # "data" : {
# "addr" : { # "addr" : {
# "type" : "unix" , # "type" : "unix" ,
# "data" : { # "data" : {
# "path" : "/tmp/charchannel2.socket" # "path" : "/tmp/charchannel2.socket"
# } # }
# }, # },
# "server" : true, # "server" : true,
# "wait" : false }}}} # "wait" : false }}}}
# <- {"return": {}} # <- {"return": {}}
## ##
{ 'command': 'chardev-change', { 'command': 'chardev-change',
'data': { 'id': 'str', 'data': { 'id': 'str',
@ -778,8 +778,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } } # -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'chardev-remove', { 'command': 'chardev-remove',
'data': { 'id': 'str' } } 'data': { 'id': 'str' } }
@ -797,8 +797,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "chardev-send-break", "arguments": { "id" : "foo" } } # -> { "execute": "chardev-send-break", "arguments": { "id" : "foo" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'chardev-send-break', { 'command': 'chardev-send-break',
'data': { 'id': 'str' } } 'data': { 'id': 'str' } }
@ -818,9 +818,9 @@
# #
# Example: # Example:
# #
# <- { "event": "VSERPORT_CHANGE", # <- { "event": "VSERPORT_CHANGE",
# "data": { "id": "channel0", "open": true }, # "data": { "id": "channel0", "open": true },
# "timestamp": { "seconds": 1401385907, "microseconds": 422329 } } # "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
## ##
{ 'event': 'VSERPORT_CHANGE', { 'event': 'VSERPORT_CHANGE',
'data': { 'id': 'str', 'data': { 'id': 'str',

View File

@ -20,9 +20,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "qmp_capabilities", # -> { "execute": "qmp_capabilities",
# "arguments": { "enable": [ "oob" ] } } # "arguments": { "enable": [ "oob" ] } }
# <- { "return": {} } # <- { "return": {} }
# #
# Notes: This command is valid exactly when first connecting: it must # Notes: This command is valid exactly when first connecting: it must
# be issued before any other command will be accepted, and will # be issued before any other command will be accepted, and will
@ -102,17 +102,17 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-version" } # -> { "execute": "query-version" }
# <- { # <- {
# "return":{ # "return":{
# "qemu":{ # "qemu":{
# "major":0, # "major":0,
# "minor":11, # "minor":11,
# "micro":5 # "micro":5
# }, # },
# "package":"" # "package":""
# } # }
# } # }
## ##
{ 'command': 'query-version', 'returns': 'VersionInfo', { 'command': 'query-version', 'returns': 'VersionInfo',
'allow-preconfig': true } 'allow-preconfig': true }
@ -139,17 +139,17 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-commands" } # -> { "execute": "query-commands" }
# <- { # <- {
# "return":[ # "return":[
# { # {
# "name":"query-balloon" # "name":"query-balloon"
# }, # },
# { # {
# "name":"system_powerdown" # "name":"system_powerdown"
# } # }
# ] # ]
# } # }
# #
# Note: This example has been shortened as the real response is too # Note: This example has been shortened as the real response is too
# long. # long.
@ -169,8 +169,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "quit" } # -> { "execute": "quit" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'quit', { 'command': 'quit',
'allow-preconfig': true } 'allow-preconfig': true }

View File

@ -98,9 +98,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "dump-guest-memory", # -> { "execute": "dump-guest-memory",
# "arguments": { "paging": false, "protocol": "fd:dump" } } # "arguments": { "paging": false, "protocol": "fd:dump" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'dump-guest-memory', { 'command': 'dump-guest-memory',
'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool', 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
@ -154,9 +154,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-dump" } # -> { "execute": "query-dump" }
# <- { "return": { "status": "active", "completed": 1024000, # <- { "return": { "status": "active", "completed": 1024000,
# "total": 2048000 } } # "total": 2048000 } }
## ##
{ 'command': 'query-dump', 'returns': 'DumpQueryResult' } { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
@ -175,10 +175,10 @@
# #
# Example: # Example:
# #
# <- { "event": "DUMP_COMPLETED", # <- { "event": "DUMP_COMPLETED",
# "data": { "result": { "total": 1090650112, "status": "completed", # "data": { "result": { "total": 1090650112, "status": "completed",
# "completed": 1090650112 } }, # "completed": 1090650112 } },
# "timestamp": { "seconds": 1648244171, "microseconds": 950316 } } # "timestamp": { "seconds": 1648244171, "microseconds": 950316 } }
## ##
{ 'event': 'DUMP_COMPLETED' , { 'event': 'DUMP_COMPLETED' ,
'data': { 'result': 'DumpQueryResult', '*error': 'str' } } 'data': { 'result': 'DumpQueryResult', '*error': 'str' } }
@ -206,9 +206,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-dump-guest-memory-capability" } # -> { "execute": "query-dump-guest-memory-capability" }
# <- { "return": { "formats": # <- { "return": { "formats":
# ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } } # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } }
## ##
{ 'command': 'query-dump-guest-memory-capability', { 'command': 'query-dump-guest-memory-capability',
'returns': 'DumpGuestMemoryCapability' } 'returns': 'DumpGuestMemoryCapability' }

View File

@ -447,9 +447,9 @@
# #
# Example: # Example:
# #
# <- { "event": "CPU_POLARIZATION_CHANGE", # <- { "event": "CPU_POLARIZATION_CHANGE",
# "data": { "polarization": "horizontal" }, # "data": { "polarization": "horizontal" },
# "timestamp": { "seconds": 1401385907, "microseconds": 422329 } } # "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
## ##
{ 'event': 'CPU_POLARIZATION_CHANGE', { 'event': 'CPU_POLARIZATION_CHANGE',
'data': { 'polarization': 'CpuS390Polarization' }, 'data': { 'polarization': 'CpuS390Polarization' },

View File

@ -106,32 +106,32 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-cpus-fast" } # -> { "execute": "query-cpus-fast" }
# <- { "return": [ # <- { "return": [
# { # {
# "thread-id": 25627, # "thread-id": 25627,
# "props": { # "props": {
# "core-id": 0, # "core-id": 0,
# "thread-id": 0, # "thread-id": 0,
# "socket-id": 0 # "socket-id": 0
# },
# "qom-path": "/machine/unattached/device[0]",
# "target":"x86_64",
# "cpu-index": 0
# }, # },
# "qom-path": "/machine/unattached/device[0]", # {
# "target":"x86_64", # "thread-id": 25628,
# "cpu-index": 0 # "props": {
# }, # "core-id": 0,
# { # "thread-id": 0,
# "thread-id": 25628, # "socket-id": 1
# "props": { # },
# "core-id": 0, # "qom-path": "/machine/unattached/device[2]",
# "thread-id": 0, # "target":"x86_64",
# "socket-id": 1 # "cpu-index": 1
# }, # }
# "qom-path": "/machine/unattached/device[2]", # ]
# "target":"x86_64", # }
# "cpu-index": 1
# }
# ]
# }
## ##
{ 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] } { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
@ -258,8 +258,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-uuid" } # -> { "execute": "query-uuid" }
# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } } # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
## ##
{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true } { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
@ -292,8 +292,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "system_reset" } # -> { "execute": "system_reset" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'system_reset' } { 'command': 'system_reset' }
@ -311,8 +311,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "system_powerdown" } # -> { "execute": "system_powerdown" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'system_powerdown' } { 'command': 'system_powerdown' }
@ -333,8 +333,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "system_wakeup" } # -> { "execute": "system_wakeup" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'system_wakeup' } { 'command': 'system_wakeup' }
@ -386,8 +386,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "inject-nmi" } # -> { "execute": "inject-nmi" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'inject-nmi' } { 'command': 'inject-nmi' }
@ -415,8 +415,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-kvm" } # -> { "execute": "query-kvm" }
# <- { "return": { "enabled": true, "present": true } } # <- { "return": { "enabled": true, "present": true } }
## ##
{ 'command': 'query-kvm', 'returns': 'KvmInfo' } { 'command': 'query-kvm', 'returns': 'KvmInfo' }
@ -786,11 +786,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "memsave", # -> { "execute": "memsave",
# "arguments": { "val": 10, # "arguments": { "val": 10,
# "size": 100, # "size": 100,
# "filename": "/tmp/virtual-mem-dump" } } # "filename": "/tmp/virtual-mem-dump" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'memsave', { 'command': 'memsave',
'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} } 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
@ -814,11 +814,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "pmemsave", # -> { "execute": "pmemsave",
# "arguments": { "val": 10, # "arguments": { "val": 10,
# "size": 100, # "size": 100,
# "filename": "/tmp/physical-mem-dump" } } # "filename": "/tmp/physical-mem-dump" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'pmemsave', { 'command': 'pmemsave',
'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
@ -875,29 +875,29 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-memdev" } # -> { "execute": "query-memdev" }
# <- { "return": [ # <- { "return": [
# { # {
# "id": "mem1", # "id": "mem1",
# "size": 536870912, # "size": 536870912,
# "merge": false, # "merge": false,
# "dump": true, # "dump": true,
# "prealloc": false, # "prealloc": false,
# "share": false, # "share": false,
# "host-nodes": [0, 1], # "host-nodes": [0, 1],
# "policy": "bind" # "policy": "bind"
# }, # },
# { # {
# "size": 536870912, # "size": 536870912,
# "merge": false, # "merge": false,
# "dump": true, # "dump": true,
# "prealloc": true, # "prealloc": true,
# "share": false, # "share": false,
# "host-nodes": [2, 3], # "host-nodes": [2, 3],
# "policy": "preferred" # "policy": "preferred"
# }
# ]
# } # }
# ]
# }
## ##
{ 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true } { 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
@ -990,47 +990,47 @@
# #
# Examples: # Examples:
# #
# For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu
# POWER8: # POWER8:
# #
# -> { "execute": "query-hotpluggable-cpus" } # -> { "execute": "query-hotpluggable-cpus" }
# <- {"return": [ # <- {"return": [
# { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core", # { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
# "vcpus-count": 1 }, # "vcpus-count": 1 },
# { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core", # { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
# "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"} # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
# ]}' # ]}'
# #
# For pc machine type started with -smp 1,maxcpus=2: # For pc machine type started with -smp 1,maxcpus=2:
# #
# -> { "execute": "query-hotpluggable-cpus" } # -> { "execute": "query-hotpluggable-cpus" }
# <- {"return": [ # <- {"return": [
# { # {
# "type": "qemu64-x86_64-cpu", "vcpus-count": 1, # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
# "props": {"core-id": 0, "socket-id": 1, "thread-id": 0} # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
# }, # },
# { # {
# "qom-path": "/machine/unattached/device[0]", # "qom-path": "/machine/unattached/device[0]",
# "type": "qemu64-x86_64-cpu", "vcpus-count": 1, # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
# "props": {"core-id": 0, "socket-id": 0, "thread-id": 0} # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
# } # }
# ]} # ]}
# #
# For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu # For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu
# qemu (Since: 2.11): # qemu (Since: 2.11):
# #
# -> { "execute": "query-hotpluggable-cpus" } # -> { "execute": "query-hotpluggable-cpus" }
# <- {"return": [ # <- {"return": [
# { # {
# "type": "qemu-s390x-cpu", "vcpus-count": 1, # "type": "qemu-s390x-cpu", "vcpus-count": 1,
# "props": { "core-id": 1 } # "props": { "core-id": 1 }
# }, # },
# { # {
# "qom-path": "/machine/unattached/device[0]", # "qom-path": "/machine/unattached/device[0]",
# "type": "qemu-s390x-cpu", "vcpus-count": 1, # "type": "qemu-s390x-cpu", "vcpus-count": 1,
# "props": { "core-id": 0 } # "props": { "core-id": 0 }
# } # }
# ]} # ]}
## ##
{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'], { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
'allow-preconfig': true } 'allow-preconfig': true }
@ -1074,10 +1074,10 @@
# #
# Example: # Example:
# #
# -> { "execute": "balloon", "arguments": { "value": 536870912 } } # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
# <- { "return": {} } # <- { "return": {} }
# #
# With a 2.5GiB guest this command inflated the ballon to 3GiB. # With a 2.5GiB guest this command inflated the ballon to 3GiB.
## ##
{ 'command': 'balloon', 'data': {'value': 'int'} } { 'command': 'balloon', 'data': {'value': 'int'} }
@ -1108,11 +1108,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-balloon" } # -> { "execute": "query-balloon" }
# <- { "return": { # <- { "return": {
# "actual": 1073741824 # "actual": 1073741824
# } # }
# } # }
## ##
{ 'command': 'query-balloon', 'returns': 'BalloonInfo' } { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
@ -1132,9 +1132,9 @@
# #
# Example: # Example:
# #
# <- { "event": "BALLOON_CHANGE", # <- { "event": "BALLOON_CHANGE",
# "data": { "actual": 944766976 }, # "data": { "actual": 944766976 },
# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
## ##
{ 'event': 'BALLOON_CHANGE', { 'event': 'BALLOON_CHANGE',
'data': { 'actual': 'int' } } 'data': { 'actual': 'int' } }
@ -1172,12 +1172,12 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-hv-balloon-status-report" } # -> { "execute": "query-hv-balloon-status-report" }
# <- { "return": { # <- { "return": {
# "committed": 816640000, # "committed": 816640000,
# "available": 3333054464 # "available": 3333054464
# } # }
# } # }
## ##
{ 'command': 'query-hv-balloon-status-report', 'returns': 'HvBalloonInfo' } { 'command': 'query-hv-balloon-status-report', 'returns': 'HvBalloonInfo' }
@ -1193,9 +1193,9 @@
# #
# Example: # Example:
# #
# <- { "event": "HV_BALLOON_STATUS_REPORT", # <- { "event": "HV_BALLOON_STATUS_REPORT",
# "data": { "committed": 816640000, "available": 3333054464 }, # "data": { "committed": 816640000, "available": 3333054464 },
# "timestamp": { "seconds": 1600295492, "microseconds": 661044 } } # "timestamp": { "seconds": 1600295492, "microseconds": 661044 } }
# #
## ##
{ 'event': 'HV_BALLOON_STATUS_REPORT', { 'event': 'HV_BALLOON_STATUS_REPORT',
@ -1226,8 +1226,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-memory-size-summary" } # -> { "execute": "query-memory-size-summary" }
# <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } } # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
# #
# Since: 2.11 # Since: 2.11
## ##
@ -1505,18 +1505,18 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-memory-devices" } # -> { "execute": "query-memory-devices" }
# <- { "return": [ { "data": # <- { "return": [ { "data":
# { "addr": 5368709120, # { "addr": 5368709120,
# "hotpluggable": true, # "hotpluggable": true,
# "hotplugged": true, # "hotplugged": true,
# "id": "d1", # "id": "d1",
# "memdev": "/objects/memX", # "memdev": "/objects/memX",
# "node": 0, # "node": 0,
# "size": 1073741824, # "size": 1073741824,
# "slot": 0}, # "slot": 0},
# "type": "dimm" # "type": "dimm"
# } ] } # } ] }
## ##
{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] } { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
@ -1539,10 +1539,10 @@
# #
# Example: # Example:
# #
# <- { "event": "MEMORY_DEVICE_SIZE_CHANGE", # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
# "data": { "id": "vm0", "size": 1073741824, # "data": { "id": "vm0", "size": 1073741824,
# "qom-path": "/machine/unattached/device[2]" }, # "qom-path": "/machine/unattached/device[2]" },
# "timestamp": { "seconds": 1588168529, "microseconds": 201316 } } # "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
## ##
{ 'event': 'MEMORY_DEVICE_SIZE_CHANGE', { 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} } 'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} }
@ -1565,11 +1565,11 @@
# #
# Example: # Example:
# #
# <- { "event": "MEM_UNPLUG_ERROR", # <- { "event": "MEM_UNPLUG_ERROR",
# "data": { "device": "dimm1", # "data": { "device": "dimm1",
# "msg": "acpi: device unplug for unsupported device" # "msg": "acpi: device unplug for unsupported device"
# }, # },
# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
## ##
{ 'event': 'MEM_UNPLUG_ERROR', { 'event': 'MEM_UNPLUG_ERROR',
'data': { 'device': 'str', 'msg': 'str' }, 'data': { 'device': 'str', 'msg': 'str' },
@ -1836,9 +1836,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "dumpdtb" } # -> { "execute": "dumpdtb" }
# "arguments": { "filename": "fdt.dtb" } } # "arguments": { "filename": "fdt.dtb" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'dumpdtb', { 'command': 'dumpdtb',
'data': { 'filename': 'str' }, 'data': { 'filename': 'str' },

View File

@ -312,112 +312,112 @@
# #
# Examples: # Examples:
# #
# 1. Before the first migration # 1. Before the first migration
# #
# -> { "execute": "query-migrate" } # -> { "execute": "query-migrate" }
# <- { "return": {} } # <- { "return": {} }
# #
# 2. Migration is done and has succeeded # 2. Migration is done and has succeeded
# #
# -> { "execute": "query-migrate" } # -> { "execute": "query-migrate" }
# <- { "return": { # <- { "return": {
# "status": "completed", # "status": "completed",
# "total-time":12345, # "total-time":12345,
# "setup-time":12345, # "setup-time":12345,
# "downtime":12345, # "downtime":12345,
# "ram":{ # "ram":{
# "transferred":123, # "transferred":123,
# "remaining":123, # "remaining":123,
# "total":246, # "total":246,
# "duplicate":123, # "duplicate":123,
# "normal":123, # "normal":123,
# "normal-bytes":123456, # "normal-bytes":123456,
# "dirty-sync-count":15 # "dirty-sync-count":15
# } # }
# }
# }
#
# 3. Migration is done and has failed
#
# -> { "execute": "query-migrate" }
# <- { "return": { "status": "failed" } }
#
# 4. Migration is being performed and is not a block migration:
#
# -> { "execute": "query-migrate" }
# <- {
# "return":{
# "status":"active",
# "total-time":12345,
# "setup-time":12345,
# "expected-downtime":12345,
# "ram":{
# "transferred":123,
# "remaining":123,
# "total":246,
# "duplicate":123,
# "normal":123,
# "normal-bytes":123456,
# "dirty-sync-count":15
# } # }
# } # }
# }
# #
# 5. Migration is being performed and is a block migration: # 3. Migration is done and has failed
# #
# -> { "execute": "query-migrate" } # -> { "execute": "query-migrate" }
# <- { # <- { "return": { "status": "failed" } }
# "return":{
# "status":"active",
# "total-time":12345,
# "setup-time":12345,
# "expected-downtime":12345,
# "ram":{
# "total":1057024,
# "remaining":1053304,
# "transferred":3720,
# "duplicate":123,
# "normal":123,
# "normal-bytes":123456,
# "dirty-sync-count":15
# },
# "disk":{
# "total":20971520,
# "remaining":20880384,
# "transferred":91136
# }
# }
# }
# #
# 6. Migration is being performed and XBZRLE is active: # 4. Migration is being performed and is not a block migration:
# #
# -> { "execute": "query-migrate" } # -> { "execute": "query-migrate" }
# <- { # <- {
# "return":{ # "return":{
# "status":"active", # "status":"active",
# "total-time":12345, # "total-time":12345,
# "setup-time":12345, # "setup-time":12345,
# "expected-downtime":12345, # "expected-downtime":12345,
# "ram":{ # "ram":{
# "total":1057024, # "transferred":123,
# "remaining":1053304, # "remaining":123,
# "transferred":3720, # "total":246,
# "duplicate":10, # "duplicate":123,
# "normal":3333, # "normal":123,
# "normal-bytes":3412992, # "normal-bytes":123456,
# "dirty-sync-count":15 # "dirty-sync-count":15
# }, # }
# "xbzrle-cache":{ # }
# "cache-size":67108864, # }
# "bytes":20971520, #
# "pages":2444343, # 5. Migration is being performed and is a block migration:
# "cache-miss":2244, #
# "cache-miss-rate":0.123, # -> { "execute": "query-migrate" }
# "encoding-rate":80.1, # <- {
# "overflow":34434 # "return":{
# } # "status":"active",
# } # "total-time":12345,
# } # "setup-time":12345,
# "expected-downtime":12345,
# "ram":{
# "total":1057024,
# "remaining":1053304,
# "transferred":3720,
# "duplicate":123,
# "normal":123,
# "normal-bytes":123456,
# "dirty-sync-count":15
# },
# "disk":{
# "total":20971520,
# "remaining":20880384,
# "transferred":91136
# }
# }
# }
#
# 6. Migration is being performed and XBZRLE is active:
#
# -> { "execute": "query-migrate" }
# <- {
# "return":{
# "status":"active",
# "total-time":12345,
# "setup-time":12345,
# "expected-downtime":12345,
# "ram":{
# "total":1057024,
# "remaining":1053304,
# "transferred":3720,
# "duplicate":10,
# "normal":3333,
# "normal-bytes":3412992,
# "dirty-sync-count":15
# },
# "xbzrle-cache":{
# "cache-size":67108864,
# "bytes":20971520,
# "pages":2444343,
# "cache-miss":2244,
# "cache-miss-rate":0.123,
# "encoding-rate":80.1,
# "overflow":34434
# }
# }
# }
## ##
{ 'command': 'query-migrate', 'returns': 'MigrationInfo' } { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
@ -582,9 +582,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "migrate-set-capabilities" , "arguments": # -> { "execute": "migrate-set-capabilities" , "arguments":
# { "capabilities": [ { "capability": "xbzrle", "state": true } ] } } # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'migrate-set-capabilities', { 'command': 'migrate-set-capabilities',
'data': { 'capabilities': ['MigrationCapabilityStatus'] } } 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
@ -600,17 +600,17 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-migrate-capabilities" } # -> { "execute": "query-migrate-capabilities" }
# <- { "return": [ # <- { "return": [
# {"state": false, "capability": "xbzrle"}, # {"state": false, "capability": "xbzrle"},
# {"state": false, "capability": "rdma-pin-all"}, # {"state": false, "capability": "rdma-pin-all"},
# {"state": false, "capability": "auto-converge"}, # {"state": false, "capability": "auto-converge"},
# {"state": false, "capability": "zero-blocks"}, # {"state": false, "capability": "zero-blocks"},
# {"state": false, "capability": "compress"}, # {"state": false, "capability": "compress"},
# {"state": true, "capability": "events"}, # {"state": true, "capability": "events"},
# {"state": false, "capability": "postcopy-ram"}, # {"state": false, "capability": "postcopy-ram"},
# {"state": false, "capability": "x-colo"} # {"state": false, "capability": "x-colo"}
# ]} # ]}
## ##
{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']} { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
@ -1130,9 +1130,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "migrate-set-parameters" , # -> { "execute": "migrate-set-parameters" ,
# "arguments": { "multifd-channels": 5 } } # "arguments": { "multifd-channels": 5 } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'migrate-set-parameters', 'boxed': true, { 'command': 'migrate-set-parameters', 'boxed': true,
'data': 'MigrateSetParameters' } 'data': 'MigrateSetParameters' }
@ -1357,15 +1357,15 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-migrate-parameters" } # -> { "execute": "query-migrate-parameters" }
# <- { "return": { # <- { "return": {
# "multifd-channels": 2, # "multifd-channels": 2,
# "cpu-throttle-increment": 10, # "cpu-throttle-increment": 10,
# "cpu-throttle-initial": 20, # "cpu-throttle-initial": 20,
# "max-bandwidth": 33554432, # "max-bandwidth": 33554432,
# "downtime-limit": 300 # "downtime-limit": 300
# } # }
# } # }
## ##
{ 'command': 'query-migrate-parameters', { 'command': 'query-migrate-parameters',
'returns': 'MigrationParameters' } 'returns': 'MigrationParameters' }
@ -1381,8 +1381,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "migrate-start-postcopy" } # -> { "execute": "migrate-start-postcopy" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'migrate-start-postcopy' } { 'command': 'migrate-start-postcopy' }
@ -1397,9 +1397,9 @@
# #
# Example: # Example:
# #
# <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001}, # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
# "event": "MIGRATION", # "event": "MIGRATION",
# "data": {"status": "completed"} } # "data": {"status": "completed"} }
## ##
{ 'event': 'MIGRATION', { 'event': 'MIGRATION',
'data': {'status': 'MigrationStatus'}} 'data': {'status': 'MigrationStatus'}}
@ -1416,8 +1416,8 @@
# #
# Example: # Example:
# #
# <- { "timestamp": {"seconds": 1449669631, "microseconds": 239225}, # <- { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
# "event": "MIGRATION_PASS", "data": {"pass": 2} } # "event": "MIGRATION_PASS", "data": {"pass": 2} }
## ##
{ 'event': 'MIGRATION_PASS', { 'event': 'MIGRATION_PASS',
'data': { 'pass': 'int' } } 'data': { 'pass': 'int' } }
@ -1500,8 +1500,8 @@
# #
# Example: # Example:
# #
# <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172}, # <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
# "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } } # "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
## ##
{ 'event': 'COLO_EXIT', { 'event': 'COLO_EXIT',
'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } } 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
@ -1543,8 +1543,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "x-colo-lost-heartbeat" } # -> { "execute": "x-colo-lost-heartbeat" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'x-colo-lost-heartbeat', { 'command': 'x-colo-lost-heartbeat',
'features': [ 'unstable' ], 'features': [ 'unstable' ],
@ -1564,8 +1564,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "migrate_cancel" } # -> { "execute": "migrate_cancel" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'migrate_cancel' } { 'command': 'migrate_cancel' }
@ -1582,9 +1582,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "migrate-continue" , "arguments": # -> { "execute": "migrate-continue" , "arguments":
# { "state": "pre-switchover" } } # { "state": "pre-switchover" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} } { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
@ -1726,40 +1726,41 @@
# #
# Example: # Example:
# #
# -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
# <- { "return": {} } # <- { "return": {} }
# -> { "execute": "migrate",
# "arguments": {
# "channels": [ { "channel-type": "main",
# "addr": { "transport": "socket",
# "type": "inet",
# "host": "10.12.34.9",
# "port": "1050" } } ] } }
# <- { "return": {} }
# #
# -> { "execute": "migrate", # -> { "execute": "migrate",
# "arguments": { # "arguments": {
# "channels": [ { "channel-type": "main", # "channels": [ { "channel-type": "main",
# "addr": { "transport": "exec", # "addr": { "transport": "socket",
# "args": [ "/bin/nc", "-p", "6000", # "type": "inet",
# "/some/sock" ] } } ] } } # "host": "10.12.34.9",
# <- { "return": {} } # "port": "1050" } } ] } }
# <- { "return": {} }
# #
# -> { "execute": "migrate", # -> { "execute": "migrate",
# "arguments": { # "arguments": {
# "channels": [ { "channel-type": "main", # "channels": [ { "channel-type": "main",
# "addr": { "transport": "rdma", # "addr": { "transport": "exec",
# "host": "10.12.34.9", # "args": [ "/bin/nc", "-p", "6000",
# "port": "1050" } } ] } } # "/some/sock" ] } } ] } }
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute": "migrate", # -> { "execute": "migrate",
# "arguments": { # "arguments": {
# "channels": [ { "channel-type": "main", # "channels": [ { "channel-type": "main",
# "addr": { "transport": "file", # "addr": { "transport": "rdma",
# "filename": "/tmp/migfile", # "host": "10.12.34.9",
# "offset": "0x1000" } } ] } } # "port": "1050" } } ] } }
# <- { "return": {} } # <- { "return": {} }
#
# -> { "execute": "migrate",
# "arguments": {
# "channels": [ { "channel-type": "main",
# "addr": { "transport": "file",
# "filename": "/tmp/migfile",
# "offset": "0x1000" } } ] } }
# <- { "return": {} }
# #
## ##
{ 'command': 'migrate', { 'command': 'migrate',
@ -1796,42 +1797,42 @@
# #
# 3. The uri format is the same as for -incoming # 3. The uri format is the same as for -incoming
# #
# 5. For now, number of migration streams is restricted to one, # 4. For now, number of migration streams is restricted to one,
# i.e number of items in 'channels' list is just 1. # i.e number of items in 'channels' list is just 1.
# #
# 4. The 'uri' and 'channels' arguments are mutually exclusive; # 5. The 'uri' and 'channels' arguments are mutually exclusive;
# exactly one of the two should be present. # exactly one of the two should be present.
# #
# Example: # Example:
# #
# -> { "execute": "migrate-incoming", # -> { "execute": "migrate-incoming",
# "arguments": { "uri": "tcp::4446" } } # "arguments": { "uri": "tcp:0:4446" } }
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute": "migrate", # -> { "execute": "migrate-incoming",
# "arguments": { # "arguments": {
# "channels": [ { "channel-type": "main", # "channels": [ { "channel-type": "main",
# "addr": { "transport": "socket", # "addr": { "transport": "socket",
# "type": "inet", # "type": "inet",
# "host": "10.12.34.9", # "host": "10.12.34.9",
# "port": "1050" } } ] } } # "port": "1050" } } ] } }
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute": "migrate", # -> { "execute": "migrate-incoming",
# "arguments": { # "arguments": {
# "channels": [ { "channel-type": "main", # "channels": [ { "channel-type": "main",
# "addr": { "transport": "exec", # "addr": { "transport": "exec",
# "args": [ "/bin/nc", "-p", "6000", # "args": [ "/bin/nc", "-p", "6000",
# "/some/sock" ] } } ] } } # "/some/sock" ] } } ] } }
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute": "migrate", # -> { "execute": "migrate-incoming",
# "arguments": { # "arguments": {
# "channels": [ { "channel-type": "main", # "channels": [ { "channel-type": "main",
# "addr": { "transport": "rdma", # "addr": { "transport": "rdma",
# "host": "10.12.34.9", # "host": "10.12.34.9",
# "port": "1050" } } ] } } # "port": "1050" } } ] } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'migrate-incoming', { 'command': 'migrate-incoming',
'data': {'*uri': 'str', 'data': {'*uri': 'str',
@ -1856,9 +1857,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "xen-save-devices-state", # -> { "execute": "xen-save-devices-state",
# "arguments": { "filename": "/tmp/save" } } # "arguments": { "filename": "/tmp/save" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'xen-save-devices-state', { 'command': 'xen-save-devices-state',
'data': {'filename': 'str', '*live':'bool' } } 'data': {'filename': 'str', '*live':'bool' } }
@ -1876,9 +1877,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "xen-set-global-dirty-log", # -> { "execute": "xen-set-global-dirty-log",
# "arguments": { "enable": true } } # "arguments": { "enable": true } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } } { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
@ -1896,9 +1897,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "xen-load-devices-state", # -> { "execute": "xen-load-devices-state",
# "arguments": { "filename": "/tmp/resume" } } # "arguments": { "filename": "/tmp/resume" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
@ -1918,9 +1919,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "xen-set-replication", # -> { "execute": "xen-set-replication",
# "arguments": {"enable": true, "primary": false} } # "arguments": {"enable": true, "primary": false} }
# <- { "return": {} } # <- { "return": {} }
# #
# Since: 2.9 # Since: 2.9
## ##
@ -1953,8 +1954,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-xen-replication-status" } # -> { "execute": "query-xen-replication-status" }
# <- { "return": { "error": false } } # <- { "return": { "error": false } }
# #
# Since: 2.9 # Since: 2.9
## ##
@ -1971,8 +1972,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "xen-colo-do-checkpoint" } # -> { "execute": "xen-colo-do-checkpoint" }
# <- { "return": {} } # <- { "return": {} }
# #
# Since: 2.9 # Since: 2.9
## ##
@ -2009,8 +2010,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-colo-status" } # -> { "execute": "query-colo-status" }
# <- { "return": { "mode": "primary", "last-mode": "none", "reason": "request" } } # <- { "return": { "mode": "primary", "last-mode": "none", "reason": "request" } }
# #
# Since: 3.1 # Since: 3.1
## ##
@ -2029,9 +2030,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "migrate-recover", # -> { "execute": "migrate-recover",
# "arguments": { "uri": "tcp:192.168.1.200:12345" } } # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
# <- { "return": {} } # <- { "return": {} }
# #
# Since: 3.0 # Since: 3.0
## ##
@ -2048,8 +2049,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "migrate-pause" } # -> { "execute": "migrate-pause" }
# <- { "return": {} } # <- { "return": {} }
# #
# Since: 3.0 # Since: 3.0
## ##
@ -2069,9 +2070,9 @@
# #
# Example: # Example:
# #
# <- { "event": "UNPLUG_PRIMARY", # <- { "event": "UNPLUG_PRIMARY",
# "data": { "device-id": "hostdev0" }, # "data": { "device-id": "hostdev0" },
# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
## ##
{ 'event': 'UNPLUG_PRIMARY', { 'event': 'UNPLUG_PRIMARY',
'data': { 'device-id': 'str' } } 'data': { 'device-id': 'str' } }
@ -2230,16 +2231,16 @@
# #
# Example: # Example:
# #
# -> {"execute": "calc-dirty-rate", "arguments": {"calc-time": 1, # -> {"execute": "calc-dirty-rate", "arguments": {"calc-time": 1,
# 'sample-pages': 512} } # 'sample-pages': 512} }
# <- { "return": {} } # <- { "return": {} }
# #
# Measure dirty rate using dirty bitmap for 500 milliseconds: # Measure dirty rate using dirty bitmap for 500 milliseconds:
# #
# -> {"execute": "calc-dirty-rate", "arguments": {"calc-time": 500, # -> {"execute": "calc-dirty-rate", "arguments": {"calc-time": 500,
# "calc-time-unit": "millisecond", "mode": "dirty-bitmap"} } # "calc-time-unit": "millisecond", "mode": "dirty-bitmap"} }
# #
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64', { 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64',
'*calc-time-unit': 'TimeUnit', '*calc-time-unit': 'TimeUnit',
@ -2258,17 +2259,17 @@
# #
# Examples: # Examples:
# #
# 1. Measurement is in progress: # 1. Measurement is in progress:
# #
# <- {"status": "measuring", "sample-pages": 512, # <- {"status": "measuring", "sample-pages": 512,
# "mode": "page-sampling", "start-time": 1693900454, "calc-time": 10, # "mode": "page-sampling", "start-time": 1693900454, "calc-time": 10,
# "calc-time-unit": "second"} # "calc-time-unit": "second"}
# #
# 2. Measurement has been completed: # 2. Measurement has been completed:
# #
# <- {"status": "measured", "sample-pages": 512, "dirty-rate": 108, # <- {"status": "measured", "sample-pages": 512, "dirty-rate": 108,
# "mode": "page-sampling", "start-time": 1693900454, "calc-time": 10, # "mode": "page-sampling", "start-time": 1693900454, "calc-time": 10,
# "calc-time-unit": "second"} # "calc-time-unit": "second"}
## ##
{ 'command': 'query-dirty-rate', 'data': {'*calc-time-unit': 'TimeUnit' }, { 'command': 'query-dirty-rate', 'data': {'*calc-time-unit': 'TimeUnit' },
'returns': 'DirtyRateInfo' } 'returns': 'DirtyRateInfo' }
@ -2309,10 +2310,10 @@
# #
# Example: # Example:
# #
# -> {"execute": "set-vcpu-dirty-limit"} # -> {"execute": "set-vcpu-dirty-limit"}
# "arguments": { "dirty-rate": 200, # "arguments": { "dirty-rate": 200,
# "cpu-index": 1 } } # "cpu-index": 1 } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'set-vcpu-dirty-limit', { 'command': 'set-vcpu-dirty-limit',
'data': { '*cpu-index': 'int', 'data': { '*cpu-index': 'int',
@ -2333,9 +2334,9 @@
# #
# Example: # Example:
# #
# -> {"execute": "cancel-vcpu-dirty-limit"}, # -> {"execute": "cancel-vcpu-dirty-limit"},
# "arguments": { "cpu-index": 1 } } # "arguments": { "cpu-index": 1 } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'cancel-vcpu-dirty-limit', { 'command': 'cancel-vcpu-dirty-limit',
'data': { '*cpu-index': 'int'} } 'data': { '*cpu-index': 'int'} }
@ -2350,10 +2351,10 @@
# #
# Example: # Example:
# #
# -> {"execute": "query-vcpu-dirty-limit"} # -> {"execute": "query-vcpu-dirty-limit"}
# <- {"return": [ # <- {"return": [
# { "limit-rate": 60, "current-rate": 3, "cpu-index": 0}, # { "limit-rate": 60, "current-rate": 3, "cpu-index": 0},
# { "limit-rate": 60, "current-rate": 3, "cpu-index": 1}]} # { "limit-rate": 60, "current-rate": 3, "cpu-index": 1}]}
## ##
{ 'command': 'query-vcpu-dirty-limit', { 'command': 'query-vcpu-dirty-limit',
'returns': [ 'DirtyLimitInfo' ] } 'returns': [ 'DirtyLimitInfo' ] }
@ -2418,40 +2419,40 @@
# #
# Example: # Example:
# #
# -> { "execute": "snapshot-save", # -> { "execute": "snapshot-save",
# "arguments": { # "arguments": {
# "job-id": "snapsave0", # "job-id": "snapsave0",
# "tag": "my-snap", # "tag": "my-snap",
# "vmstate": "disk0", # "vmstate": "disk0",
# "devices": ["disk0", "disk1"] # "devices": ["disk0", "disk1"]
# } # }
# } # }
# <- { "return": { } } # <- { "return": { } }
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1432121972, "microseconds": 744001}, # "timestamp": {"seconds": 1432121972, "microseconds": 744001},
# "data": {"status": "created", "id": "snapsave0"}} # "data": {"status": "created", "id": "snapsave0"}}
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1432122172, "microseconds": 744001}, # "timestamp": {"seconds": 1432122172, "microseconds": 744001},
# "data": {"status": "running", "id": "snapsave0"}} # "data": {"status": "running", "id": "snapsave0"}}
# <- {"event": "STOP", # <- {"event": "STOP",
# "timestamp": {"seconds": 1432122372, "microseconds": 744001} } # "timestamp": {"seconds": 1432122372, "microseconds": 744001} }
# <- {"event": "RESUME", # <- {"event": "RESUME",
# "timestamp": {"seconds": 1432122572, "microseconds": 744001} } # "timestamp": {"seconds": 1432122572, "microseconds": 744001} }
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1432122772, "microseconds": 744001}, # "timestamp": {"seconds": 1432122772, "microseconds": 744001},
# "data": {"status": "waiting", "id": "snapsave0"}} # "data": {"status": "waiting", "id": "snapsave0"}}
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1432122972, "microseconds": 744001}, # "timestamp": {"seconds": 1432122972, "microseconds": 744001},
# "data": {"status": "pending", "id": "snapsave0"}} # "data": {"status": "pending", "id": "snapsave0"}}
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1432123172, "microseconds": 744001}, # "timestamp": {"seconds": 1432123172, "microseconds": 744001},
# "data": {"status": "concluded", "id": "snapsave0"}} # "data": {"status": "concluded", "id": "snapsave0"}}
# -> {"execute": "query-jobs"} # -> {"execute": "query-jobs"}
# <- {"return": [{"current-progress": 1, # <- {"return": [{"current-progress": 1,
# "status": "concluded", # "status": "concluded",
# "total-progress": 1, # "total-progress": 1,
# "type": "snapshot-save", # "type": "snapshot-save",
# "id": "snapsave0"}]} # "id": "snapsave0"}]}
# #
# Since: 6.0 # Since: 6.0
## ##
@ -2490,40 +2491,40 @@
# #
# Example: # Example:
# #
# -> { "execute": "snapshot-load", # -> { "execute": "snapshot-load",
# "arguments": { # "arguments": {
# "job-id": "snapload0", # "job-id": "snapload0",
# "tag": "my-snap", # "tag": "my-snap",
# "vmstate": "disk0", # "vmstate": "disk0",
# "devices": ["disk0", "disk1"] # "devices": ["disk0", "disk1"]
# } # }
# } # }
# <- { "return": { } } # <- { "return": { } }
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1472124172, "microseconds": 744001}, # "timestamp": {"seconds": 1472124172, "microseconds": 744001},
# "data": {"status": "created", "id": "snapload0"}} # "data": {"status": "created", "id": "snapload0"}}
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1472125172, "microseconds": 744001}, # "timestamp": {"seconds": 1472125172, "microseconds": 744001},
# "data": {"status": "running", "id": "snapload0"}} # "data": {"status": "running", "id": "snapload0"}}
# <- {"event": "STOP", # <- {"event": "STOP",
# "timestamp": {"seconds": 1472125472, "microseconds": 744001} } # "timestamp": {"seconds": 1472125472, "microseconds": 744001} }
# <- {"event": "RESUME", # <- {"event": "RESUME",
# "timestamp": {"seconds": 1472125872, "microseconds": 744001} } # "timestamp": {"seconds": 1472125872, "microseconds": 744001} }
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1472126172, "microseconds": 744001}, # "timestamp": {"seconds": 1472126172, "microseconds": 744001},
# "data": {"status": "waiting", "id": "snapload0"}} # "data": {"status": "waiting", "id": "snapload0"}}
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1472127172, "microseconds": 744001}, # "timestamp": {"seconds": 1472127172, "microseconds": 744001},
# "data": {"status": "pending", "id": "snapload0"}} # "data": {"status": "pending", "id": "snapload0"}}
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1472128172, "microseconds": 744001}, # "timestamp": {"seconds": 1472128172, "microseconds": 744001},
# "data": {"status": "concluded", "id": "snapload0"}} # "data": {"status": "concluded", "id": "snapload0"}}
# -> {"execute": "query-jobs"} # -> {"execute": "query-jobs"}
# <- {"return": [{"current-progress": 1, # <- {"return": [{"current-progress": 1,
# "status": "concluded", # "status": "concluded",
# "total-progress": 1, # "total-progress": 1,
# "type": "snapshot-load", # "type": "snapshot-load",
# "id": "snapload0"}]} # "id": "snapload0"}]}
# #
# Since: 6.0 # Since: 6.0
## ##
@ -2553,35 +2554,35 @@
# #
# Example: # Example:
# #
# -> { "execute": "snapshot-delete", # -> { "execute": "snapshot-delete",
# "arguments": { # "arguments": {
# "job-id": "snapdelete0", # "job-id": "snapdelete0",
# "tag": "my-snap", # "tag": "my-snap",
# "devices": ["disk0", "disk1"] # "devices": ["disk0", "disk1"]
# } # }
# } # }
# <- { "return": { } } # <- { "return": { } }
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1442124172, "microseconds": 744001}, # "timestamp": {"seconds": 1442124172, "microseconds": 744001},
# "data": {"status": "created", "id": "snapdelete0"}} # "data": {"status": "created", "id": "snapdelete0"}}
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1442125172, "microseconds": 744001}, # "timestamp": {"seconds": 1442125172, "microseconds": 744001},
# "data": {"status": "running", "id": "snapdelete0"}} # "data": {"status": "running", "id": "snapdelete0"}}
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1442126172, "microseconds": 744001}, # "timestamp": {"seconds": 1442126172, "microseconds": 744001},
# "data": {"status": "waiting", "id": "snapdelete0"}} # "data": {"status": "waiting", "id": "snapdelete0"}}
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1442127172, "microseconds": 744001}, # "timestamp": {"seconds": 1442127172, "microseconds": 744001},
# "data": {"status": "pending", "id": "snapdelete0"}} # "data": {"status": "pending", "id": "snapdelete0"}}
# <- {"event": "JOB_STATUS_CHANGE", # <- {"event": "JOB_STATUS_CHANGE",
# "timestamp": {"seconds": 1442128172, "microseconds": 744001}, # "timestamp": {"seconds": 1442128172, "microseconds": 744001},
# "data": {"status": "concluded", "id": "snapdelete0"}} # "data": {"status": "concluded", "id": "snapdelete0"}}
# -> {"execute": "query-jobs"} # -> {"execute": "query-jobs"}
# <- {"return": [{"current-progress": 1, # <- {"return": [{"current-progress": 1,
# "status": "concluded", # "status": "concluded",
# "total-progress": 1, # "total-progress": 1,
# "type": "snapshot-delete", # "type": "snapshot-delete",
# "id": "snapdelete0"}]} # "id": "snapdelete0"}]}
# #
# Since: 6.0 # Since: 6.0
## ##

View File

@ -13,8 +13,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "rtc-reset-reinjection" } # -> { "execute": "rtc-reset-reinjection" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'rtc-reset-reinjection', { 'command': 'rtc-reset-reinjection',
'if': 'TARGET_I386' } 'if': 'TARGET_I386' }
@ -91,10 +91,10 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-sev" } # -> { "execute": "query-sev" }
# <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0, # <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
# "build-id" : 0, "policy" : 0, "state" : "running", # "build-id" : 0, "policy" : 0, "state" : "running",
# "handle" : 1 } } # "handle" : 1 } }
## ##
{ 'command': 'query-sev', 'returns': 'SevInfo', { 'command': 'query-sev', 'returns': 'SevInfo',
'if': 'TARGET_I386' } 'if': 'TARGET_I386' }
@ -122,8 +122,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-sev-launch-measure" } # -> { "execute": "query-sev-launch-measure" }
# <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } } # <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
## ##
{ 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo', { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
'if': 'TARGET_I386' } 'if': 'TARGET_I386' }
@ -167,10 +167,10 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-sev-capabilities" } # -> { "execute": "query-sev-capabilities" }
# <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE", # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
# "cpu0-id": "2lvmGwo+...61iEinw==", # "cpu0-id": "2lvmGwo+...61iEinw==",
# "cbitpos": 47, "reduced-phys-bits": 1}} # "cbitpos": 47, "reduced-phys-bits": 1}}
## ##
{ 'command': 'query-sev-capabilities', 'returns': 'SevCapability', { 'command': 'query-sev-capabilities', 'returns': 'SevCapability',
'if': 'TARGET_I386' } 'if': 'TARGET_I386' }
@ -221,9 +221,9 @@
# #
# Example: # Example:
# #
# -> { "execute" : "query-sev-attestation-report", # -> { "execute" : "query-sev-attestation-report",
# "arguments": { "mnonce": "aaaaaaa" } } # "arguments": { "mnonce": "aaaaaaa" } }
# <- { "return" : { "data": "aaaaaaaabbbddddd"} } # <- { "return" : { "data": "aaaaaaaabbbddddd"} }
## ##
{ 'command': 'query-sev-attestation-report', { 'command': 'query-sev-attestation-report',
'data': { 'mnonce': 'str' }, 'data': { 'mnonce': 'str' },
@ -241,9 +241,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "dump-skeys", # -> { "execute": "dump-skeys",
# "arguments": { "filename": "/tmp/skeys" } } # "arguments": { "filename": "/tmp/skeys" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'dump-skeys', { 'command': 'dump-skeys',
'data': { 'filename': 'str' }, 'data': { 'filename': 'str' },
@ -286,9 +286,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-gic-capabilities" } # -> { "execute": "query-gic-capabilities" }
# <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
# { "version": 3, "emulated": false, "kernel": true } ] } # { "version": 3, "emulated": false, "kernel": true } ] }
## ##
{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'], { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'],
'if': 'TARGET_ARM' } 'if': 'TARGET_ARM' }
@ -344,11 +344,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-sgx" } # -> { "execute": "query-sgx" }
# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true, # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
# "flc": true, # "flc": true,
# "sections": [{"node": 0, "size": 67108864}, # "sections": [{"node": 0, "size": 67108864},
# {"node": 1, "size": 29360128}]} } # {"node": 1, "size": 29360128}]} }
## ##
{ 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' } { 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }
@ -363,11 +363,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-sgx-capabilities" } # -> { "execute": "query-sgx-capabilities" }
# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true, # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
# "flc": true, # "flc": true,
# "section" : [{"node": 0, "size": 67108864}, # "section" : [{"node": 0, "size": 67108864},
# {"node": 1, "size": 29360128}]} } # {"node": 1, "size": 29360128}]} }
## ##
{ 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo', 'if': 'TARGET_I386' } { 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }
@ -438,28 +438,28 @@
# #
# Example: # Example:
# #
# -> { "execute": "xen-event-list" } # -> { "execute": "xen-event-list" }
# <- { "return": [ # <- { "return": [
# { # {
# "pending": false, # "pending": false,
# "port": 1, # "port": 1,
# "vcpu": 1, # "vcpu": 1,
# "remote-domain": "qemu", # "remote-domain": "qemu",
# "masked": false, # "masked": false,
# "type": "interdomain", # "type": "interdomain",
# "target": 1 # "target": 1
# }, # },
# { # {
# "pending": false, # "pending": false,
# "port": 2, # "port": 2,
# "vcpu": 0, # "vcpu": 0,
# "remote-domain": "", # "remote-domain": "",
# "masked": false, # "masked": false,
# "type": "virq", # "type": "virq",
# "target": 0 # "target": 0
# } # }
# ] # ]
# } # }
## ##
{ 'command': 'xen-event-list', { 'command': 'xen-event-list',
'returns': ['EvtchnInfo'], 'returns': ['EvtchnInfo'],
@ -479,8 +479,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "xen-event-inject", "arguments": { "port": 1 } } # -> { "execute": "xen-event-inject", "arguments": { "port": 1 } }
# <- { "return": { } } # <- { "return": { } }
## ##
{ 'command': 'xen-event-inject', { 'command': 'xen-event-inject',
'data': { 'port': 'uint32' }, 'data': { 'port': 'uint32' },

View File

@ -34,9 +34,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "add_client", "arguments": { "protocol": "vnc", # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
# "fdname": "myclient" } } # "fdname": "myclient" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'add_client', { 'command': 'add_client',
'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool', 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
@ -64,8 +64,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-name" } # -> { "execute": "query-name" }
# <- { "return": { "name": "qemu-name" } } # <- { "return": { "name": "qemu-name" } }
## ##
{ 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true } { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
@ -115,18 +115,18 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-iothreads" } # -> { "execute": "query-iothreads" }
# <- { "return": [ # <- { "return": [
# { # {
# "id":"iothread0", # "id":"iothread0",
# "thread-id":3134 # "thread-id":3134
# }, # },
# { # {
# "id":"iothread1", # "id":"iothread1",
# "thread-id":3135 # "thread-id":3135
# } # }
# ] # ]
# } # }
## ##
{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'], { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
'allow-preconfig': true } 'allow-preconfig': true }
@ -148,8 +148,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "stop" } # -> { "execute": "stop" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'stop' } { 'command': 'stop' }
@ -174,8 +174,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "cont" } # -> { "execute": "cont" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'cont' } { 'command': 'cont' }
@ -200,8 +200,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "x-exit-preconfig" } # -> { "execute": "x-exit-preconfig" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'x-exit-preconfig', 'allow-preconfig': true, { 'command': 'x-exit-preconfig', 'allow-preconfig': true,
'features': [ 'unstable' ] } 'features': [ 'unstable' ] }
@ -240,9 +240,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "human-monitor-command", # -> { "execute": "human-monitor-command",
# "arguments": { "command-line": "info kvm" } } # "arguments": { "command-line": "info kvm" } }
# <- { "return": "kvm support: enabled\r\n" } # <- { "return": "kvm support: enabled\r\n" }
## ##
{ 'command': 'human-monitor-command', { 'command': 'human-monitor-command',
'data': {'command-line': 'str', '*cpu-index': 'int'}, 'data': {'command-line': 'str', '*cpu-index': 'int'},
@ -268,8 +268,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "getfd", "arguments": { "fdname": "fd1" } } # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'getfd', 'data': {'fdname': 'str'}, 'if': 'CONFIG_POSIX' } { 'command': 'getfd', 'data': {'fdname': 'str'}, 'if': 'CONFIG_POSIX' }
@ -297,8 +297,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "get-win32-socket", "arguments": { "info": "abcd123..", fdname": "skclient" } } # -> { "execute": "get-win32-socket", "arguments": { "info": "abcd123..", fdname": "skclient" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'get-win32-socket', 'data': {'info': 'str', 'fdname': 'str'}, 'if': 'CONFIG_WIN32' } { 'command': 'get-win32-socket', 'data': {'info': 'str', 'fdname': 'str'}, 'if': 'CONFIG_WIN32' }
@ -315,8 +315,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "closefd", "arguments": { "fdname": "fd1" } } # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'closefd', 'data': {'fdname': 'str'} } { 'command': 'closefd', 'data': {'fdname': 'str'} }
@ -357,8 +357,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } } # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
# <- { "return": { "fdset-id": 1, "fd": 3 } } # <- { "return": { "fdset-id": 1, "fd": 3 } }
## ##
{ 'command': 'add-fd', { 'command': 'add-fd',
'data': { '*fdset-id': 'int', 'data': { '*fdset-id': 'int',
@ -388,8 +388,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } } # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} } { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
@ -434,34 +434,34 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-fdsets" } # -> { "execute": "query-fdsets" }
# <- { "return": [ # <- { "return": [
# {
# "fds": [
# { # {
# "fd": 30, # "fds": [
# "opaque": "rdonly:/path/to/file" # {
# "fd": 30,
# "opaque": "rdonly:/path/to/file"
# },
# {
# "fd": 24,
# "opaque": "rdwr:/path/to/file"
# }
# ],
# "fdset-id": 1
# }, # },
# { # {
# "fd": 24, # "fds": [
# "opaque": "rdwr:/path/to/file" # {
# "fd": 28
# },
# {
# "fd": 29
# }
# ],
# "fdset-id": 0
# } # }
# ], # ]
# "fdset-id": 1
# },
# {
# "fds": [
# {
# "fd": 28
# },
# {
# "fd": 29
# }
# ],
# "fdset-id": 0
# } # }
# ]
# }
## ##
{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] } { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
@ -535,24 +535,24 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-command-line-options", # -> { "execute": "query-command-line-options",
# "arguments": { "option": "option-rom" } } # "arguments": { "option": "option-rom" } }
# <- { "return": [ # <- { "return": [
# { # {
# "parameters": [ # "parameters": [
# { # {
# "name": "romfile", # "name": "romfile",
# "type": "string" # "type": "string"
# }, # },
# { # {
# "name": "bootindex", # "name": "bootindex",
# "type": "number" # "type": "number"
# } # }
# ], # ],
# "option": "option-rom" # "option": "option-rom"
# } # }
# ] # ]
# } # }
## ##
{'command': 'query-command-line-options', {'command': 'query-command-line-options',
'data': {'*option': 'str'}, 'data': {'*option': 'str'},
@ -577,9 +577,9 @@
# #
# Example: # Example:
# #
# <- { "event": "RTC_CHANGE", # <- { "event": "RTC_CHANGE",
# "data": { "offset": 78 }, # "data": { "offset": 78 },
# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
## ##
{ 'event': 'RTC_CHANGE', { 'event': 'RTC_CHANGE',
'data': { 'offset': 'int', 'qom-path': 'str' } } 'data': { 'offset': 'int', 'qom-path': 'str' } }
@ -604,12 +604,12 @@
# #
# Example: # Example:
# #
# <- { "event": "VFU_CLIENT_HANGUP", # <- { "event": "VFU_CLIENT_HANGUP",
# "data": { "vfu-id": "vfu1", # "data": { "vfu-id": "vfu1",
# "vfu-qom-path": "/objects/vfu1", # "vfu-qom-path": "/objects/vfu1",
# "dev-id": "sas1", # "dev-id": "sas1",
# "dev-qom-path": "/machine/peripheral/sas1" }, # "dev-qom-path": "/machine/peripheral/sas1" },
# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
## ##
{ 'event': 'VFU_CLIENT_HANGUP', { 'event': 'VFU_CLIENT_HANGUP',
'data': { 'vfu-id': 'str', 'vfu-qom-path': 'str', 'data': { 'vfu-id': 'str', 'vfu-qom-path': 'str',

View File

@ -29,9 +29,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "set_link", # -> { "execute": "set_link",
# "arguments": { "name": "e1000.0", "up": false } } # "arguments": { "name": "e1000.0", "up": false } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} } { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
@ -50,10 +50,10 @@
# #
# Example: # Example:
# #
# -> { "execute": "netdev_add", # -> { "execute": "netdev_add",
# "arguments": { "type": "user", "id": "netdev1", # "arguments": { "type": "user", "id": "netdev1",
# "dnssearch": [ { "str": "example.org" } ] } } # "dnssearch": [ { "str": "example.org" } ] } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'netdev_add', 'data': 'Netdev', 'boxed': true, { 'command': 'netdev_add', 'data': 'Netdev', 'boxed': true,
'allow-preconfig': true } 'allow-preconfig': true }
@ -73,8 +73,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } } # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'netdev_del', 'data': {'id': 'str'}, { 'command': 'netdev_del', 'data': {'id': 'str'},
'allow-preconfig': true } 'allow-preconfig': true }
@ -836,32 +836,32 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } } # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
# <- { "return": [ # <- { "return": [
# { # {
# "promiscuous": true, # "promiscuous": true,
# "name": "vnet0", # "name": "vnet0",
# "main-mac": "52:54:00:12:34:56", # "main-mac": "52:54:00:12:34:56",
# "unicast": "normal", # "unicast": "normal",
# "vlan": "normal", # "vlan": "normal",
# "vlan-table": [ # "vlan-table": [
# 4, # 4,
# 0 # 0
# ], # ],
# "unicast-table": [ # "unicast-table": [
# ], # ],
# "multicast": "normal", # "multicast": "normal",
# "multicast-overflow": false, # "multicast-overflow": false,
# "unicast-overflow": false, # "unicast-overflow": false,
# "multicast-table": [ # "multicast-table": [
# "01:00:5e:00:00:01", # "01:00:5e:00:00:01",
# "33:33:00:00:00:01", # "33:33:00:00:00:01",
# "33:33:ff:12:34:56" # "33:33:ff:12:34:56"
# ], # ],
# "broadcast-allowed": false # "broadcast-allowed": false
# } # }
# ] # ]
# } # }
## ##
{ 'command': 'query-rx-filter', { 'command': 'query-rx-filter',
'data': { '*name': 'str' }, 'data': { '*name': 'str' },
@ -881,10 +881,10 @@
# #
# Example: # Example:
# #
# <- { "event": "NIC_RX_FILTER_CHANGED", # <- { "event": "NIC_RX_FILTER_CHANGED",
# "data": { "name": "vnet0", # "data": { "name": "vnet0",
# "path": "/machine/peripheral/vnet0/virtio-backend" }, # "path": "/machine/peripheral/vnet0/virtio-backend" },
# "timestamp": { "seconds": 1368697518, "microseconds": 326866 } } # "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
## ##
{ 'event': 'NIC_RX_FILTER_CHANGED', { 'event': 'NIC_RX_FILTER_CHANGED',
'data': { '*name': 'str', 'path': 'str' } } 'data': { '*name': 'str', 'path': 'str' } }
@ -930,11 +930,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "announce-self", # -> { "execute": "announce-self",
# "arguments": { # "arguments": {
# "initial": 50, "max": 550, "rounds": 10, "step": 50, # "initial": 50, "max": 550, "rounds": 10, "step": 50,
# "interfaces": ["vn2", "vn3"], "id": "bob" } } # "interfaces": ["vn2", "vn3"], "id": "bob" } }
# <- { "return": {} } # <- { "return": {} }
# #
# Since: 4.0 # Since: 4.0
## ##
@ -955,9 +955,9 @@
# #
# Example: # Example:
# #
# <- { "event": "FAILOVER_NEGOTIATED", # <- { "event": "FAILOVER_NEGOTIATED",
# "data": { "device-id": "net1" }, # "data": { "device-id": "net1" },
# "timestamp": { "seconds": 1368697518, "microseconds": 326866 } } # "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
## ##
{ 'event': 'FAILOVER_NEGOTIATED', { 'event': 'FAILOVER_NEGOTIATED',
'data': {'device-id': 'str'} } 'data': {'device-id': 'str'} }
@ -975,16 +975,16 @@
# #
# Examples: # Examples:
# #
# <- { "event": "NETDEV_STREAM_CONNECTED", # <- { "event": "NETDEV_STREAM_CONNECTED",
# "data": { "netdev-id": "netdev0", # "data": { "netdev-id": "netdev0",
# "addr": { "port": "47666", "ipv6": true, # "addr": { "port": "47666", "ipv6": true,
# "host": "::1", "type": "inet" } }, # "host": "::1", "type": "inet" } },
# "timestamp": { "seconds": 1666269863, "microseconds": 311222 } } # "timestamp": { "seconds": 1666269863, "microseconds": 311222 } }
# #
# <- { "event": "NETDEV_STREAM_CONNECTED", # <- { "event": "NETDEV_STREAM_CONNECTED",
# "data": { "netdev-id": "netdev0", # "data": { "netdev-id": "netdev0",
# "addr": { "path": "/tmp/qemu0", "type": "unix" } }, # "addr": { "path": "/tmp/qemu0", "type": "unix" } },
# "timestamp": { "seconds": 1666269706, "microseconds": 413651 } } # "timestamp": { "seconds": 1666269706, "microseconds": 413651 } }
## ##
{ 'event': 'NETDEV_STREAM_CONNECTED', { 'event': 'NETDEV_STREAM_CONNECTED',
'data': { 'netdev-id': 'str', 'data': { 'netdev-id': 'str',
@ -1001,9 +1001,9 @@
# #
# Example: # Example:
# #
# <- { 'event': 'NETDEV_STREAM_DISCONNECTED', # <- { 'event': 'NETDEV_STREAM_DISCONNECTED',
# 'data': {'netdev-id': 'netdev0'}, # 'data': {'netdev-id': 'netdev0'},
# 'timestamp': {'seconds': 1663330937, 'microseconds': 526695} } # 'timestamp': {'seconds': 1663330937, 'microseconds': 526695} }
## ##
{ 'event': 'NETDEV_STREAM_DISCONNECTED', { 'event': 'NETDEV_STREAM_DISCONNECTED',
'data': { 'netdev-id': 'str' } } 'data': { 'netdev-id': 'str' } }

View File

@ -184,132 +184,132 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-pci" } # -> { "execute": "query-pci" }
# <- { "return": [ # <- { "return": [
# { # {
# "bus": 0, # "bus": 0,
# "devices": [ # "devices": [
# { # {
# "bus": 0, # "bus": 0,
# "qdev_id": "", # "qdev_id": "",
# "slot": 0, # "slot": 0,
# "class_info": { # "class_info": {
# "class": 1536, # "class": 1536,
# "desc": "Host bridge" # "desc": "Host bridge"
# }, # },
# "id": { # "id": {
# "device": 32902, # "device": 32902,
# "vendor": 4663 # "vendor": 4663
# }, # },
# "function": 0, # "function": 0,
# "regions": [ # "regions": [
# ] # ]
# }, # },
# { # {
# "bus": 0, # "bus": 0,
# "qdev_id": "", # "qdev_id": "",
# "slot": 1, # "slot": 1,
# "class_info": { # "class_info": {
# "class": 1537, # "class": 1537,
# "desc": "ISA bridge" # "desc": "ISA bridge"
# }, # },
# "id": { # "id": {
# "device": 32902, # "device": 32902,
# "vendor": 28672 # "vendor": 28672
# }, # },
# "function": 0, # "function": 0,
# "regions": [ # "regions": [
# ] # ]
# }, # },
# { # {
# "bus": 0, # "bus": 0,
# "qdev_id": "", # "qdev_id": "",
# "slot": 1, # "slot": 1,
# "class_info": { # "class_info": {
# "class": 257, # "class": 257,
# "desc": "IDE controller" # "desc": "IDE controller"
# }, # },
# "id": { # "id": {
# "device": 32902, # "device": 32902,
# "vendor": 28688 # "vendor": 28688
# }, # },
# "function": 1, # "function": 1,
# "regions": [ # "regions": [
# { # {
# "bar": 4, # "bar": 4,
# "size": 16, # "size": 16,
# "address": 49152, # "address": 49152,
# "type": "io" # "type": "io"
# } # }
# ] # ]
# }, # },
# { # {
# "bus": 0, # "bus": 0,
# "qdev_id": "", # "qdev_id": "",
# "slot": 2, # "slot": 2,
# "class_info": { # "class_info": {
# "class": 768, # "class": 768,
# "desc": "VGA controller" # "desc": "VGA controller"
# }, # },
# "id": { # "id": {
# "device": 4115, # "device": 4115,
# "vendor": 184 # "vendor": 184
# }, # },
# "function": 0, # "function": 0,
# "regions": [ # "regions": [
# { # {
# "prefetch": true, # "prefetch": true,
# "mem_type_64": false, # "mem_type_64": false,
# "bar": 0, # "bar": 0,
# "size": 33554432, # "size": 33554432,
# "address": 4026531840, # "address": 4026531840,
# "type": "memory" # "type": "memory"
# }, # },
# { # {
# "prefetch": false, # "prefetch": false,
# "mem_type_64": false, # "mem_type_64": false,
# "bar": 1, # "bar": 1,
# "size": 4096, # "size": 4096,
# "address": 4060086272, # "address": 4060086272,
# "type": "memory" # "type": "memory"
# }, # },
# { # {
# "prefetch": false, # "prefetch": false,
# "mem_type_64": false, # "mem_type_64": false,
# "bar": 6, # "bar": 6,
# "size": 65536, # "size": 65536,
# "address": -1, # "address": -1,
# "type": "memory" # "type": "memory"
# } # }
# ] # ]
# }, # },
# { # {
# "bus": 0, # "bus": 0,
# "qdev_id": "", # "qdev_id": "",
# "irq": 11, # "irq": 11,
# "slot": 4, # "slot": 4,
# "class_info": { # "class_info": {
# "class": 1280, # "class": 1280,
# "desc": "RAM controller" # "desc": "RAM controller"
# }, # },
# "id": { # "id": {
# "device": 6900, # "device": 6900,
# "vendor": 4098 # "vendor": 4098
# }, # },
# "function": 0, # "function": 0,
# "regions": [ # "regions": [
# { # {
# "bar": 0, # "bar": 0,
# "size": 32, # "size": 32,
# "address": 49280, # "address": 49280,
# "type": "io" # "type": "io"
# } # }
# ] # ]
# } # }
# ] # ]
# } # }
# ] # ]
# } # }
# #
# Note: This example has been shortened as the real response is too # Note: This example has been shortened as the real response is too
# long. # long.

View File

@ -64,11 +64,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "device_add", # -> { "execute": "device_add",
# "arguments": { "driver": "e1000", "id": "net1", # "arguments": { "driver": "e1000", "id": "net1",
# "bus": "pci.0", # "bus": "pci.0",
# "mac": "52:54:00:12:34:56" } } # "mac": "52:54:00:12:34:56" } }
# <- { "return": {} } # <- { "return": {} }
# #
# TODO: This command effectively bypasses QAPI completely due to its # TODO: This command effectively bypasses QAPI completely due to its
# "additional arguments" business. It shouldn't have been added # "additional arguments" business. It shouldn't have been added
@ -107,13 +107,13 @@
# #
# Examples: # Examples:
# #
# -> { "execute": "device_del", # -> { "execute": "device_del",
# "arguments": { "id": "net1" } } # "arguments": { "id": "net1" } }
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute": "device_del", # -> { "execute": "device_del",
# "arguments": { "id": "/machine/peripheral-anon/device[0]" } } # "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'device_del', 'data': {'id': 'str'} } { 'command': 'device_del', 'data': {'id': 'str'} }
@ -133,10 +133,10 @@
# #
# Example: # Example:
# #
# <- { "event": "DEVICE_DELETED", # <- { "event": "DEVICE_DELETED",
# "data": { "device": "virtio-net-pci-0", # "data": { "device": "virtio-net-pci-0",
# "path": "/machine/peripheral/virtio-net-pci-0" }, # "path": "/machine/peripheral/virtio-net-pci-0" },
# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
## ##
{ 'event': 'DEVICE_DELETED', { 'event': 'DEVICE_DELETED',
'data': { '*device': 'str', 'path': 'str' } } 'data': { '*device': 'str', 'path': 'str' } }
@ -155,10 +155,10 @@
# #
# Example: # Example:
# #
# <- { "event": "DEVICE_UNPLUG_GUEST_ERROR", # <- { "event": "DEVICE_UNPLUG_GUEST_ERROR",
# "data": { "device": "core1", # "data": { "device": "core1",
# "path": "/machine/peripheral/core1" }, # "path": "/machine/peripheral/core1" },
# "timestamp": { "seconds": 1615570772, "microseconds": 202844 } } # "timestamp": { "seconds": 1615570772, "microseconds": 202844 } }
## ##
{ 'event': 'DEVICE_UNPLUG_GUEST_ERROR', { 'event': 'DEVICE_UNPLUG_GUEST_ERROR',
'data': { '*device': 'str', 'path': 'str' } } 'data': { '*device': 'str', 'path': 'str' } }

View File

@ -61,12 +61,12 @@
# #
# Example: # Example:
# #
# -> { "execute": "qom-list", # -> { "execute": "qom-list",
# "arguments": { "path": "/chardevs" } } # "arguments": { "path": "/chardevs" } }
# <- { "return": [ { "name": "type", "type": "string" }, # <- { "return": [ { "name": "type", "type": "string" },
# { "name": "parallel0", "type": "child<chardev-vc>" }, # { "name": "parallel0", "type": "child<chardev-vc>" },
# { "name": "serial0", "type": "child<chardev-vc>" }, # { "name": "serial0", "type": "child<chardev-vc>" },
# { "name": "mon0", "type": "child<chardev-stdio>" } ] } # { "name": "mon0", "type": "child<chardev-stdio>" } ] }
## ##
{ 'command': 'qom-list', { 'command': 'qom-list',
'data': { 'path': 'str' }, 'data': { 'path': 'str' },
@ -106,19 +106,19 @@
# #
# Examples: # Examples:
# #
# 1. Use absolute path # 1. Use absolute path
# #
# -> { "execute": "qom-get", # -> { "execute": "qom-get",
# "arguments": { "path": "/machine/unattached/device[0]", # "arguments": { "path": "/machine/unattached/device[0]",
# "property": "hotplugged" } } # "property": "hotplugged" } }
# <- { "return": false } # <- { "return": false }
# #
# 2. Use partial path # 2. Use partial path
# #
# -> { "execute": "qom-get", # -> { "execute": "qom-get",
# "arguments": { "path": "unattached/sysbus", # "arguments": { "path": "unattached/sysbus",
# "property": "type" } } # "property": "type" } }
# <- { "return": "System" } # <- { "return": "System" }
## ##
{ 'command': 'qom-get', { 'command': 'qom-get',
'data': { 'path': 'str', 'property': 'str' }, 'data': { 'path': 'str', 'property': 'str' },
@ -141,11 +141,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "qom-set", # -> { "execute": "qom-set",
# "arguments": { "path": "/machine", # "arguments": { "path": "/machine",
# "property": "graphics", # "property": "graphics",
# "value": false } } # "value": false } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'qom-set', { 'command': 'qom-set',
'data': { 'path': 'str', 'property': 'str', 'value': 'any' }, 'data': { 'path': 'str', 'property': 'str', 'value': 'any' },
@ -1064,10 +1064,10 @@
# #
# Example: # Example:
# #
# -> { "execute": "object-add", # -> { "execute": "object-add",
# "arguments": { "qom-type": "rng-random", "id": "rng1", # "arguments": { "qom-type": "rng-random", "id": "rng1",
# "filename": "/dev/hwrng" } } # "filename": "/dev/hwrng" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'object-add', 'data': 'ObjectOptions', 'boxed': true, { 'command': 'object-add', 'data': 'ObjectOptions', 'boxed': true,
'allow-preconfig': true } 'allow-preconfig': true }
@ -1087,8 +1087,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "object-del", "arguments": { "id": "rng1" } } # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'object-del', 'data': {'id': 'str'}, { 'command': 'object-del', 'data': {'id': 'str'},
'allow-preconfig': true } 'allow-preconfig': true }

View File

@ -23,13 +23,13 @@
# #
# Example: # Example:
# #
# <- {"timestamp": {"seconds": 1541579657, "microseconds": 986760}, # <- {"timestamp": {"seconds": 1541579657, "microseconds": 986760},
# "event": "RDMA_GID_STATUS_CHANGED", # "event": "RDMA_GID_STATUS_CHANGED",
# "data": # "data":
# {"netdev": "bridge0", # {"netdev": "bridge0",
# "interface-id": 15880512517475447892, # "interface-id": 15880512517475447892,
# "gid-status": true, # "gid-status": true,
# "subnet-prefix": 33022}} # "subnet-prefix": 33022}}
## ##
{ 'event': 'RDMA_GID_STATUS_CHANGED', { 'event': 'RDMA_GID_STATUS_CHANGED',
'data': { 'netdev' : 'str', 'data': { 'netdev' : 'str',

View File

@ -56,8 +56,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-replay" } # -> { "execute": "query-replay" }
# <- { "return": { "mode": "play", "filename": "log.rr", "icount": 220414 } } # <- { "return": { "mode": "play", "filename": "log.rr", "icount": 220414 } }
## ##
{ 'command': 'query-replay', { 'command': 'query-replay',
'returns': 'ReplayInfo' } 'returns': 'ReplayInfo' }
@ -78,8 +78,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "replay-break", "arguments": { "icount": 220414 } } # -> { "execute": "replay-break", "arguments": { "icount": 220414 } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'replay-break', 'data': { 'icount': 'int' } } { 'command': 'replay-break', 'data': { 'icount': 'int' } }
@ -93,8 +93,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "replay-delete-break" } # -> { "execute": "replay-delete-break" }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'replay-delete-break' } { 'command': 'replay-delete-break' }
@ -114,7 +114,7 @@
# #
# Example: # Example:
# #
# -> { "execute": "replay-seek", "arguments": { "icount": 220414 } } # -> { "execute": "replay-seek", "arguments": { "icount": 220414 } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'replay-seek', 'data': { 'icount': 'int' } } { 'command': 'replay-seek', 'data': { 'icount': 'int' } }

View File

@ -32,8 +32,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-rocker", "arguments": { "name": "sw1" } } # -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
# <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}} # <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
## ##
{ 'command': 'query-rocker', { 'command': 'query-rocker',
'data': { 'name': 'str' }, 'data': { 'name': 'str' },
@ -100,12 +100,12 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } } # -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
# <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1", # <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
# "autoneg": "off", "link-up": true, "speed": 10000}, # "autoneg": "off", "link-up": true, "speed": 10000},
# {"duplex": "full", "enabled": true, "name": "sw1.2", # {"duplex": "full", "enabled": true, "name": "sw1.2",
# "autoneg": "off", "link-up": true, "speed": 10000} # "autoneg": "off", "link-up": true, "speed": 10000}
# ]} # ]}
## ##
{ 'command': 'query-rocker-ports', { 'command': 'query-rocker-ports',
'data': { 'name': 'str' }, 'data': { 'name': 'str' },
@ -242,16 +242,16 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-rocker-of-dpa-flows", # -> { "execute": "query-rocker-of-dpa-flows",
# "arguments": { "name": "sw1" } } # "arguments": { "name": "sw1" } }
# <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0}, # <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
# "hits": 138, # "hits": 138,
# "cookie": 0, # "cookie": 0,
# "action": {"goto-tbl": 10}, # "action": {"goto-tbl": 10},
# "mask": {"in-pport": 4294901760} # "mask": {"in-pport": 4294901760}
# }, # },
# {...more...}, # {...more...},
# ]} # ]}
## ##
{ 'command': 'query-rocker-of-dpa-flows', { 'command': 'query-rocker-of-dpa-flows',
'data': { 'name': 'str', '*tbl-id': 'uint32' }, 'data': { 'name': 'str', '*tbl-id': 'uint32' },
@ -317,21 +317,21 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-rocker-of-dpa-groups", # -> { "execute": "query-rocker-of-dpa-groups",
# "arguments": { "name": "sw1" } } # "arguments": { "name": "sw1" } }
# <- { "return": [ {"type": 0, "out-pport": 2, # <- { "return": [ {"type": 0, "out-pport": 2,
# "pport": 2, "vlan-id": 3841, # "pport": 2, "vlan-id": 3841,
# "pop-vlan": 1, "id": 251723778}, # "pop-vlan": 1, "id": 251723778},
# {"type": 0, "out-pport": 0, # {"type": 0, "out-pport": 0,
# "pport": 0, "vlan-id": 3841, # "pport": 0, "vlan-id": 3841,
# "pop-vlan": 1, "id": 251723776}, # "pop-vlan": 1, "id": 251723776},
# {"type": 0, "out-pport": 1, # {"type": 0, "out-pport": 1,
# "pport": 1, "vlan-id": 3840, # "pport": 1, "vlan-id": 3840,
# "pop-vlan": 1, "id": 251658241}, # "pop-vlan": 1, "id": 251658241},
# {"type": 0, "out-pport": 0, # {"type": 0, "out-pport": 0,
# "pport": 0, "vlan-id": 3840, # "pport": 0, "vlan-id": 3840,
# "pop-vlan": 1, "id": 251658240} # "pop-vlan": 1, "id": 251658240}
# ]} # ]}
## ##
{ 'command': 'query-rocker-of-dpa-groups', { 'command': 'query-rocker-of-dpa-groups',
'data': { 'name': 'str', '*type': 'uint8' }, 'data': { 'name': 'str', '*type': 'uint8' },

View File

@ -108,8 +108,6 @@
# #
# @status: the virtual machine @RunState # @status: the virtual machine @RunState
# #
# Features:
#
# Since: 0.14 # Since: 0.14
# #
## ##
@ -128,9 +126,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-status" } # -> { "execute": "query-status" }
# <- { "return": { "running": true, # <- { "return": { "running": true,
# "status": "running" } } # "status": "running" } }
## ##
{ 'command': 'query-status', 'returns': 'StatusInfo', { 'command': 'query-status', 'returns': 'StatusInfo',
'allow-preconfig': true } 'allow-preconfig': true }
@ -157,9 +155,9 @@
# #
# Example: # Example:
# #
# <- { "event": "SHUTDOWN", # <- { "event": "SHUTDOWN",
# "data": { "guest": true, "reason": "guest-shutdown" }, # "data": { "guest": true, "reason": "guest-shutdown" },
# "timestamp": { "seconds": 1267040730, "microseconds": 682951 } } # "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
## ##
{ 'event': 'SHUTDOWN', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } } { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
@ -173,8 +171,8 @@
# #
# Example: # Example:
# #
# <- { "event": "POWERDOWN", # <- { "event": "POWERDOWN",
# "timestamp": { "seconds": 1267040730, "microseconds": 682951 } } # "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
## ##
{ 'event': 'POWERDOWN' } { 'event': 'POWERDOWN' }
@ -194,9 +192,9 @@
# #
# Example: # Example:
# #
# <- { "event": "RESET", # <- { "event": "RESET",
# "data": { "guest": false, "reason": "guest-reset" }, # "data": { "guest": false, "reason": "guest-reset" },
# "timestamp": { "seconds": 1267041653, "microseconds": 9518 } } # "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
## ##
{ 'event': 'RESET', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } } { 'event': 'RESET', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
@ -209,8 +207,8 @@
# #
# Example: # Example:
# #
# <- { "event": "STOP", # <- { "event": "STOP",
# "timestamp": { "seconds": 1267041730, "microseconds": 281295 } } # "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
## ##
{ 'event': 'STOP' } { 'event': 'STOP' }
@ -223,8 +221,8 @@
# #
# Example: # Example:
# #
# <- { "event": "RESUME", # <- { "event": "RESUME",
# "timestamp": { "seconds": 1271770767, "microseconds": 582542 } } # "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
## ##
{ 'event': 'RESUME' } { 'event': 'RESUME' }
@ -238,8 +236,8 @@
# #
# Example: # Example:
# #
# <- { "event": "SUSPEND", # <- { "event": "SUSPEND",
# "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } # "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
## ##
{ 'event': 'SUSPEND' } { 'event': 'SUSPEND' }
@ -257,8 +255,8 @@
# #
# Example: # Example:
# #
# <- { "event": "SUSPEND_DISK", # <- { "event": "SUSPEND_DISK",
# "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } # "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
## ##
{ 'event': 'SUSPEND_DISK' } { 'event': 'SUSPEND_DISK' }
@ -272,8 +270,8 @@
# #
# Example: # Example:
# #
# <- { "event": "WAKEUP", # <- { "event": "WAKEUP",
# "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } # "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
## ##
{ 'event': 'WAKEUP' } { 'event': 'WAKEUP' }
@ -294,9 +292,9 @@
# #
# Example: # Example:
# #
# <- { "event": "WATCHDOG", # <- { "event": "WATCHDOG",
# "data": { "action": "reset" }, # "data": { "action": "reset" },
# "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } # "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
## ##
{ 'event': 'WATCHDOG', { 'event': 'WATCHDOG',
'data': { 'action': 'WatchdogAction' } } 'data': { 'action': 'WatchdogAction' } }
@ -406,12 +404,12 @@
# #
# Example: # Example:
# #
# -> { "execute": "set-action", # -> { "execute": "set-action",
# "arguments": { "reboot": "shutdown", # "arguments": { "reboot": "shutdown",
# "shutdown" : "pause", # "shutdown" : "pause",
# "panic": "pause", # "panic": "pause",
# "watchdog": "inject-nmi" } } # "watchdog": "inject-nmi" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'set-action', { 'command': 'set-action',
'data': { '*reboot': 'RebootAction', 'data': { '*reboot': 'RebootAction',
@ -433,9 +431,9 @@
# #
# Example: # Example:
# #
# <- { "event": "GUEST_PANICKED", # <- { "event": "GUEST_PANICKED",
# "data": { "action": "pause" }, # "data": { "action": "pause" },
# "timestamp": { "seconds": 1648245231, "microseconds": 900001 } } # "timestamp": { "seconds": 1648245231, "microseconds": 900001 } }
## ##
{ 'event': 'GUEST_PANICKED', { 'event': 'GUEST_PANICKED',
'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } } 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
@ -453,9 +451,9 @@
# #
# Example: # Example:
# #
# <- { "event": "GUEST_CRASHLOADED", # <- { "event": "GUEST_CRASHLOADED",
# "data": { "action": "run" }, # "data": { "action": "run" },
# "timestamp": { "seconds": 1648245259, "microseconds": 893771 } } # "timestamp": { "seconds": 1648245259, "microseconds": 893771 } }
## ##
{ 'event': 'GUEST_CRASHLOADED', { 'event': 'GUEST_CRASHLOADED',
'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } } 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
@ -583,12 +581,12 @@
# #
# Example: # Example:
# #
# <- { "event": "MEMORY_FAILURE", # <- { "event": "MEMORY_FAILURE",
# "data": { "recipient": "hypervisor", # "data": { "recipient": "hypervisor",
# "action": "fatal", # "action": "fatal",
# "flags": { "action-required": false, # "flags": { "action-required": false,
# "recursive": false } }, # "recursive": false } },
# "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } # "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
## ##
{ 'event': 'MEMORY_FAILURE', { 'event': 'MEMORY_FAILURE',
'data': { 'recipient': 'MemoryFailureRecipient', 'data': { 'recipient': 'MemoryFailureRecipient',

View File

@ -33,8 +33,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-tpm-models" } # -> { "execute": "query-tpm-models" }
# <- { "return": [ "tpm-tis", "tpm-crb", "tpm-spapr" ] } # <- { "return": [ "tpm-tis", "tpm-crb", "tpm-spapr" ] }
## ##
{ 'command': 'query-tpm-models', 'returns': ['TpmModel'], { 'command': 'query-tpm-models', 'returns': ['TpmModel'],
'if': 'CONFIG_TPM' } 'if': 'CONFIG_TPM' }
@ -64,8 +64,8 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-tpm-types" } # -> { "execute": "query-tpm-types" }
# <- { "return": [ "passthrough", "emulator" ] } # <- { "return": [ "passthrough", "emulator" ] }
## ##
{ 'command': 'query-tpm-types', 'returns': ['TpmType'], { 'command': 'query-tpm-types', 'returns': ['TpmType'],
'if': 'CONFIG_TPM' } 'if': 'CONFIG_TPM' }
@ -172,21 +172,21 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-tpm" } # -> { "execute": "query-tpm" }
# <- { "return": # <- { "return":
# [ # [
# { "model": "tpm-tis", # { "model": "tpm-tis",
# "options": # "options":
# { "type": "passthrough", # { "type": "passthrough",
# "data": # "data":
# { "cancel-path": "/sys/class/misc/tpm0/device/cancel", # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
# "path": "/dev/tpm0" # "path": "/dev/tpm0"
# } # }
# }, # },
# "id": "tpm0" # "id": "tpm0"
# }
# ]
# } # }
# ]
# }
## ##
{ 'command': 'query-tpm', 'returns': ['TPMInfo'], { 'command': 'query-tpm', 'returns': ['TPMInfo'],
'if': 'CONFIG_TPM' } 'if': 'CONFIG_TPM' }

View File

@ -66,9 +66,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "trace-event-get-state", # -> { "execute": "trace-event-get-state",
# "arguments": { "name": "qemu_memalign" } } # "arguments": { "name": "qemu_memalign" } }
# <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] } # <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] }
## ##
{ 'command': 'trace-event-get-state', { 'command': 'trace-event-get-state',
'data': {'name': 'str', 'data': {'name': 'str',
@ -96,9 +96,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "trace-event-set-state", # -> { "execute": "trace-event-set-state",
# "arguments": { "name": "qemu_memalign", "enable": true } } # "arguments": { "name": "qemu_memalign", "enable": true } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'trace-event-set-state', { 'command': 'trace-event-set-state',
'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool', 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool',

View File

@ -247,24 +247,24 @@
# #
# Example: # Example:
# #
# -> { "execute": "transaction", # -> { "execute": "transaction",
# "arguments": { "actions": [ # "arguments": { "actions": [
# { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0", # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
# "snapshot-file": "/some/place/my-image", # "snapshot-file": "/some/place/my-image",
# "format": "qcow2" } }, # "format": "qcow2" } },
# { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile", # { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
# "snapshot-file": "/some/place/my-image2", # "snapshot-file": "/some/place/my-image2",
# "snapshot-node-name": "node3432", # "snapshot-node-name": "node3432",
# "mode": "existing", # "mode": "existing",
# "format": "qcow2" } }, # "format": "qcow2" } },
# { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1", # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
# "snapshot-file": "/some/place/my-image2", # "snapshot-file": "/some/place/my-image2",
# "mode": "existing", # "mode": "existing",
# "format": "qcow2" } }, # "format": "qcow2" } },
# { "type": "blockdev-snapshot-internal-sync", "data" : { # { "type": "blockdev-snapshot-internal-sync", "data" : {
# "device": "ide-hd2", # "device": "ide-hd2",
# "name": "snapshot0" } } ] } } # "name": "snapshot0" } } ] } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'transaction', { 'command': 'transaction',
'data': { 'actions': [ 'TransactionAction' ], 'data': { 'actions': [ 'TransactionAction' ],

View File

@ -86,9 +86,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "set_password", "arguments": { "protocol": "vnc", # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
# "password": "secret" } } # "password": "secret" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'set_password', 'boxed': true, 'data': 'SetPasswordOptions' } { 'command': 'set_password', 'boxed': true, 'data': 'SetPasswordOptions' }
@ -149,9 +149,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "expire_password", "arguments": { "protocol": "vnc", # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
# "time": "+60" } } # "time": "+60" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' } { 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
@ -193,9 +193,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "screendump", # -> { "execute": "screendump",
# "arguments": { "filename": "/tmp/image" } } # "arguments": { "filename": "/tmp/image" } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'screendump', { 'command': 'screendump',
'data': {'filename': 'str', '*device': 'str', '*head': 'int', 'data': {'filename': 'str', '*device': 'str', '*head': 'int',
@ -337,38 +337,38 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-spice" } # -> { "execute": "query-spice" }
# <- { "return": { # <- { "return": {
# "enabled": true, # "enabled": true,
# "auth": "spice", # "auth": "spice",
# "port": 5920, # "port": 5920,
# "migrated":false, # "migrated":false,
# "tls-port": 5921, # "tls-port": 5921,
# "host": "0.0.0.0", # "host": "0.0.0.0",
# "mouse-mode":"client", # "mouse-mode":"client",
# "channels": [ # "channels": [
# { # {
# "port": "54924", # "port": "54924",
# "family": "ipv4", # "family": "ipv4",
# "channel-type": 1, # "channel-type": 1,
# "connection-id": 1804289383, # "connection-id": 1804289383,
# "host": "127.0.0.1", # "host": "127.0.0.1",
# "channel-id": 0, # "channel-id": 0,
# "tls": true # "tls": true
# }, # },
# { # {
# "port": "36710", # "port": "36710",
# "family": "ipv4", # "family": "ipv4",
# "channel-type": 4, # "channel-type": 4,
# "connection-id": 1804289383, # "connection-id": 1804289383,
# "host": "127.0.0.1", # "host": "127.0.0.1",
# "channel-id": 0, # "channel-id": 0,
# "tls": false # "tls": false
# }, # },
# [ ... more channels follow ... ] # [ ... more channels follow ... ]
# ] # ]
# } # }
# } # }
## ##
{ 'command': 'query-spice', 'returns': 'SpiceInfo', { 'command': 'query-spice', 'returns': 'SpiceInfo',
'if': 'CONFIG_SPICE' } 'if': 'CONFIG_SPICE' }
@ -386,12 +386,12 @@
# #
# Example: # Example:
# #
# <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707}, # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
# "event": "SPICE_CONNECTED", # "event": "SPICE_CONNECTED",
# "data": { # "data": {
# "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"}, # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
# "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"} # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
# }} # }}
## ##
{ 'event': 'SPICE_CONNECTED', { 'event': 'SPICE_CONNECTED',
'data': { 'server': 'SpiceBasicInfo', 'data': { 'server': 'SpiceBasicInfo',
@ -412,14 +412,14 @@
# #
# Example: # Example:
# #
# <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172}, # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
# "event": "SPICE_INITIALIZED", # "event": "SPICE_INITIALIZED",
# "data": {"server": {"auth": "spice", "port": "5921", # "data": {"server": {"auth": "spice", "port": "5921",
# "family": "ipv4", "host": "127.0.0.1"}, # "family": "ipv4", "host": "127.0.0.1"},
# "client": {"port": "49004", "family": "ipv4", "channel-type": 3, # "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
# "connection-id": 1804289383, "host": "127.0.0.1", # "connection-id": 1804289383, "host": "127.0.0.1",
# "channel-id": 0, "tls": true} # "channel-id": 0, "tls": true}
# }} # }}
## ##
{ 'event': 'SPICE_INITIALIZED', { 'event': 'SPICE_INITIALIZED',
'data': { 'server': 'SpiceServerInfo', 'data': { 'server': 'SpiceServerInfo',
@ -439,12 +439,12 @@
# #
# Example: # Example:
# #
# <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707}, # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
# "event": "SPICE_DISCONNECTED", # "event": "SPICE_DISCONNECTED",
# "data": { # "data": {
# "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"}, # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
# "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"} # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
# }} # }}
## ##
{ 'event': 'SPICE_DISCONNECTED', { 'event': 'SPICE_DISCONNECTED',
'data': { 'server': 'SpiceBasicInfo', 'data': { 'server': 'SpiceBasicInfo',
@ -460,8 +460,8 @@
# #
# Example: # Example:
# #
# <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172}, # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
# "event": "SPICE_MIGRATE_COMPLETED" } # "event": "SPICE_MIGRATE_COMPLETED" }
## ##
{ 'event': 'SPICE_MIGRATE_COMPLETED', { 'event': 'SPICE_MIGRATE_COMPLETED',
'if': 'CONFIG_SPICE' } 'if': 'CONFIG_SPICE' }
@ -668,23 +668,23 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-vnc" } # -> { "execute": "query-vnc" }
# <- { "return": { # <- { "return": {
# "enabled":true, # "enabled":true,
# "host":"0.0.0.0", # "host":"0.0.0.0",
# "service":"50402", # "service":"50402",
# "auth":"vnc", # "auth":"vnc",
# "family":"ipv4", # "family":"ipv4",
# "clients":[ # "clients":[
# { # {
# "host":"127.0.0.1", # "host":"127.0.0.1",
# "service":"50401", # "service":"50401",
# "family":"ipv4", # "family":"ipv4",
# "websocket":false # "websocket":false
# } # }
# ] # ]
# } # }
# } # }
## ##
{ 'command': 'query-vnc', 'returns': 'VncInfo', { 'command': 'query-vnc', 'returns': 'VncInfo',
'if': 'CONFIG_VNC' } 'if': 'CONFIG_VNC' }
@ -733,13 +733,13 @@
# #
# Example: # Example:
# #
# <- { "event": "VNC_CONNECTED", # <- { "event": "VNC_CONNECTED",
# "data": { # "data": {
# "server": { "auth": "sasl", "family": "ipv4", "websocket": false, # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
# "service": "5901", "host": "0.0.0.0" }, # "service": "5901", "host": "0.0.0.0" },
# "client": { "family": "ipv4", "service": "58425", # "client": { "family": "ipv4", "service": "58425",
# "host": "127.0.0.1", "websocket": false } }, # "host": "127.0.0.1", "websocket": false } },
# "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
## ##
{ 'event': 'VNC_CONNECTED', { 'event': 'VNC_CONNECTED',
'data': { 'server': 'VncServerInfo', 'data': { 'server': 'VncServerInfo',
@ -760,13 +760,13 @@
# #
# Example: # Example:
# #
# <- { "event": "VNC_INITIALIZED", # <- { "event": "VNC_INITIALIZED",
# "data": { # "data": {
# "server": { "auth": "sasl", "family": "ipv4", "websocket": false, # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
# "service": "5901", "host": "0.0.0.0"}, # "service": "5901", "host": "0.0.0.0"},
# "client": { "family": "ipv4", "service": "46089", "websocket": false, # "client": { "family": "ipv4", "service": "46089", "websocket": false,
# "host": "127.0.0.1", "sasl_username": "luiz" } }, # "host": "127.0.0.1", "sasl_username": "luiz" } },
# "timestamp": { "seconds": 1263475302, "microseconds": 150772 } } # "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
## ##
{ 'event': 'VNC_INITIALIZED', { 'event': 'VNC_INITIALIZED',
'data': { 'server': 'VncServerInfo', 'data': { 'server': 'VncServerInfo',
@ -786,13 +786,13 @@
# #
# Example: # Example:
# #
# <- { "event": "VNC_DISCONNECTED", # <- { "event": "VNC_DISCONNECTED",
# "data": { # "data": {
# "server": { "auth": "sasl", "family": "ipv4", "websocket": false, # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
# "service": "5901", "host": "0.0.0.0" }, # "service": "5901", "host": "0.0.0.0" },
# "client": { "family": "ipv4", "service": "58425", "websocket": false, # "client": { "family": "ipv4", "service": "58425", "websocket": false,
# "host": "127.0.0.1", "sasl_username": "luiz" } }, # "host": "127.0.0.1", "sasl_username": "luiz" } },
# "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
## ##
{ 'event': 'VNC_DISCONNECTED', { 'event': 'VNC_DISCONNECTED',
'data': { 'server': 'VncServerInfo', 'data': { 'server': 'VncServerInfo',
@ -834,22 +834,22 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-mice" } # -> { "execute": "query-mice" }
# <- { "return": [ # <- { "return": [
# { # {
# "name":"QEMU Microsoft Mouse", # "name":"QEMU Microsoft Mouse",
# "index":0, # "index":0,
# "current":false, # "current":false,
# "absolute":false # "absolute":false
# }, # },
# { # {
# "name":"QEMU PS/2 Mouse", # "name":"QEMU PS/2 Mouse",
# "index":1, # "index":1,
# "current":true, # "current":true,
# "absolute":true # "absolute":true
# } # }
# ] # ]
# } # }
## ##
{ 'command': 'query-mice', 'returns': ['MouseInfo'] } { 'command': 'query-mice', 'returns': ['MouseInfo'] }
@ -1044,11 +1044,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "send-key", # -> { "execute": "send-key",
# "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" }, # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
# { "type": "qcode", "data": "alt" }, # { "type": "qcode", "data": "alt" },
# { "type": "qcode", "data": "delete" } ] } } # { "type": "qcode", "data": "delete" } ] } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'send-key', { 'command': 'send-key',
'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } } 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
@ -1270,39 +1270,39 @@
# #
# Examples: # Examples:
# #
# 1. Press left mouse button. # 1. Press left mouse button.
# #
# -> { "execute": "input-send-event", # -> { "execute": "input-send-event",
# "arguments": { "device": "video0", # "arguments": { "device": "video0",
# "events": [ { "type": "btn", # "events": [ { "type": "btn",
# "data" : { "down": true, "button": "left" } } ] } } # "data" : { "down": true, "button": "left" } } ] } }
# <- { "return": {} } # <- { "return": {} }
# #
# -> { "execute": "input-send-event", # -> { "execute": "input-send-event",
# "arguments": { "device": "video0", # "arguments": { "device": "video0",
# "events": [ { "type": "btn", # "events": [ { "type": "btn",
# "data" : { "down": false, "button": "left" } } ] } } # "data" : { "down": false, "button": "left" } } ] } }
# <- { "return": {} } # <- { "return": {} }
# #
# 2. Press ctrl-alt-del. # 2. Press ctrl-alt-del.
# #
# -> { "execute": "input-send-event", # -> { "execute": "input-send-event",
# "arguments": { "events": [ # "arguments": { "events": [
# { "type": "key", "data" : { "down": true, # { "type": "key", "data" : { "down": true,
# "key": {"type": "qcode", "data": "ctrl" } } }, # "key": {"type": "qcode", "data": "ctrl" } } },
# { "type": "key", "data" : { "down": true, # { "type": "key", "data" : { "down": true,
# "key": {"type": "qcode", "data": "alt" } } }, # "key": {"type": "qcode", "data": "alt" } } },
# { "type": "key", "data" : { "down": true, # { "type": "key", "data" : { "down": true,
# "key": {"type": "qcode", "data": "delete" } } } ] } } # "key": {"type": "qcode", "data": "delete" } } } ] } }
# <- { "return": {} } # <- { "return": {} }
# #
# 3. Move mouse pointer to absolute coordinates (20000, 400). # 3. Move mouse pointer to absolute coordinates (20000, 400).
# #
# -> { "execute": "input-send-event" , # -> { "execute": "input-send-event" ,
# "arguments": { "events": [ # "arguments": { "events": [
# { "type": "abs", "data" : { "axis": "x", "value" : 20000 } }, # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
# { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } } # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'input-send-event', { 'command': 'input-send-event',
'data': { '*device': 'str', 'data': { '*device': 'str',
@ -1611,9 +1611,9 @@
# #
# Example: # Example:
# #
# -> { "execute": "display-reload", # -> { "execute": "display-reload",
# "arguments": { "type": "vnc", "tls-certs": true } } # "arguments": { "type": "vnc", "tls-certs": true } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'display-reload', { 'command': 'display-reload',
'data': 'DisplayReloadOptions', 'data': 'DisplayReloadOptions',
@ -1670,11 +1670,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "display-update", # -> { "execute": "display-update",
# "arguments": { "type": "vnc", "addresses": # "arguments": { "type": "vnc", "addresses":
# [ { "type": "inet", "host": "0.0.0.0", # [ { "type": "inet", "host": "0.0.0.0",
# "port": "5901" } ] } } # "port": "5901" } ] } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'display-update', { 'command': 'display-update',
'data': 'DisplayUpdateOptions', 'data': 'DisplayUpdateOptions',
@ -1701,11 +1701,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "client_migrate_info", # -> { "execute": "client_migrate_info",
# "arguments": { "protocol": "spice", # "arguments": { "protocol": "spice",
# "hostname": "virt42.lab.kraxel.org", # "hostname": "virt42.lab.kraxel.org",
# "port": 1234 } } # "port": 1234 } }
# <- { "return": {} } # <- { "return": {} }
## ##
{ 'command': 'client_migrate_info', { 'command': 'client_migrate_info',
'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int', 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',

View File

@ -36,30 +36,30 @@
# #
# Example: # Example:
# #
# -> { "execute": "x-query-virtio" } # -> { "execute": "x-query-virtio" }
# <- { "return": [ # <- { "return": [
# { # {
# "name": "virtio-input", # "name": "virtio-input",
# "path": "/machine/peripheral-anon/device[4]/virtio-backend" # "path": "/machine/peripheral-anon/device[4]/virtio-backend"
# }, # },
# { # {
# "name": "virtio-crypto", # "name": "virtio-crypto",
# "path": "/machine/peripheral/crypto0/virtio-backend" # "path": "/machine/peripheral/crypto0/virtio-backend"
# }, # },
# { # {
# "name": "virtio-scsi", # "name": "virtio-scsi",
# "path": "/machine/peripheral-anon/device[2]/virtio-backend" # "path": "/machine/peripheral-anon/device[2]/virtio-backend"
# }, # },
# { # {
# "name": "virtio-net", # "name": "virtio-net",
# "path": "/machine/peripheral-anon/device[1]/virtio-backend" # "path": "/machine/peripheral-anon/device[1]/virtio-backend"
# }, # },
# { # {
# "name": "virtio-serial", # "name": "virtio-serial",
# "path": "/machine/peripheral-anon/device[0]/virtio-backend" # "path": "/machine/peripheral-anon/device[0]/virtio-backend"
# } # }
# ] # ]
# } # }
## ##
{ 'command': 'x-query-virtio', { 'command': 'x-query-virtio',
'returns': [ 'VirtioInfo' ], 'returns': [ 'VirtioInfo' ],
@ -205,229 +205,229 @@
# #
# Examples: # Examples:
# #
# 1. Poll for the status of virtio-crypto (no vhost-crypto active) # 1. Poll for the status of virtio-crypto (no vhost-crypto active)
# #
# -> { "execute": "x-query-virtio-status", # -> { "execute": "x-query-virtio-status",
# "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend" } # "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend" }
# } # }
# <- { "return": { # <- { "return": {
# "device-endian": "little", # "device-endian": "little",
# "bus-name": "", # "bus-name": "",
# "disable-legacy-check": false, # "disable-legacy-check": false,
# "name": "virtio-crypto", # "name": "virtio-crypto",
# "started": true, # "started": true,
# "device-id": 20, # "device-id": 20,
# "backend-features": {
# "transports": [],
# "dev-features": []
# },
# "start-on-kick": false,
# "isr": 1,
# "broken": false,
# "status": {
# "statuses": [
# "VIRTIO_CONFIG_S_ACKNOWLEDGE: Valid virtio device found",
# "VIRTIO_CONFIG_S_DRIVER: Guest OS compatible with device",
# "VIRTIO_CONFIG_S_FEATURES_OK: Feature negotiation complete",
# "VIRTIO_CONFIG_S_DRIVER_OK: Driver setup and ready"
# ]
# },
# "num-vqs": 2,
# "guest-features": {
# "dev-features": [],
# "transports": [
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)"
# ]
# },
# "host-features": {
# "unknown-dev-features": 1073741824,
# "dev-features": [],
# "transports": [
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
# ]
# },
# "use-guest-notifier-mask": true,
# "vm-running": true,
# "queue-sel": 1,
# "disabled": false,
# "vhost-started": false,
# "use-started": true
# }
# }
#
# 2. Poll for the status of virtio-net (vhost-net is active)
#
# -> { "execute": "x-query-virtio-status",
# "arguments": { "path": "/machine/peripheral-anon/device[1]/virtio-backend" }
# }
# <- { "return": {
# "device-endian": "little",
# "bus-name": "",
# "disabled-legacy-check": false,
# "name": "virtio-net",
# "started": true,
# "device-id": 1,
# "vhost-dev": {
# "n-tmp-sections": 4,
# "n-mem-sections": 4,
# "max-queues": 1,
# "backend-cap": 2,
# "log-size": 0,
# "backend-features": { # "backend-features": {
# "transports": [],
# "dev-features": []
# },
# "start-on-kick": false,
# "isr": 1,
# "broken": false,
# "status": {
# "statuses": [
# "VIRTIO_CONFIG_S_ACKNOWLEDGE: Valid virtio device found",
# "VIRTIO_CONFIG_S_DRIVER: Guest OS compatible with device",
# "VIRTIO_CONFIG_S_FEATURES_OK: Feature negotiation complete",
# "VIRTIO_CONFIG_S_DRIVER_OK: Driver setup and ready"
# ]
# },
# "num-vqs": 2,
# "guest-features": {
# "dev-features": [], # "dev-features": [],
# "transports": []
# },
# "nvqs": 2,
# "protocol-features": {
# "protocols": []
# },
# "vq-index": 0,
# "log-enabled": false,
# "acked-features": {
# "dev-features": [
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers"
# ],
# "transports": [ # "transports": [
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled", # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported", # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)" # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)"
# ] # ]
# }, # },
# "features": { # "host-features": {
# "dev-features": [ # "unknown-dev-features": 1073741824,
# "VHOST_F_LOG_ALL: Logging write descriptors supported", # "dev-features": [],
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers"
# ],
# "transports": [ # "transports": [
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled", # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported", # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
# "VIRTIO_F_IOMMU_PLATFORM: Device can be used on IOMMU platform",
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)", # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts", # "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ" # "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
# ] # ]
# } # },
# }, # "use-guest-notifier-mask": true,
# "backend-features": { # "vm-running": true,
# "dev-features": [ # "queue-sel": 1,
# "VHOST_USER_F_PROTOCOL_FEATURES: Vhost-user protocol features negotiation supported", # "disabled": false,
# "VIRTIO_NET_F_GSO: Handling GSO-type packets supported", # "vhost-started": false,
# "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel", # "use-started": true
# "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported", # }
# "VIRTIO_NET_F_CTRL_RX_EXTRA: Extra RX mode control supported", # }
# "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported", #
# "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported", # 2. Poll for the status of virtio-net (vhost-net is active)
# "VIRTIO_NET_F_CTRL_VQ: Control channel available", #
# "VIRTIO_NET_F_STATUS: Configuration status field available", # -> { "execute": "x-query-virtio-status",
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers", # "arguments": { "path": "/machine/peripheral-anon/device[1]/virtio-backend" }
# "VIRTIO_NET_F_HOST_UFO: Device can receive UFO", # }
# "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN", # <- { "return": {
# "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6", # "device-endian": "little",
# "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4", # "bus-name": "",
# "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO", # "disabled-legacy-check": false,
# "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN", # "name": "virtio-net",
# "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6", # "started": true,
# "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4", # "device-id": 1,
# "VIRTIO_NET_F_MAC: Device has given MAC address", # "vhost-dev": {
# "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported", # "n-tmp-sections": 4,
# "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported", # "n-mem-sections": 4,
# "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported" # "max-queues": 1,
# ], # "backend-cap": 2,
# "transports": [ # "log-size": 0,
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled", # "backend-features": {
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported", # "dev-features": [],
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)", # "transports": []
# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts", # },
# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ" # "nvqs": 2,
# ] # "protocol-features": {
# }, # "protocols": []
# "start-on-kick": false, # },
# "isr": 1, # "vq-index": 0,
# "broken": false, # "log-enabled": false,
# "status": { # "acked-features": {
# "statuses": [ # "dev-features": [
# "VIRTIO_CONFIG_S_ACKNOWLEDGE: Valid virtio device found", # "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers"
# "VIRTIO_CONFIG_S_DRIVER: Guest OS compatible with device", # ],
# "VIRTIO_CONFIG_S_FEATURES_OK: Feature negotiation complete", # "transports": [
# "VIRTIO_CONFIG_S_DRIVER_OK: Driver setup and ready" # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
# ] # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
# }, # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)"
# "num-vqs": 3, # ]
# "guest-features": { # },
# "dev-features": [ # "features": {
# "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel", # "dev-features": [
# "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported", # "VHOST_F_LOG_ALL: Logging write descriptors supported",
# "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported", # "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers"
# "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported", # ],
# "VIRTIO_NET_F_CTRL_VQ: Control channel available", # "transports": [
# "VIRTIO_NET_F_STATUS: Configuration status field available", # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers", # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
# "VIRTIO_NET_F_HOST_UFO: Device can receive UFO", # "VIRTIO_F_IOMMU_PLATFORM: Device can be used on IOMMU platform",
# "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN", # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
# "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6", # "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
# "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4", # "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
# "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO", # ]
# "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN", # }
# "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6", # },
# "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4", # "backend-features": {
# "VIRTIO_NET_F_MAC: Device has given MAC address", # "dev-features": [
# "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported", # "VHOST_USER_F_PROTOCOL_FEATURES: Vhost-user protocol features negotiation supported",
# "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported", # "VIRTIO_NET_F_GSO: Handling GSO-type packets supported",
# "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported" # "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel",
# ], # "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported",
# "transports": [ # "VIRTIO_NET_F_CTRL_RX_EXTRA: Extra RX mode control supported",
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled", # "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported",
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported", # "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported",
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)" # "VIRTIO_NET_F_CTRL_VQ: Control channel available",
# ] # "VIRTIO_NET_F_STATUS: Configuration status field available",
# }, # "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers",
# "host-features": { # "VIRTIO_NET_F_HOST_UFO: Device can receive UFO",
# "dev-features": [ # "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN",
# "VHOST_USER_F_PROTOCOL_FEATURES: Vhost-user protocol features negotiation supported", # "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6",
# "VIRTIO_NET_F_GSO: Handling GSO-type packets supported", # "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4",
# "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel", # "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO",
# "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported", # "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN",
# "VIRTIO_NET_F_CTRL_RX_EXTRA: Extra RX mode control supported", # "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6",
# "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported", # "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4",
# "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported", # "VIRTIO_NET_F_MAC: Device has given MAC address",
# "VIRTIO_NET_F_CTRL_VQ: Control channel available", # "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported",
# "VIRTIO_NET_F_STATUS: Configuration status field available", # "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported",
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers", # "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported"
# "VIRTIO_NET_F_HOST_UFO: Device can receive UFO", # ],
# "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN", # "transports": [
# "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6", # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
# "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4", # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
# "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO", # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
# "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN", # "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
# "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6", # "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
# "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4", # ]
# "VIRTIO_NET_F_MAC: Device has given MAC address", # },
# "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported", # "start-on-kick": false,
# "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported", # "isr": 1,
# "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported" # "broken": false,
# ], # "status": {
# "transports": [ # "statuses": [
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled", # "VIRTIO_CONFIG_S_ACKNOWLEDGE: Valid virtio device found",
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported", # "VIRTIO_CONFIG_S_DRIVER: Guest OS compatible with device",
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)", # "VIRTIO_CONFIG_S_FEATURES_OK: Feature negotiation complete",
# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts", # "VIRTIO_CONFIG_S_DRIVER_OK: Driver setup and ready"
# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ" # ]
# ] # },
# }, # "num-vqs": 3,
# "use-guest-notifier-mask": true, # "guest-features": {
# "vm-running": true, # "dev-features": [
# "queue-sel": 2, # "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel",
# "disabled": false, # "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported",
# "vhost-started": true, # "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported",
# "use-started": true # "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported",
# } # "VIRTIO_NET_F_CTRL_VQ: Control channel available",
# } # "VIRTIO_NET_F_STATUS: Configuration status field available",
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers",
# "VIRTIO_NET_F_HOST_UFO: Device can receive UFO",
# "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN",
# "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6",
# "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4",
# "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO",
# "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN",
# "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6",
# "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4",
# "VIRTIO_NET_F_MAC: Device has given MAC address",
# "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported",
# "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported",
# "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported"
# ],
# "transports": [
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)"
# ]
# },
# "host-features": {
# "dev-features": [
# "VHOST_USER_F_PROTOCOL_FEATURES: Vhost-user protocol features negotiation supported",
# "VIRTIO_NET_F_GSO: Handling GSO-type packets supported",
# "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel",
# "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported",
# "VIRTIO_NET_F_CTRL_RX_EXTRA: Extra RX mode control supported",
# "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported",
# "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported",
# "VIRTIO_NET_F_CTRL_VQ: Control channel available",
# "VIRTIO_NET_F_STATUS: Configuration status field available",
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers",
# "VIRTIO_NET_F_HOST_UFO: Device can receive UFO",
# "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN",
# "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6",
# "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4",
# "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO",
# "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN",
# "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6",
# "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4",
# "VIRTIO_NET_F_MAC: Device has given MAC address",
# "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported",
# "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported",
# "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported"
# ],
# "transports": [
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
# ]
# },
# "use-guest-notifier-mask": true,
# "vm-running": true,
# "queue-sel": 2,
# "disabled": false,
# "vhost-started": true,
# "use-started": true
# }
# }
## ##
{ 'command': 'x-query-virtio-status', { 'command': 'x-query-virtio-status',
'data': { 'path': 'str' }, 'data': { 'path': 'str' },
@ -570,52 +570,52 @@
# #
# Examples: # Examples:
# #
# 1. Get VirtQueueStatus for virtio-vsock (vhost-vsock running) # 1. Get VirtQueueStatus for virtio-vsock (vhost-vsock running)
# #
# -> { "execute": "x-query-virtio-queue-status", # -> { "execute": "x-query-virtio-queue-status",
# "arguments": { "path": "/machine/peripheral/vsock0/virtio-backend", # "arguments": { "path": "/machine/peripheral/vsock0/virtio-backend",
# "queue": 1 } # "queue": 1 }
# } # }
# <- { "return": { # <- { "return": {
# "signalled-used": 0, # "signalled-used": 0,
# "inuse": 0, # "inuse": 0,
# "name": "vhost-vsock", # "name": "vhost-vsock",
# "vring-align": 4096, # "vring-align": 4096,
# "vring-desc": 5217370112, # "vring-desc": 5217370112,
# "signalled-used-valid": false, # "signalled-used-valid": false,
# "vring-num-default": 128, # "vring-num-default": 128,
# "vring-avail": 5217372160, # "vring-avail": 5217372160,
# "queue-index": 1, # "queue-index": 1,
# "last-avail-idx": 0, # "last-avail-idx": 0,
# "vring-used": 5217372480, # "vring-used": 5217372480,
# "used-idx": 0, # "used-idx": 0,
# "vring-num": 128 # "vring-num": 128
# } # }
# } # }
# #
# 2. Get VirtQueueStatus for virtio-serial (no vhost) # 2. Get VirtQueueStatus for virtio-serial (no vhost)
# #
# -> { "execute": "x-query-virtio-queue-status", # -> { "execute": "x-query-virtio-queue-status",
# "arguments": { "path": "/machine/peripheral-anon/device[0]/virtio-backend", # "arguments": { "path": "/machine/peripheral-anon/device[0]/virtio-backend",
# "queue": 20 } # "queue": 20 }
# } # }
# <- { "return": { # <- { "return": {
# "signalled-used": 0, # "signalled-used": 0,
# "inuse": 0, # "inuse": 0,
# "name": "virtio-serial", # "name": "virtio-serial",
# "vring-align": 4096, # "vring-align": 4096,
# "vring-desc": 5182074880, # "vring-desc": 5182074880,
# "signalled-used-valid": false, # "signalled-used-valid": false,
# "vring-num-default": 128, # "vring-num-default": 128,
# "vring-avail": 5182076928, # "vring-avail": 5182076928,
# "queue-index": 20, # "queue-index": 20,
# "last-avail-idx": 0, # "last-avail-idx": 0,
# "vring-used": 5182077248, # "vring-used": 5182077248,
# "used-idx": 0, # "used-idx": 0,
# "shadow-avail-idx": 0, # "shadow-avail-idx": 0,
# "vring-num": 128 # "vring-num": 128
# } # }
# } # }
## ##
{ 'command': 'x-query-virtio-queue-status', { 'command': 'x-query-virtio-queue-status',
'data': { 'path': 'str', 'queue': 'uint16' }, 'data': { 'path': 'str', 'queue': 'uint16' },
@ -690,51 +690,51 @@
# #
# Examples: # Examples:
# #
# 1. Get vhost_virtqueue status for vhost-crypto # 1. Get vhost_virtqueue status for vhost-crypto
# #
# -> { "execute": "x-query-virtio-vhost-queue-status", # -> { "execute": "x-query-virtio-vhost-queue-status",
# "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend", # "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend",
# "queue": 0 } # "queue": 0 }
# } # }
# <- { "return": { # <- { "return": {
# "avail-phys": 5216124928, # "avail-phys": 5216124928,
# "name": "virtio-crypto", # "name": "virtio-crypto",
# "used-phys": 5216127040, # "used-phys": 5216127040,
# "avail-size": 2054, # "avail-size": 2054,
# "desc-size": 16384, # "desc-size": 16384,
# "used-size": 8198, # "used-size": 8198,
# "desc": 140141447430144, # "desc": 140141447430144,
# "num": 1024, # "num": 1024,
# "call": 0, # "call": 0,
# "avail": 140141447446528, # "avail": 140141447446528,
# "desc-phys": 5216108544, # "desc-phys": 5216108544,
# "used": 140141447448640, # "used": 140141447448640,
# "kick": 0 # "kick": 0
# } # }
# } # }
# #
# 2. Get vhost_virtqueue status for vhost-vsock # 2. Get vhost_virtqueue status for vhost-vsock
# #
# -> { "execute": "x-query-virtio-vhost-queue-status", # -> { "execute": "x-query-virtio-vhost-queue-status",
# "arguments": { "path": "/machine/peripheral/vsock0/virtio-backend", # "arguments": { "path": "/machine/peripheral/vsock0/virtio-backend",
# "queue": 0 } # "queue": 0 }
# } # }
# <- { "return": { # <- { "return": {
# "avail-phys": 5182261248, # "avail-phys": 5182261248,
# "name": "vhost-vsock", # "name": "vhost-vsock",
# "used-phys": 5182261568, # "used-phys": 5182261568,
# "avail-size": 262, # "avail-size": 262,
# "desc-size": 2048, # "desc-size": 2048,
# "used-size": 1030, # "used-size": 1030,
# "desc": 140141413580800, # "desc": 140141413580800,
# "num": 128, # "num": 128,
# "call": 0, # "call": 0,
# "avail": 140141413582848, # "avail": 140141413582848,
# "desc-phys": 5182259200, # "desc-phys": 5182259200,
# "used": 140141413583168, # "used": 140141413583168,
# "kick": 0 # "kick": 0
# } # }
# } # }
## ##
{ 'command': 'x-query-virtio-vhost-queue-status', { 'command': 'x-query-virtio-vhost-queue-status',
'data': { 'path': 'str', 'queue': 'uint16' }, 'data': { 'path': 'str', 'queue': 'uint16' },
@ -839,90 +839,90 @@
# #
# Examples: # Examples:
# #
# 1. Introspect on virtio-net's VirtQueue 0 at index 5 # 1. Introspect on virtio-net's VirtQueue 0 at index 5
# #
# -> { "execute": "x-query-virtio-queue-element", # -> { "execute": "x-query-virtio-queue-element",
# "arguments": { "path": "/machine/peripheral-anon/device[1]/virtio-backend", # "arguments": { "path": "/machine/peripheral-anon/device[1]/virtio-backend",
# "queue": 0, # "queue": 0,
# "index": 5 } # "index": 5 }
# } # }
# <- { "return": { # <- { "return": {
# "index": 5, # "index": 5,
# "name": "virtio-net", # "name": "virtio-net",
# "descs": [ # "descs": [
# { # {
# "flags": ["write"], # "flags": ["write"],
# "len": 1536, # "len": 1536,
# "addr": 5257305600 # "addr": 5257305600
# }
# ],
# "avail": {
# "idx": 256,
# "flags": 0,
# "ring": 5
# },
# "used": {
# "idx": 13,
# "flags": 0
# } # }
# ],
# "avail": {
# "idx": 256,
# "flags": 0,
# "ring": 5
# },
# "used": {
# "idx": 13,
# "flags": 0
# } # }
# } # }
# }
# #
# 2. Introspect on virtio-crypto's VirtQueue 1 at head # 2. Introspect on virtio-crypto's VirtQueue 1 at head
# #
# -> { "execute": "x-query-virtio-queue-element", # -> { "execute": "x-query-virtio-queue-element",
# "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend", # "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend",
# "queue": 1 } # "queue": 1 }
# } # }
# <- { "return": { # <- { "return": {
# "index": 0, # "index": 0,
# "name": "virtio-crypto", # "name": "virtio-crypto",
# "descs": [ # "descs": [
# { # {
# "flags": [], # "flags": [],
# "len": 0, # "len": 0,
# "addr": 8080268923184214134 # "addr": 8080268923184214134
# }
# ],
# "avail": {
# "idx": 280,
# "flags": 0,
# "ring": 0
# },
# "used": {
# "idx": 280,
# "flags": 0
# } # }
# ],
# "avail": {
# "idx": 280,
# "flags": 0,
# "ring": 0
# },
# "used": {
# "idx": 280,
# "flags": 0
# } # }
# } # }
# }
# #
# 3. Introspect on virtio-scsi's VirtQueue 2 at head # 3. Introspect on virtio-scsi's VirtQueue 2 at head
# #
# -> { "execute": "x-query-virtio-queue-element", # -> { "execute": "x-query-virtio-queue-element",
# "arguments": { "path": "/machine/peripheral-anon/device[2]/virtio-backend", # "arguments": { "path": "/machine/peripheral-anon/device[2]/virtio-backend",
# "queue": 2 } # "queue": 2 }
# } # }
# <- { "return": { # <- { "return": {
# "index": 19, # "index": 19,
# "name": "virtio-scsi", # "name": "virtio-scsi",
# "descs": [ # "descs": [
# { # {
# "flags": ["used", "indirect", "write"], # "flags": ["used", "indirect", "write"],
# "len": 4099327944, # "len": 4099327944,
# "addr": 12055409292258155293 # "addr": 12055409292258155293
# }
# ],
# "avail": {
# "idx": 1147,
# "flags": 0,
# "ring": 19
# },
# "used": {
# "idx": 280,
# "flags": 0
# } # }
# ],
# "avail": {
# "idx": 1147,
# "flags": 0,
# "ring": 19
# },
# "used": {
# "idx": 280,
# "flags": 0
# } # }
# } # }
# }
## ##
{ 'command': 'x-query-virtio-queue-element', { 'command': 'x-query-virtio-queue-element',
'data': { 'path': 'str', 'queue': 'uint16', '*index': 'uint16' }, 'data': { 'path': 'str', 'queue': 'uint16', '*index': 'uint16' },

View File

@ -84,13 +84,13 @@
# #
# Example: # Example:
# #
# -> { "execute": "yank", # -> { "execute": "yank",
# "arguments": { # "arguments": {
# "instances": [ # "instances": [
# { "type": "block-node", # { "type": "block-node",
# "node-name": "nbd0" } # "node-name": "nbd0" }
# ] } } # ] } }
# <- { "return": {} } # <- { "return": {} }
# #
# Since: 6.0 # Since: 6.0
## ##
@ -107,11 +107,11 @@
# #
# Example: # Example:
# #
# -> { "execute": "query-yank" } # -> { "execute": "query-yank" }
# <- { "return": [ # <- { "return": [
# { "type": "block-node", # { "type": "block-node",
# "node-name": "nbd0" } # "node-name": "nbd0" }
# ] } # ] }
# #
# Since: 6.0 # Since: 6.0
## ##

View File

@ -134,8 +134,8 @@ class QAPISchemaParser:
info = self.info info = self.info
if self.tok == '#': if self.tok == '#':
self.reject_expr_doc(cur_doc) self.reject_expr_doc(cur_doc)
for cur_doc in self.get_doc(info): cur_doc = self.get_doc()
self.docs.append(cur_doc) self.docs.append(cur_doc)
continue continue
expr = self.get_expr() expr = self.get_expr()
@ -414,39 +414,177 @@ class QAPISchemaParser:
self, "expected '{', '[', string, or boolean") self, "expected '{', '[', string, or boolean")
return expr return expr
def get_doc(self, info: QAPISourceInfo) -> List['QAPIDoc']: def get_doc_line(self) -> Optional[str]:
if self.tok != '#':
raise QAPIParseError(
self, "documentation comment must end with '##'")
assert isinstance(self.val, str)
if self.val.startswith('##'):
# End of doc comment
if self.val != '##':
raise QAPIParseError(
self, "junk after '##' at end of documentation comment")
return None
if self.val == '#':
return ''
if self.val[1] != ' ':
raise QAPIParseError(self, "missing space after #")
return self.val[2:].rstrip()
@staticmethod
def _match_at_name_colon(string: str) -> Optional[Match[str]]:
return re.match(r'@([^:]*): *', string)
def get_doc_indented(self, doc: 'QAPIDoc') -> Optional[str]:
self.accept(False)
line = self.get_doc_line()
while line == '':
doc.append_line(line)
self.accept(False)
line = self.get_doc_line()
if line is None:
return line
indent = must_match(r'\s*', line).end()
if not indent:
return line
doc.append_line(line[indent:])
prev_line_blank = False
while True:
self.accept(False)
line = self.get_doc_line()
if line is None:
return line
if self._match_at_name_colon(line):
return line
cur_indent = must_match(r'\s*', line).end()
if line != '' and cur_indent < indent:
if prev_line_blank:
return line
raise QAPIParseError(
self,
"unexpected de-indent (expected at least %d spaces)" %
indent)
doc.append_line(line[indent:])
prev_line_blank = True
def get_doc_paragraph(self, doc: 'QAPIDoc') -> Optional[str]:
while True:
self.accept(False)
line = self.get_doc_line()
if line is None:
return line
if line == '':
return line
doc.append_line(line)
def get_doc(self) -> 'QAPIDoc':
if self.val != '##': if self.val != '##':
raise QAPIParseError( raise QAPIParseError(
self, "junk after '##' at start of documentation comment") self, "junk after '##' at start of documentation comment")
info = self.info
docs = []
cur_doc = QAPIDoc(self, info)
self.accept(False) self.accept(False)
while self.tok == '#': line = self.get_doc_line()
assert isinstance(self.val, str) if line is not None and line.startswith('@'):
if self.val.startswith('##'): # Definition documentation
# End of doc comment if not line.endswith(':'):
if self.val != '##': raise QAPIParseError(self, "line should end with ':'")
raise QAPIParseError( # Invalid names are not checked here, but the name
self, # provided *must* match the following definition,
"junk after '##' at end of documentation comment") # which *is* validated in expr.py.
cur_doc.end_comment() symbol = line[1:-1]
docs.append(cur_doc) if not symbol:
self.accept() raise QAPIParseError(self, "name required after '@'")
return docs doc = QAPIDoc(info, symbol)
if self.val.startswith('# ='): self.accept(False)
if cur_doc.symbol: line = self.get_doc_line()
no_more_args = False
while line is not None:
# Blank lines
while line == '':
self.accept(False)
line = self.get_doc_line()
if line is None:
break
# Non-blank line, first of a section
if line == 'Features:':
if doc.features:
raise QAPIParseError(
self, "duplicated 'Features:' line")
self.accept(False)
line = self.get_doc_line()
while line == '':
self.accept(False)
line = self.get_doc_line()
while (line is not None
and (match := self._match_at_name_colon(line))):
doc.new_feature(self.info, match.group(1))
text = line[match.end():]
if text:
doc.append_line(text)
line = self.get_doc_indented(doc)
if not doc.features:
raise QAPIParseError(
self, 'feature descriptions expected')
no_more_args = True
elif match := self._match_at_name_colon(line):
# description
if no_more_args:
raise QAPIParseError(
self,
"description of '@%s:' follows a section"
% match.group(1))
while (line is not None
and (match := self._match_at_name_colon(line))):
doc.new_argument(self.info, match.group(1))
text = line[match.end():]
if text:
doc.append_line(text)
line = self.get_doc_indented(doc)
no_more_args = True
elif match := re.match(
r'(Returns|Since|Notes?|Examples?|TODO): *',
line):
# tagged section
doc.new_tagged_section(self.info, match.group(1))
text = line[match.end():]
if text:
doc.append_line(text)
line = self.get_doc_indented(doc)
no_more_args = True
elif line.startswith('='):
raise QAPIParseError( raise QAPIParseError(
self, self,
"unexpected '=' markup in definition documentation") "unexpected '=' markup in definition documentation")
if cur_doc.body.text: else:
cur_doc.end_comment() # tag-less paragraph
docs.append(cur_doc) doc.ensure_untagged_section(self.info)
cur_doc = QAPIDoc(self, info) doc.append_line(line)
cur_doc.append(self.val) line = self.get_doc_paragraph(doc)
self.accept(False) else:
# Free-form documentation
doc = QAPIDoc(info)
doc.ensure_untagged_section(self.info)
first = True
while line is not None:
if match := self._match_at_name_colon(line):
raise QAPIParseError(
self,
"'@%s:' not allowed in free-form documentation"
% match.group(1))
if line.startswith('='):
if not first:
raise QAPIParseError(
self,
"'=' heading must come first in a comment block")
doc.append_line(line)
self.accept(False)
line = self.get_doc_line()
first = False
raise QAPIParseError(self, "documentation comment must end with '##'") self.accept(False)
doc.end()
return doc
class QAPIDoc: class QAPIDoc:
@ -469,275 +607,88 @@ class QAPIDoc:
""" """
class Section: class Section:
# pylint: disable=too-few-public-methods def __init__(self, info: QAPISourceInfo,
def __init__(self, parser: QAPISchemaParser, tag: Optional[str] = None):
name: Optional[str] = None): # section source info, i.e. where it begins
# parser, for error messages about indentation self.info = info
self._parser = parser # section tag, if any ('Returns', '@name', ...)
# optional section name (argument/member or section name) self.tag = tag
self.name = name # section text without tag
# section text without section name
self.text = '' self.text = ''
# indentation to strip (None means indeterminate)
self._indent = None if self.name else 0
def append(self, line: str) -> None:
line = line.rstrip()
if line:
indent = must_match(r'\s*', line).end()
if self._indent is None:
# indeterminate indentation
if self.text != '':
# non-blank, non-first line determines indentation
self._indent = indent
elif indent < self._indent:
raise QAPIParseError(
self._parser,
"unexpected de-indent (expected at least %d spaces)" %
self._indent)
line = line[self._indent:]
def append_line(self, line: str) -> None:
self.text += line + '\n' self.text += line + '\n'
class ArgSection(Section): class ArgSection(Section):
def __init__(self, parser: QAPISchemaParser, def __init__(self, info: QAPISourceInfo, tag: str):
name: str): super().__init__(info, tag)
super().__init__(parser, name)
self.member: Optional['QAPISchemaMember'] = None self.member: Optional['QAPISchemaMember'] = None
def connect(self, member: 'QAPISchemaMember') -> None: def connect(self, member: 'QAPISchemaMember') -> None:
self.member = member self.member = member
class NullSection(Section): def __init__(self, info: QAPISourceInfo, symbol: Optional[str] = None):
""" # info points to the doc comment block's first line
Immutable dummy section for use at the end of a doc block.
"""
# pylint: disable=too-few-public-methods
def append(self, line: str) -> None:
assert False, "Text appended after end_comment() called."
def __init__(self, parser: QAPISchemaParser, info: QAPISourceInfo):
# self._parser is used to report errors with QAPIParseError. The
# resulting error position depends on the state of the parser.
# It happens to be the beginning of the comment. More or less
# servicable, but action at a distance.
self._parser = parser
self.info = info self.info = info
self.symbol: Optional[str] = None # definition doc's symbol, None for free-form doc
self.body = QAPIDoc.Section(parser) self.symbol: Optional[str] = symbol
# dicts mapping parameter/feature names to their ArgSection # the sections in textual order
self.args: Dict[str, QAPIDoc.ArgSection] = OrderedDict() self.all_sections: List[QAPIDoc.Section] = [QAPIDoc.Section(info)]
self.features: Dict[str, QAPIDoc.ArgSection] = OrderedDict() # the body section
self.body: Optional[QAPIDoc.Section] = self.all_sections[0]
# dicts mapping parameter/feature names to their description
self.args: Dict[str, QAPIDoc.ArgSection] = {}
self.features: Dict[str, QAPIDoc.ArgSection] = {}
# sections other than .body, .args, .features
self.sections: List[QAPIDoc.Section] = [] self.sections: List[QAPIDoc.Section] = []
# the current section
self._section = self.body
self._append_line = self._append_body_line
def has_section(self, name: str) -> bool: def end(self) -> None:
"""Return True if we have a section with this name.""" for section in self.all_sections:
for i in self.sections: section.text = section.text.strip('\n')
if i.name == name: if section.tag is not None and section.text == '':
return True raise QAPISemError(
return False section.info, "text required after '%s:'" % section.tag)
def append(self, line: str) -> None: def ensure_untagged_section(self, info: QAPISourceInfo) -> None:
""" if self.all_sections and not self.all_sections[-1].tag:
Parse a comment line and add it to the documentation. # extend current section
self.all_sections[-1].text += '\n'
The way that the line is dealt with depends on which part of
the documentation we're parsing right now:
* The body section: ._append_line is ._append_body_line
* An argument section: ._append_line is ._append_args_line
* A features section: ._append_line is ._append_features_line
* An additional section: ._append_line is ._append_various_line
"""
line = line[1:]
if not line:
self._append_freeform(line)
return return
# start new section
section = self.Section(info)
self.sections.append(section)
self.all_sections.append(section)
if line[0] != ' ': def new_tagged_section(self, info: QAPISourceInfo, tag: str) -> None:
raise QAPIParseError(self._parser, "missing space after #") if tag in ('Returns', 'Since'):
line = line[1:] for section in self.all_sections:
self._append_line(line) if isinstance(section, self.ArgSection):
continue
if section.tag == tag:
raise QAPISemError(
info, "duplicated '%s' section" % tag)
section = self.Section(info, tag)
self.sections.append(section)
self.all_sections.append(section)
def end_comment(self) -> None: def _new_description(self, info: QAPISourceInfo, name: str,
self._switch_section(QAPIDoc.NullSection(self._parser)) desc: Dict[str, ArgSection]) -> None:
@staticmethod
def _match_at_name_colon(string: str) -> Optional[Match[str]]:
return re.match(r'@([^:]*): *', string)
@staticmethod
def _match_section_tag(string: str) -> Optional[Match[str]]:
return re.match(r'(Returns|Since|Notes?|Examples?|TODO): *', string)
def _append_body_line(self, line: str) -> None:
"""
Process a line of documentation text in the body section.
If this a symbol line and it is the section's first line, this
is a definition documentation block for that symbol.
If it's a definition documentation block, another symbol line
begins the argument section for the argument named by it, and
a section tag begins an additional section. Start that
section and append the line to it.
Else, append the line to the current section.
"""
# FIXME not nice: things like '# @foo:' and '# @foo: ' aren't
# recognized, and get silently treated as ordinary text
if not self.symbol and not self.body.text and line.startswith('@'):
if not line.endswith(':'):
raise QAPIParseError(self._parser, "line should end with ':'")
self.symbol = line[1:-1]
# Invalid names are not checked here, but the name provided MUST
# match the following definition, which *is* validated in expr.py.
if not self.symbol:
raise QAPIParseError(
self._parser, "name required after '@'")
elif self.symbol:
# This is a definition documentation block
if self._match_at_name_colon(line):
self._append_line = self._append_args_line
self._append_args_line(line)
elif line == 'Features:':
self._append_line = self._append_features_line
elif self._match_section_tag(line):
self._append_line = self._append_various_line
self._append_various_line(line)
else:
self._append_freeform(line)
else:
# This is a free-form documentation block
self._append_freeform(line)
def _append_args_line(self, line: str) -> None:
"""
Process a line of documentation text in an argument section.
A symbol line begins the next argument section, a section tag
section or a non-indented line after a blank line begins an
additional section. Start that section and append the line to
it.
Else, append the line to the current section.
"""
match = self._match_at_name_colon(line)
if match:
line = line[match.end():]
self._start_args_section(match.group(1))
elif self._match_section_tag(line):
self._append_line = self._append_various_line
self._append_various_line(line)
return
elif (self._section.text.endswith('\n\n')
and line and not line[0].isspace()):
if line == 'Features:':
self._append_line = self._append_features_line
else:
self._start_section()
self._append_line = self._append_various_line
self._append_various_line(line)
return
self._append_freeform(line)
def _append_features_line(self, line: str) -> None:
match = self._match_at_name_colon(line)
if match:
line = line[match.end():]
self._start_features_section(match.group(1))
elif self._match_section_tag(line):
self._append_line = self._append_various_line
self._append_various_line(line)
return
elif (self._section.text.endswith('\n\n')
and line and not line[0].isspace()):
self._start_section()
self._append_line = self._append_various_line
self._append_various_line(line)
return
self._append_freeform(line)
def _append_various_line(self, line: str) -> None:
"""
Process a line of documentation text in an additional section.
A symbol line is an error.
A section tag begins an additional section. Start that
section and append the line to it.
Else, append the line to the current section.
"""
match = self._match_at_name_colon(line)
if match:
raise QAPIParseError(self._parser,
"description of '@%s:' follows a section"
% match.group(1))
match = self._match_section_tag(line)
if match:
line = line[match.end():]
self._start_section(match.group(1))
self._append_freeform(line)
def _start_symbol_section(
self,
symbols_dict: Dict[str, 'QAPIDoc.ArgSection'],
name: str) -> None:
# FIXME invalid names other than the empty string aren't flagged
if not name: if not name:
raise QAPIParseError(self._parser, "invalid parameter name") raise QAPISemError(info, "invalid parameter name")
if name in symbols_dict: if name in desc:
raise QAPIParseError(self._parser, raise QAPISemError(info, "'%s' parameter name duplicated" % name)
"'%s' parameter name duplicated" % name) section = self.ArgSection(info, '@' + name)
assert not self.sections self.all_sections.append(section)
new_section = QAPIDoc.ArgSection(self._parser, name) desc[name] = section
self._switch_section(new_section)
symbols_dict[name] = new_section
def _start_args_section(self, name: str) -> None: def new_argument(self, info: QAPISourceInfo, name: str) -> None:
self._start_symbol_section(self.args, name) self._new_description(info, name, self.args)
def _start_features_section(self, name: str) -> None: def new_feature(self, info: QAPISourceInfo, name: str) -> None:
self._start_symbol_section(self.features, name) self._new_description(info, name, self.features)
def _start_section(self, name: Optional[str] = None) -> None: def append_line(self, line: str) -> None:
if name in ('Returns', 'Since') and self.has_section(name): self.all_sections[-1].append_line(line)
raise QAPIParseError(self._parser,
"duplicated '%s' section" % name)
new_section = QAPIDoc.Section(self._parser, name)
self._switch_section(new_section)
self.sections.append(new_section)
def _switch_section(self, new_section: 'QAPIDoc.Section') -> None:
text = self._section.text = self._section.text.strip('\n')
# Only the 'body' section is allowed to have an empty body.
# All other sections, including anonymous ones, must have text.
if self._section != self.body and not text:
# We do not create anonymous sections unless there is
# something to put in them; this is a parser bug.
assert self._section.name
raise QAPIParseError(
self._parser,
"empty doc section '%s'" % self._section.name)
self._section = new_section
def _append_freeform(self, line: str) -> None:
match = re.match(r'(@\S+:)', line)
if match:
raise QAPIParseError(self._parser,
"'%s' not allowed in free-form documentation"
% match.group(1))
self._section.append(line)
def connect_member(self, member: 'QAPISchemaMember') -> None: def connect_member(self, member: 'QAPISchemaMember') -> None:
if member.name not in self.args: if member.name not in self.args:
@ -745,8 +696,8 @@ class QAPIDoc:
raise QAPISemError(member.info, raise QAPISemError(member.info,
"%s '%s' lacks documentation" "%s '%s' lacks documentation"
% (member.role, member.name)) % (member.role, member.name))
self.args[member.name] = QAPIDoc.ArgSection(self._parser, self.args[member.name] = QAPIDoc.ArgSection(
member.name) self.info, '@' + member.name)
self.args[member.name].connect(member) self.args[member.name].connect(member)
def connect_feature(self, feature: 'QAPISchemaFeature') -> None: def connect_feature(self, feature: 'QAPISchemaFeature') -> None:
@ -757,9 +708,13 @@ class QAPIDoc:
self.features[feature.name].connect(feature) self.features[feature.name].connect(feature)
def check_expr(self, expr: QAPIExpression) -> None: def check_expr(self, expr: QAPIExpression) -> None:
if self.has_section('Returns') and 'command' not in expr: if 'command' not in expr:
raise QAPISemError(self.info, sec = next((sec for sec in self.sections
"'Returns:' is only valid for commands") if sec.tag == 'Returns'),
None)
if sec:
raise QAPISemError(sec.info,
"'Returns:' is only valid for commands")
def check(self) -> None: def check(self) -> None:
@ -770,7 +725,7 @@ class QAPIDoc:
if not section.member] if not section.member]
if bogus: if bogus:
raise QAPISemError( raise QAPISemError(
self.info, args[bogus[0]].info,
"documented %s%s '%s' %s not exist" % ( "documented %s%s '%s' %s not exist" % (
what, what,
"s" if len(bogus) > 1 else "", "s" if len(bogus) > 1 else "",

View File

@ -95,10 +95,6 @@ class QAPISchemaEntity:
for f in self.features: for f in self.features:
doc.connect_feature(f) doc.connect_feature(f)
def check_doc(self):
if self.doc:
self.doc.check()
def _set_module(self, schema, info): def _set_module(self, schema, info):
assert self._checked assert self._checked
fname = info.fname if info else QAPISchemaModule.BUILTIN_MODULE_NAME fname = info.fname if info else QAPISchemaModule.BUILTIN_MODULE_NAME
@ -1223,9 +1219,10 @@ class QAPISchema:
for ent in self._entity_list: for ent in self._entity_list:
ent.check(self) ent.check(self)
ent.connect_doc() ent.connect_doc()
ent.check_doc()
for ent in self._entity_list: for ent in self._entity_list:
ent.set_module(self) ent.set_module(self)
for doc in self.docs:
doc.check()
def visit(self, visitor): def visit(self, visitor):
visitor.visit_begin(self) visitor.visit_begin(self)

View File

@ -1 +1 @@
doc-bad-alternate-member.json:3: documented members 'aa', 'bb' do not exist doc-bad-alternate-member.json:7: documented members 'aa', 'bb' do not exist

View File

@ -1 +1 @@
doc-bad-boxed-command-arg.json:9: documented member 'a' does not exist doc-bad-boxed-command-arg.json:11: documented member 'a' does not exist

View File

@ -1 +1 @@
doc-bad-command-arg.json:3: documented member 'b' does not exist doc-bad-command-arg.json:6: documented member 'b' does not exist

View File

@ -1 +1 @@
doc-bad-enum-member.json:3: documented member 'a' does not exist doc-bad-enum-member.json:5: documented member 'a' does not exist

View File

@ -1 +1 @@
doc-bad-event-arg.json:3: documented member 'a' does not exist doc-bad-event-arg.json:5: documented member 'a' does not exist

View File

@ -1 +1 @@
doc-bad-feature.json:3: documented feature 'a' does not exist doc-bad-feature.json:7: documented feature 'a' does not exist

View File

@ -1 +1 @@
doc-bad-union-member.json:3: documented members 'a', 'b' do not exist doc-bad-union-member.json:5: documented members 'a', 'b' do not exist

View File

@ -0,0 +1 @@
doc-duplicate-features.json:9:1: duplicated 'Features:' line

View File

@ -0,0 +1,11 @@
# Duplicate 'Features:' line
##
# @foo:
#
# Features:
# @feat: mumble
#
# Features:
##
{ 'command': 'foo', 'features': ['feat'] }

View File

@ -1 +1 @@
doc-duplicated-arg.json:6:1: 'a' parameter name duplicated doc-duplicated-arg.json:6: 'a' parameter name duplicated

View File

@ -1 +1 @@
doc-duplicated-return.json:7:1: duplicated 'Returns' section doc-duplicated-return.json:8: duplicated 'Returns' section

View File

@ -4,5 +4,6 @@
# @foo: # @foo:
# #
# Returns: 0 # Returns: 0
#
# Returns: 1 # Returns: 1
## ##

View File

@ -1 +1 @@
doc-duplicated-since.json:7:1: duplicated 'Since' section doc-duplicated-since.json:8: duplicated 'Since' section

View File

@ -4,5 +4,6 @@
# @foo: # @foo:
# #
# Since: 0 # Since: 0
#
# Since: 1 # Since: 1
## ##

View File

@ -1 +1 @@
doc-empty-arg.json:5:1: invalid parameter name doc-empty-arg.json:5: invalid parameter name

View File

@ -0,0 +1 @@
doc-empty-features.json:8:1: feature descriptions expected

View File

@ -0,0 +1,10 @@
# 'Features:' line not followed by feature descriptions
##
# @foo:
#
# Features:
#
# not a description
##
{ 'command': 'foo' }

View File

View File

@ -1 +1 @@
doc-empty-section.json:7:1: empty doc section 'Note' doc-empty-section.json:6: text required after 'Note:'

View File

@ -9,7 +9,9 @@
## ##
# = Section # = Section
# ##
##
# == Subsection # == Subsection
# #
# *with emphasis* # *with emphasis*
@ -152,22 +154,29 @@
# Features: # Features:
# @cmd-feat1: a feature # @cmd-feat1: a feature
# @cmd-feat2: another feature # @cmd-feat2: another feature
#
# Note: @arg3 is undocumented # Note: @arg3 is undocumented
#
# Returns: @Object # Returns: @Object
#
# TODO: frobnicate # TODO: frobnicate
#
# Notes: # Notes:
# #
# - Lorem ipsum dolor sit amet # - Lorem ipsum dolor sit amet
# - Ut enim ad minim veniam # - Ut enim ad minim veniam
# #
# Duis aute irure dolor # Duis aute irure dolor
#
# Example: # Example:
# #
# -> in # -> in
# <- out # <- out
#
# Examples: # Examples:
# - *verbatim* # - *verbatim*
# - {braces} # - {braces}
#
# Since: 2.10 # Since: 2.10
## ##
{ 'command': 'cmd', { 'command': 'cmd',
@ -178,14 +187,16 @@
## ##
# @cmd-boxed: # @cmd-boxed:
# If you're bored enough to read this, go see a video of boxed cats # If you're bored enough to read this, go see a video of boxed cats
#
# Features: # Features:
# @cmd-feat1: a feature # @cmd-feat1: a feature
# @cmd-feat2: another feature # @cmd-feat2: another feature
#
# Example: # Example:
# #
# -> in # -> in
# #
# <- out # <- out
## ##
{ 'command': 'cmd-boxed', 'boxed': true, { 'command': 'cmd-boxed', 'boxed': true,
'data': 'Object', 'data': 'Object',

View File

@ -44,7 +44,7 @@ Values
~~~~~~ ~~~~~~
"one" (**If: **"IFONE") "one" (**If: **"IFONE")
The _one_ {and only} The _one_ {and only}, description on the same line
"two" "two"
Not documented Not documented
@ -76,7 +76,7 @@ Members
~~~~~~~ ~~~~~~~
"base1": "Enum" "base1": "Enum"
the first member description starts on a new line, minimally indented
If If
@ -90,7 +90,9 @@ If
A paragraph A paragraph
Another paragraph (but no "var": line) Another paragraph
"var1" is undocumented
Members Members
@ -141,7 +143,8 @@ Members
~~~~~~~ ~~~~~~~
"i": "int" "i": "int"
an integer "b" is undocumented description starts on the same line remainder indented the same "b"
is undocumented
"b": "boolean" "b": "boolean"
Not documented Not documented
@ -172,10 +175,10 @@ Arguments
~~~~~~~~~ ~~~~~~~~~
"arg1": "int" "arg1": "int"
the first argument description starts on a new line, indented
"arg2": "string" (optional) "arg2": "string" (optional)
the second argument description starts on the same line remainder indented differently
"arg3": "boolean" "arg3": "boolean"
Not documented Not documented
@ -203,12 +206,6 @@ Returns
"Object" "Object"
TODO
~~~~
frobnicate
Notes Notes
~~~~~ ~~~~~

View File

@ -1 +1 @@
doc-invalid-return.json:3: 'Returns:' is only valid for commands doc-invalid-return.json:6: 'Returns:' is only valid for commands

View File

@ -2,6 +2,7 @@
## ##
# @FOO: # @FOO:
#
# Returns: blah # Returns: blah
## ##
{ 'event': 'FOO' } { 'event': 'FOO' }

View File

@ -0,0 +1 @@
doc-non-first-section.json:5:1: '=' heading must come first in a comment block

View File

@ -0,0 +1,6 @@
# = section must be first line
##
#
# = Not first
##

View File

@ -66,10 +66,12 @@ schemas = [
'doc-bad-union-member.json', 'doc-bad-union-member.json',
'doc-before-include.json', 'doc-before-include.json',
'doc-before-pragma.json', 'doc-before-pragma.json',
'doc-duplicate-features.json',
'doc-duplicated-arg.json', 'doc-duplicated-arg.json',
'doc-duplicated-return.json', 'doc-duplicated-return.json',
'doc-duplicated-since.json', 'doc-duplicated-since.json',
'doc-empty-arg.json', 'doc-empty-arg.json',
'doc-empty-features.json',
'doc-empty-section.json', 'doc-empty-section.json',
'doc-empty-symbol.json', 'doc-empty-symbol.json',
'doc-good.json', 'doc-good.json',
@ -273,15 +275,17 @@ if build_docs
output: ['doc-good.txt.nocr'], output: ['doc-good.txt.nocr'],
input: qapi_doc_out[0], input: qapi_doc_out[0],
build_by_default: true, build_by_default: true,
command: [remove_cr, '@INPUT@'], command: [remove_cr],
capture: true) capture: true,
feed: true)
qapi_doc_ref_nocr = custom_target('QAPI rST doc reference newline-sanitized', qapi_doc_ref_nocr = custom_target('QAPI rST doc reference newline-sanitized',
output: ['doc-good.ref.nocr'], output: ['doc-good.ref.nocr'],
input: files('doc-good.txt'), input: files('doc-good.txt'),
build_by_default: true, build_by_default: true,
command: [remove_cr, '@INPUT@'], command: [remove_cr],
capture: true) capture: true,
feed: true)
test('QAPI rST doc', diff, args: ['-u', qapi_doc_ref_nocr[0], qapi_doc_out_nocr[0]], test('QAPI rST doc', diff, args: ['-u', qapi_doc_ref_nocr[0], qapi_doc_out_nocr[0]],
suite: ['qapi-schema', 'qapi-doc']) suite: ['qapi-schema', 'qapi-doc'])

View File

@ -130,7 +130,7 @@ def test_frontend(fname):
for feat, section in doc.features.items(): for feat, section in doc.features.items():
print(' feature=%s\n%s' % (feat, section.text)) print(' feature=%s\n%s' % (feat, section.text))
for section in doc.sections: for section in doc.sections:
print(' section=%s\n%s' % (section.name, section.text)) print(' section=%s\n%s' % (section.tag, section.text))
def open_test_result(dir_name, file_name, update): def open_test_result(dir_name, file_name, update):