diff options
author | Amos Kong <akong@redhat.com> | 2013-04-25 17:50:35 +0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2013-04-25 10:07:06 -0400 |
commit | 1f8f987d349f8f1bace4b47a83323b68ab0e084c (patch) | |
tree | 8edfe054ddf512746ecea66c6035966942a26b84 /qmp-commands.hx | |
parent | 9953f8822cc316eec9962f0a2858c3439a80adec (diff) |
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 <akong@redhat.com>
CC: Luiz Capitulino <lcapitulino@redhat.com>
CC: Osier Yang <jyang@redhat.com>
CC: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r-- | qmp-commands.hx | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx index 4d65422c40..0e891323c7 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -2416,6 +2416,53 @@ EQMP }, SQMP +query-command-line-options +-------------------------- + +Show command line option schema. + +Return a json-array of command line option schema for all options (or for +the given option), returning an error if the given option doesn't exist. + +Each array entry contains the following: + +- "option": option name (json-string) +- "parameters": a json-array describes all parameters of the option: + - "name": parameter name (json-string) + - "type": parameter type (one of 'string', 'boolean', 'number', + or 'size') + - "help": human readable description of the parameter + (json-string, optional) + +Example: + +-> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } } +<- { "return": [ + { + "parameters": [ + { + "name": "romfile", + "type": "string" + }, + { + "name": "bootindex", + "type": "number" + } + ], + "option": "option-rom" + } + ] + } + +EQMP + + { + .name = "query-command-line-options", + .args_type = "option:s?", + .mhandler.cmd_new = qmp_marshal_input_query_command_line_options, + }, + +SQMP query-migrate ------------- |