[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/4] qmp: Add examples to qom list, get, and set comm
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 3/4] qmp: Add examples to qom list, get, and set commands |
Date: |
Thu, 24 Jan 2019 15:38:24 +0100 |
From: Wainer dos Santos Moschetta <address@hidden>
Added examples for the qom-list, qom-get, and qom-set
commands in qapi misc JSON file.
Signed-off-by: Wainer dos Santos Moschetta <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
qapi/misc.json | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
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' },
--
2.17.2
- [Qemu-devel] [PULL 0/4] QAPI patches for 2019-01-24, Markus Armbruster, 2019/01/24
- [Qemu-devel] [PULL 4/4] json: Fix % handling when not interpolating, Markus Armbruster, 2019/01/24
- [Qemu-devel] [PULL 1/4] qapi: Belatedly update docs for commit 9c2f56e9f9d, Markus Armbruster, 2019/01/24
- [Qemu-devel] [PULL 3/4] qmp: Add examples to qom list, get, and set commands,
Markus Armbruster <=
- [Qemu-devel] [PULL 2/4] qapi: Eliminate indirection through qmp_event_get_func_emit(), Markus Armbruster, 2019/01/24
- Re: [Qemu-devel] [PULL 0/4] QAPI patches for 2019-01-24, Peter Maydell, 2019/01/25