aboutsummaryrefslogtreecommitdiff
path: root/qapi-schema.json
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-12 14:29:35 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2011-12-15 09:20:48 -0600
commiteb6e8ea5c38b47a3c6cf27f4780abd92bc079caa (patch)
tree02cb9341c0ab3aefe309dd441b2a7c85829b6d97 /qapi-schema.json
parentb4b12c6247d89b94e197891fbadb2699fd469ed6 (diff)
downloadqemu-eb6e8ea5c38b47a3c6cf27f4780abd92bc079caa.zip
qemu-eb6e8ea5c38b47a3c6cf27f4780abd92bc079caa.tar.gz
qemu-eb6e8ea5c38b47a3c6cf27f4780abd92bc079caa.tar.bz2
qom: qom_{get, set} monitor commands (v2)
This allows clients to read and write device model properties through QMP. QAPI doesn't support Visitor types yet and these commands are special in that they don't work with fixed types. I've added a documentation stub to qapi-schema.json so we can keep consistency there. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qapi-schema.json')
-rw-r--r--qapi-schema.json59
1 files changed, 59 insertions, 0 deletions
diff --git a/qapi-schema.json b/qapi-schema.json
index 7c979b2..44cf764 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -1216,3 +1216,62 @@
{ 'command': 'qom-list',
'data': { 'path': 'str' },
'returns': [ 'DevicePropertyInfo' ] }
+
+##
+# @qom-get:
+#
+# This command will get a property from a device model path and return the
+# value.
+#
+# @path: The path within the device model. There are two forms of supported
+# paths--absolute and partial paths.
+#
+# Absolute paths are derived from the root device and can follow child<>
+# or link<> properties. Since they can follow link<> properties, they
+# can be arbitrarily long. Absolute paths look like absolute filenames
+# and are prefixed with a leading slash.
+#
+# Partial paths look like relative filenames. They do not begin
+# with a prefix. The matching rules for partial paths are subtle but
+# designed to make specifying devices easy. At each level of the
+# composition tree, the partial path is matched as an absolute path.
+# The first match is not returned. At least two matches are searched
+# for. A successful result is only returned if only one match is
+# found. If more than one match is found, a flag is return to
+# indicate that the match was ambiguous.
+#
+# @property: The property name to read
+#
+# Returns: The property value. The type depends on the property type. legacy<>
+# properties are returned as #str. child<> and link<> properties are
+# returns as #str pathnames. All integer property types (u8, u16, etc)
+# are returned as #int.
+#
+# Since: 1.1
+#
+# Notes: This command is experimental and may change syntax in future releases.
+##
+{ 'command': 'qom-get',
+ 'data': { 'path': 'str', 'property': 'str' },
+ 'returns': 'visitor',
+ 'gen': 'no' }
+
+##
+# @qom-set:
+#
+# This command will set a property from a device model path.
+#
+# @path: see @qom-get for a description of this parameter
+#
+# @property: the property name to set
+#
+# @value: a value who's type is appropriate for the property type. See @qom-get
+# for a description of type mapping.
+#
+# Since: 1.1
+#
+# Notes: This command is experimental and may change syntax in future releases.
+##
+{ 'command': 'qom-set',
+ 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
+ 'gen': 'no' }