mistralclient.shell module¶
Command-line interface to the Mistral APIs
- class mistralclient.shell.BashCompletionCommand(app, app_args, cmd_name=None)¶
Bases:
Command
Prints all of the commands and options for bash-completion.
- log = <Logger mistralclient.shell.BashCompletionCommand (WARNING)>¶
- take_action(parsed_args)¶
Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.shell.HelpAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)¶
Bases:
Action
Custom help action.
Provide a custom action so the -h and –help options to the main app will print a list of the commands.
The commands are determined by checking the CommandManager instance, passed in as the “default” value for the action.
- class mistralclient.shell.MistralShell¶
Bases:
App
- build_option_parser(description, version, argparse_kwargs=None)¶
Return an argparse option parser for this application.
Subclasses may override this method to extend the parser with more global options.
- Parameters:
description (str) – full description of the application
version (str) – version number for the application
argparse_kwargs – extra keyword argument passed to the ArgumentParser constructor
- configure_logging()¶
Create logging handlers for any log output.
- initialize_app(argv)¶
Hook for subclasses to take global initialization action after the arguments are parsed but before a command is run. Invoked only once, even in interactive mode.
- Parameters:
argv – List of arguments, including the subcommand to run. Empty for interactive mode.
- class mistralclient.shell.OpenStackHelpFormatter(prog, indent_increment=2, max_help_position=32, width=None)¶
Bases:
HelpFormatter
- start_section(heading)¶
- mistralclient.shell.env(*args, **kwargs)¶
Returns the first environment variable set.
If all are empty, defaults to ‘’ or keyword arg default.
- mistralclient.shell.main(argv=['-W', '--keep-going', '-b', 'html', 'doc/source', 'doc/build/html'])¶