aboutsummaryrefslogtreecommitdiff
path: root/qapi-schema.json
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-04-18 17:34:15 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2012-06-04 13:49:35 -0300
commit928059a37b8e1f152962431fb846f39597b63c36 (patch)
tree4cd8ab47ebd78c1756406e1dde5075609beb301c /qapi-schema.json
parent4559a1dbcc15a10482de822e2839645a1819ef6f (diff)
qapi: convert netdev_add
This is not a full QAPI conversion, but an intermediate step. In essence, do_netdev_add() is split into three functions: 1. netdev_add(): performs the actual work. This function is fully converted to Error (thus, it's "qapi-friendly") 2. qmp_netdev_add(): the QMP front-end for netdev_add(). This is coded by hand and not auto-generated (gen=no in the schema). The reason for this it's a lot easier and simpler to with QemuOpts this way 3. hmp_netdev_add(): HMP front-end. This design was suggested by Paolo Bonzini. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'qapi-schema.json')
-rw-r--r--qapi-schema.json28
1 files changed, 28 insertions, 0 deletions
diff --git a/qapi-schema.json b/qapi-schema.json
index dfa0e1f47a..69fcd8e3e6 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -1798,3 +1798,31 @@
{ 'command': 'dump-guest-memory',
'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
'*length': 'int' } }
+##
+# @netdev_add:
+#
+# Add a network backend.
+#
+# @type: the type of network backend. Current valid values are 'user', 'tap',
+# 'vde', 'socket', 'dump' and 'bridge'
+#
+# @id: the name of the new network backend
+#
+# @props: #optional a list of properties to be passed to the backend in
+# the format 'name=value', like 'ifname=tap0,script=no'
+#
+# Notes: The semantics of @props is not well defined. Future commands will be
+# introduced that provide stronger typing for backend creation.
+#
+# Since: 0.14.0
+#
+# Returns: Nothing on success
+# If @type is not a valid network backend, DeviceNotFound
+# If @id is not a valid identifier, InvalidParameterValue
+# if @id already exists, DuplicateId
+# If @props contains an invalid parameter for this backend,
+# InvalidParameter
+##
+{ 'command': 'netdev_add',
+ 'data': {'type': 'str', 'id': 'str', '*props': '**'},
+ 'gen': 'no' }