diff options
author | Kevin Wolf <kwolf@redhat.com> | 2020-02-24 15:29:55 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-03-06 17:21:27 +0100 |
commit | 5f07c4d60d091320186e7b0edaf9ed2cc16b2d1e (patch) | |
tree | 26dee459d8fc099c99ba98d020ee9820df7df9e1 /qapi | |
parent | 14837c6493d42f5f85d910935654725217a5770b (diff) | |
download | qemu-5f07c4d60d091320186e7b0edaf9ed2cc16b2d1e.zip qemu-5f07c4d60d091320186e7b0edaf9ed2cc16b2d1e.tar.gz qemu-5f07c4d60d091320186e7b0edaf9ed2cc16b2d1e.tar.bz2 |
qapi: Flatten object-add
Mapping object-add to the command line as is doesn't result in nice
syntax because of the nesting introduced with 'props'. This becomes
nicer and more consistent with device_add and netdev_add when we accept
properties for the object on the top level instead.
'props' is still accepted after this patch, but marked as deprecated.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200224143008.13362-8-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/qom.json | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/qapi/qom.json b/qapi/qom.json index ecc60c4..8abe998 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -210,7 +210,12 @@ # # @id: the name of the new object # -# @props: a dictionary of properties to be passed to the backend +# @props: a dictionary of properties to be passed to the backend. Deprecated +# since 5.0, specify the properties on the top level instead. It is an +# error to specify the same option both on the top level and in @props. +# +# Additional arguments depend on qom-type and are passed to the backend +# unchanged. # # Returns: Nothing on success # Error if @qom-type is not a valid class name @@ -221,12 +226,13 @@ # # -> { "execute": "object-add", # "arguments": { "qom-type": "rng-random", "id": "rng1", -# "props": { "filename": "/dev/hwrng" } } } +# "filename": "/dev/hwrng" } } # <- { "return": {} } # ## { 'command': 'object-add', - 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} } + 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'}, + 'gen': false } # so we can get the additional arguments ## # @object-del: |