From 1f8f987d349f8f1bace4b47a83323b68ab0e084c Mon Sep 17 00:00:00 2001 From: Amos Kong Date: Thu, 25 Apr 2013 17:50:35 +0800 Subject: monitor: introduce query-command-line-options Libvirt has no way to probe if an option or property is supported, This patch introduces a new qmp command to query command line option information. hmp command isn't added because it's not needed. Signed-off-by: Amos Kong CC: Luiz Capitulino CC: Osier Yang CC: Anthony Liguori Signed-off-by: Luiz Capitulino Reviewed-by: Eric Blake --- qapi-schema.json | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 751d3c2247..5b0fb3bf8a 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3505,3 +3505,69 @@ '*asl_compiler_rev': 'uint32', '*file': 'str', '*data': 'str' }} + +## +# @CommandLineParameterType: +# +# Possible types for an option parameter. +# +# @string: accepts a character string +# +# @boolean: accepts "on" or "off" +# +# @number: accepts a number +# +# @size: accepts a number followed by an optional suffix (K)ilo, +# (M)ega, (G)iga, (T)era +# +# Since 1.5 +## +{ 'enum': 'CommandLineParameterType', + 'data': ['string', 'boolean', 'number', 'size'] } + +## +# @CommandLineParameterInfo: +# +# Details about a single parameter of a command line option. +# +# @name: parameter name +# +# @type: parameter @CommandLineParameterType +# +# @help: #optional human readable text string, not suitable for parsing. +# +# Since 1.5 +## +{ 'type': 'CommandLineParameterInfo', + 'data': { 'name': 'str', + 'type': 'CommandLineParameterType', + '*help': 'str' } } + +## +# @CommandLineOptionInfo: +# +# Details about a command line option, including its list of parameter details +# +# @option: option name +# +# @parameters: an array of @CommandLineParameterInfo +# +# Since 1.5 +## +{ 'type': 'CommandLineOptionInfo', + 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } } + +## +# @query-command-line-options: +# +# Query command line option schema. +# +# @option: #optional option name +# +# Returns: list of @CommandLineOptionInfo for all options (or for the given +# @option). Returns an error if the given @option doesn't exist. +# +# Since 1.5 +## +{'command': 'query-command-line-options', 'data': { '*option': 'str' }, + 'returns': ['CommandLineOptionInfo'] } -- cgit v1.2.3