The mistralclient.shell Module

The mistralclient.shell Module

Command-line interface to the Mistral APIs

class mistralclient.shell.BashCompletionCommand(app, app_args, cmd_name=None)

Bases: osc_lib.command.command.Command

Prints all of the commands and options for bash-completion.

log = <logging.Logger object>
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: argparse.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: cliff.app.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: argparse.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=['build_sphinx'])
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

python-mistralclient 3.7.1.dev12