watcherclient.common.utils.
HelpFormatter
(prog, indent_increment=2, max_help_position=24, width=None)[source]¶Bases: argparse.HelpFormatter
watcherclient.common.utils.
common_filters
(limit=None, sort_key=None, sort_dir=None, marker=None)[source]¶Generate common filters for any list request.
limit – maximum number of entities to return.
sort_key – field to use for sorting.
sort_dir – direction of sorting: ‘asc’ or ‘desc’.
marker – The last actionplan UUID of the previous page.
list of string filters.
watcherclient.common.utils.
common_params_for_list
(args, fields, field_labels)[source]¶Generate ‘params’ dict that is common for every ‘list’ command.
args – arguments from command line.
fields – possible fields for sorting.
field_labels – possible field labels for sorting.
a dict with params to pass to the client method.
watcherclient.common.utils.
define_command
(subparsers, command, callback, cmd_mapper)[source]¶Define a command in the subparsers collection.
subparsers – subparsers collection where the command will go
command – command name
callback – function that will be used to process the command
watcherclient.common.utils.
define_commands_from_module
(subparsers, command_module, cmd_mapper)[source]¶Add do_ methods in a module and add as commands into a subparsers.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.