oio.cli.common package

Submodules

oio.cli.common.clientmanager module

class oio.cli.common.clientmanager.ClientCache(factory)[source]

Bases: object

class oio.cli.common.clientmanager.ClientManager(options)[source]

Bases: object

account
admin_mode
cli_conf()[source]

Get a copy of the CLI configuration options.

flatns_manager
get_endpoint(service_type)[source]
meta1_digits
namespace
nsinfo
sds_conf
oio.cli.common.clientmanager.get_plugin_module(module_name)[source]

oio.cli.common.commandmanager module

class oio.cli.common.commandmanager.CommandManager(namespace, convert_underscores=True)[source]

Bases: cliff.commandmanager.CommandManager

add_command_group(group=None)[source]
get_command_groups()[source]
get_command_names(group=None)[source]
load_commands(namespace)[source]

Load all the commands from an entrypoint

oio.cli.common.shell module

Command-line interface to the OpenIO APIs

class oio.cli.common.shell.OpenIOShell[source]

Bases: cliff.app.App

build_option_parser(description, version)[source]

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
clean_up(cmd, result, err)[source]

Hook run after a command is done to shutdown the app.

Parameters:
  • cmd (cliff.command.Command) – command processor being invoked
  • result (int) – return value of cmd
  • err (Exception) – exception or None
configure_logging()[source]

Create logging handlers for any log output.

initialize_app(argv)[source]

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.
prepare_to_run_command(cmd)[source]

Perform any preliminary work needed to run a command.

Parameters:cmd (cliff.command.Command) – command processor being invoked
run(argv)[source]

Equivalent to the main program for the application.

Parameters:argv (list of str) – input arguments and options
oio.cli.common.shell.main(argv=['-v', '-E', '-d', '/tmp/sphinx', 'doc2', '/home/devops/repo/oio-docs/result-docs'])[source]

oio.cli.common.utils module

class oio.cli.common.utils.KeyValueAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: argparse.Action

class oio.cli.common.utils.ValueFormatStoreTrueAction(option_strings, dest, nargs=0, **kwargs)[source]

Bases: argparse.Action

Same as ‘store_true’, but also set ‘formatter’ field to ‘value’

Module contents