From ab2d0531b2e41bc5fd8f8e59405f135986599476 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 20 Dec 2013 23:21:09 +0100 Subject: monitor: add object-del (QMP) and object_del (HMP) command These two commands invoke the "unparent" method of Object. Signed-off-by: Paolo Bonzini Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Luiz Capitulino --- qapi-schema.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index c3c939c8c3..af3a83bf0b 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2758,6 +2758,20 @@ ## { 'command': 'netdev_del', 'data': {'id': 'str'} } +## +# @object-del: +# +# Remove a QOM object. +# +# @id: the name of the QOM object to remove +# +# Returns: Nothing on success +# Error if @id is not a valid id for a QOM object +# +# Since: 2.0 +## +{ 'command': 'object-del', 'data': {'id': 'str'} } + ## # @NetdevNoneOptions # -- cgit v1.2.1 From cff8b2c6fcdc9492d1141da11f55615843fa0a5e Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 20 Dec 2013 23:21:10 +0100 Subject: monitor: add object-add (QMP) and object_add (HMP) command Add two commands that are the monitor counterparts of -object. The commands have the same Visitor-based implementation, but use different kinds of visitors so that the HMP command has a DWIM string-based syntax, while the QMP variant accepts a stricter JSON-based properties dictionary. Signed-off-by: Paolo Bonzini Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Luiz Capitulino --- qapi-schema.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index af3a83bf0b..4abbf36535 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2758,6 +2758,26 @@ ## { 'command': 'netdev_del', 'data': {'id': 'str'} } +## +# @object-add: +# +# Create a QOM object. +# +# @qom-type: the class name for the object to be created +# +# @id: the name of the new object +# +# @props: #optional a dictionary of properties to be passed to the backend +# +# Returns: Nothing on success +# Error if @qom-type is not a valid class name +# +# Since: 2.0 +## +{ 'command': 'object-add', + 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'}, + 'gen': 'no' } + ## # @object-del: # -- cgit v1.2.1