oio.cli.directory package

Submodules

oio.cli.directory.client module

class oio.cli.directory.client.DirectoryClientCli(namespace, **kwargs)[source]

Bases: object

cluster
meta0
rdir_lb
oio.cli.directory.client.make_client(instance)[source]

Build a DirectoryClientCli that will be added as “directory” field of instance.

Parameters:instance – an instance of ClientManager
Returns:an instance of DirectoryClientCli

oio.cli.directory.directory module

class oio.cli.directory.directory.DirectoryCmd(app, app_args, cmd_name=None)[source]

Bases: cliff.command.Command

Base class for directory subcommands

get_parser(prog_name)[source]

Return an argparse.ArgumentParser.

get_prefix_mapping(parsed_args)[source]

Create a meta0 prefix mapping with the parsed parameters.

log = <logging.Logger object>
class oio.cli.directory.directory.DirectoryDecommission(app, app_args, cmd_name=None)[source]

Bases: oio.cli.directory.directory.DirectoryCmd

Decommission a Meta1 service (or only some bases).

get_parser(prog_name)[source]

Return an argparse.ArgumentParser.

take_action(parsed_args)[source]

Override to do something useful.

class oio.cli.directory.directory.DirectoryInit(app, app_args, cmd_name=None)[source]

Bases: oio.cli.directory.directory.DirectoryCmd

Initialize the service directory.

Distribute database prefixes among meta1 services and fill the meta0.

get_parser(prog_name)[source]

Return an argparse.ArgumentParser.

take_action(parsed_args)[source]

Override to do something useful.

class oio.cli.directory.directory.DirectoryList(app, app_args, cmd_name=None)[source]

Bases: oio.cli.directory.directory.DirectoryCmd

List the content of meta0 database as a JSON object. The output can be used later to restore the database.

WARNING: output is >2MB.

take_action(parsed_args)[source]

Override to do something useful.

class oio.cli.directory.directory.DirectoryRebalance(app, app_args, cmd_name=None)[source]

Bases: oio.cli.directory.directory.DirectoryCmd

Rebalance the container prefixes.

take_action(parsed_args)[source]

Override to do something useful.

class oio.cli.directory.directory.DirectoryRestore(app, app_args, cmd_name=None)[source]

Bases: oio.cli.directory.directory.DirectoryCmd

Restore the content of meta0 database from a JSON object.

Use with caution.

get_parser(prog_name)[source]

Return an argparse.ArgumentParser.

take_action(parsed_args)[source]

Override to do something useful.

class oio.cli.directory.directory.DirectoryWarmup(app, app_args, cmd_name=None)[source]

Bases: oio.cli.directory.directory.DirectoryCmd

Ping each prefix of a Meta0 hash to prepare each Meta1 base

get_parser(prog_name)[source]

Return an argparse.ArgumentParser.

take_action(parsed_args)[source]

Override to do something useful.

class oio.cli.directory.directory.WarmupWorker(conf, log)[source]

Bases: object

ping(prefix)[source]
run(prefix_queue)[source]

Module contents