From 9151e59a8b6e854eb733553c6772351049ca6ab6 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 20 Oct 2020 13:27:22 +0200 Subject: qapi/qom: QAPIfy object-add This converts object-add from 'gen': false to the ObjectOptions QAPI type. As an immediate benefit, clients can now use QAPI schema introspection for user creatable QOM objects. It is also the first step towards making the QAPI schema the only external interface for the creation of user creatable objects. Once all other places (HMP and command lines of the system emulator and all tools) go through QAPI, too, some object implementations can be simplified because some checks (e.g. that mandatory options are set) are already performed by QAPI, and in another step, QOM boilerplate code could be generated from the schema. Signed-off-by: Kevin Wolf Acked-by: Paolo Bonzini Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/qom.json | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'qapi') diff --git a/qapi/qom.json b/qapi/qom.json index 192a582b07..2056edc072 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -846,13 +846,6 @@ # # Create a QOM object. # -# @qom-type: the class name for the object to be created -# -# @id: the name of the new object -# -# 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 # @@ -866,9 +859,7 @@ # <- { "return": {} } # ## -{ 'command': 'object-add', - 'data': {'qom-type': 'str', 'id': 'str'}, - 'gen': false } # so we can get the additional arguments +{ 'command': 'object-add', 'data': 'ObjectOptions', 'boxed': true } ## # @object-del: -- cgit v1.2.3