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
OpenIO SDS command line god object.
-
account
-
account_client
-
admin
-
admin_mode
-
cli_conf
()[source] Get a copy of the CLI configuration options.
-
client_conf
Dict to be passed as first parameter to all *Client classes.
-
conscience
-
flatns_manager
-
flatns_set_bits
(bits)[source]
-
get_endpoint
(service_type=None)[source]
-
logger
-
meta1_digits
-
namespace
Name of the namespace set on the CLI or environment.
-
nsinfo
-
pool_manager
-
rdir
-
rdir_dispatcher
-
sds_conf
Dict holding what’s in local configuration files.
-
storage
Get an instance of ObjectStorageApi.
-
xcute_client
-
-
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.
CommonShell
(namespace)[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
-
start_profiling
()[source]
-
stop_profiling
()[source]
-
-
class
oio.cli.common.shell.
OpenIOShell
[source] Bases:
oio.cli.common.shell.CommonShell
-
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
-
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.
-
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/docbuild/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’