qemu.qmp.qom_common module¶
QOM Command abstractions.
- class qemu.qmp.qom_common.ObjectPropertyInfo(name: str, type_: str, description: Optional[str] = None, default_value: Optional[object] = None)[source]¶
Bases:
object
Represents the return type from e.g. qom-list.
- property child: bool¶
Is this property a child property?
- property link: bool¶
Is this property a link property?
- classmethod make(value: Dict[str, Any]) → qemu.qmp.qom_common.ObjectPropertyInfo[source]¶
Build an ObjectPropertyInfo from a Dict with an unknown shape.
- class qemu.qmp.qom_common.QOMCommand(args: argparse.Namespace)[source]¶
Bases:
object
Represents a QOM sub-command.
- Parameters
args – Parsed arguments, as returned from parser.parse_args.
- classmethod add_path_prop_arg(parser: argparse.ArgumentParser) → None[source]¶
Add the <path>.<proptery> positional argument to this command.
- Parameters
parser – The parser to add the argument to.
- classmethod command_runner(args: argparse.Namespace) → int[source]¶
Run a fully-parsed subcommand, with error-handling for the CLI.
- Returns
The return code from
run()
.
- classmethod configure_parser(parser: argparse.ArgumentParser) → None[source]¶
Configure a parser with this command’s arguments.
- Parameters
parser – argparse parser or subparser object.
- classmethod entry_point() → int[source]¶
Build this command’s parser, parse arguments, and run the command.
- Returns
run
’s return code.
- qom_list(path: str) → List[qemu.qmp.qom_common.ObjectPropertyInfo][source]¶
- Returns
a strongly typed list from the ‘qom-list’ command.