aboutsummaryrefslogtreecommitdiff
path: root/qapi/misc.json
diff options
context:
space:
mode:
authorWainer dos Santos Moschetta <wainersm@redhat.com>2018-12-28 14:44:42 -0500
committerMarkus Armbruster <armbru@redhat.com>2019-01-24 10:01:05 +0100
commitdd49d9d8a22c22c73c82f5e3f986d5814b3a4034 (patch)
treee9a13fec41cfd6a1dceb6e60bbe4842ed8794880 /qapi/misc.json
parenta95291007b2478fcf32a2d71bf133b688bb4b675 (diff)
qmp: Add examples to qom list, get, and set commands
Added examples for the qom-list, qom-get, and qom-set commands in qapi misc JSON file. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20181228194442.3506-1-wainersm@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi/misc.json')
-rw-r--r--qapi/misc.json36
1 files changed, 36 insertions, 0 deletions
diff --git a/qapi/misc.json b/qapi/misc.json
index 24d20a880a..426274ecf8 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -1380,6 +1380,16 @@
# object.
#
# Since: 1.2
+#
+# Example:
+#
+# -> { "execute": "qom-list",
+# "arguments": { "path": "/chardevs" } }
+# <- { "return": [ { "name": "type", "type": "string" },
+# { "name": "parallel0", "type": "child<chardev-vc>" },
+# { "name": "serial0", "type": "child<chardev-vc>" },
+# { "name": "mon0", "type": "child<chardev-stdio>" } ] }
+#
##
{ 'command': 'qom-list',
'data': { 'path': 'str' },
@@ -1417,6 +1427,23 @@
# returned as #int.
#
# Since: 1.2
+#
+# Example:
+#
+# 1. Use absolute path
+#
+# -> { "execute": "qom-get",
+# "arguments": { "path": "/machine/unattached/device[0]",
+# "property": "hotplugged" } }
+# <- { "return": false }
+#
+# 2. Use partial path
+#
+# -> { "execute": "qom-get",
+# "arguments": { "path": "unattached/sysbus",
+# "property": "type" } }
+# <- { "return": "System" }
+#
##
{ 'command': 'qom-get',
'data': { 'path': 'str', 'property': 'str' },
@@ -1436,6 +1463,15 @@
# for a description of type mapping.
#
# Since: 1.2
+#
+# Example:
+#
+# -> { "execute": "qom-set",
+# "arguments": { "path": "/machine",
+# "property": "graphics",
+# "value": false } }
+# <- { "return": {} }
+#
##
{ 'command': 'qom-set',
'data': { 'path': 'str', 'property': 'str', 'value': 'any' },