diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-22 14:40:54 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-03 10:41:07 -0600 |
commit | 5eeee3fa2e646dadeea2c10515956b11ed0de877 (patch) | |
tree | 77a45e043e2afad81005d12009c24146b125319c /qapi-schema.json | |
parent | 6acbe4c6f18e7de00481ff30574262b58526de45 (diff) | |
download | hqemu-5eeee3fa2e646dadeea2c10515956b11ed0de877.zip hqemu-5eeee3fa2e646dadeea2c10515956b11ed0de877.tar.gz |
qom: add new command to search for types
This adds a command that allows searching for types that implement a property.
This allows you to do things like search for all available PCIDevices. In the
future, we'll also have a standard interface for things with a BlockDriverState
property that a PCIDevice could implement.
This will enable search queries like, "any type that implements the BlockDevice
interface" which would allow management tools to present available block devices
without having to hard code device names. Since an object can implement
multiple interfaces, one device could act both as a BlockDevice and a
NetworkDevice.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qapi-schema.json')
-rw-r--r-- | qapi-schema.json | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/qapi-schema.json b/qapi-schema.json index 80debe6..56a4123 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1549,3 +1549,36 @@ # Since: 1.1 ## { 'command': 'block_job_cancel', 'data': { 'device': 'str' } } + +## +# @ObjectTypeInfo: +# +# This structure describes a search result from @qom-list-types +# +# @name: the type name found in the search +# +# Since: 1.1 +# +# Notes: This command is experimental and may change syntax in future releases. +## +{ 'type': 'ObjectTypeInfo', + 'data': { 'name': 'str' } } + +## +# @qom-list-types: +# +# This command will return a list of types given search parameters +# +# @implements: if specified, only return types that implement this type name +# +# @abstract: if true, include abstract types in the results +# +# Returns: a list of @ObjectTypeInfo or an empty list if no results are found +# +# Since: 1.1 +# +# Notes: This command is experimental and may change syntax in future releases. +## +{ 'command': 'qom-list-types', + 'data': { '*implements': 'str', '*abstract': 'bool' }, + 'returns': [ 'ObjectTypeInfo' ] } |