aboutsummaryrefslogtreecommitdiff
path: root/qapi-schema.json
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-09-12 13:18:58 +0400
committerMarkus Armbruster <armbru@redhat.com>2016-09-19 17:32:21 +0200
commit94cfd07f26ef240499f3a4a7a14a4bcc17b8f003 (patch)
treead1999ea1518ac8934e62d4b20377db6a856cfac /qapi-schema.json
parent119ebac1feb26181cbadd13a8a795a199d0bbaa6 (diff)
qapi-schema: add 'device_add'
Even though device_add is not fully qapi'fied, we may add it to the json schema with 'gen': false, so registration and documentation can be generated. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20160912091913.15831-4-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi-schema.json')
-rw-r--r--qapi-schema.json40
1 files changed, 40 insertions, 0 deletions
diff --git a/qapi-schema.json b/qapi-schema.json
index 5e15d28468..55f825dd06 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2201,6 +2201,46 @@
{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
##
+# @device_add:
+#
+# @driver: the name of the new device's driver
+#
+# @bus: #optional the device's parent bus (device tree path)
+#
+# @id: the device's ID, must be unique
+#
+# Additional arguments depend on the type.
+#
+# Add a device.
+#
+# Notes:
+# 1. For detailed information about this command, please refer to the
+# 'docs/qdev-device-use.txt' file.
+#
+# 2. It's possible to list device properties by running QEMU with the
+# "-device DEVICE,help" command-line argument, where DEVICE is the
+# device's name
+#
+# Example:
+#
+# -> { "execute": "device_add",
+# "arguments": { "driver": "e1000", "id": "net1",
+# "bus": "pci.0",
+# "mac": "52:54:00:12:34:56" } }
+# <- { "return": {} }
+#
+# TODO This command effectively bypasses QAPI completely due to its
+# "additional arguments" business. It shouldn't have been added to
+# the schema in this form. It should be qapified properly, or
+# replaced by a properly qapified command.
+#
+# Since: 0.13
+##
+{ 'command': 'device_add',
+ 'data': {'driver': 'str', 'id': 'str'},
+ 'gen': false } # so we can get the additional arguments
+
+##
# @device_del:
#
# Remove a device from a guest