oio.cli.admin package
Subpackages
Submodules
oio.cli.admin.common module
-
class
oio.cli.admin.common.
AccountCommandMixin
[source] Bases:
oio.cli.admin.common.CommandMixin
Add account-related arguments to a cliff command.
-
check_and_load_parsed_args
(app, parsed_args)[source]
-
patch_parser
(parser)[source]
-
-
class
oio.cli.admin.common.
ChunkCommandMixin
[source] Bases:
oio.cli.admin.common.CommandMixin
Add chunk-related arguments to a cliff command.
-
check_and_load_parsed_args
(app, parsed_args)[source]
-
patch_parser
(parser)[source]
-
-
class
oio.cli.admin.common.
CommandMixin
[source] Bases:
object
-
check_and_load_parsed_args
(app, parsed_args)[source]
-
patch_parser
(parser)[source]
-
-
class
oio.cli.admin.common.
ContainerCommandMixin
[source] Bases:
oio.cli.admin.common.CommandMixin
Add container-related arguments to a cliff command.
-
check_and_load_parsed_args
(app, parsed_args)[source]
-
patch_parser
(parser)[source]
-
resolve_containers
(app, parsed_args, no_name=False, no_id=False)[source]
-
-
class
oio.cli.admin.common.
MultipleServicesCommandMixin
[source] Bases:
oio.cli.admin.common.CommandMixin
Add service-related arguments to a cliff command.
-
check_and_load_parsed_args
(app, parsed_args)[source] Load IDs of services.
-
patch_parser
(parser)[source]
-
service_type
= None
-
-
class
oio.cli.admin.common.
ObjectCommandMixin
[source] Bases:
oio.cli.admin.common.CommandMixin
Add object-related arguments to a cliff command.
-
check_and_load_parsed_args
(app, parsed_args)[source]
-
patch_parser
(parser)[source]
-
resolve_objects
(app, parsed_args)[source]
-
-
class
oio.cli.admin.common.
ProxyCommandMixin
[source] Bases:
oio.cli.admin.common.CommandMixin
Add proxy-related arguments to a cliff command.
-
check_and_load_parsed_args
(app, parsed_args)[source]
-
patch_parser
(parser)[source]
-
-
class
oio.cli.admin.common.
SingleServiceCommandMixin
[source] Bases:
oio.cli.admin.common.CommandMixin
Add service-related arguments to a cliff command.
-
check_and_load_parsed_args
(app, parsed_args)[source]
-
patch_parser
(parser)[source]
-
-
class
oio.cli.admin.common.
ToolCommandMixin
[source] Bases:
oio.cli.admin.common.CommandMixin
Add tool-related arguments to a cliff command.
-
check_and_load_parsed_args
(app, parsed_args)[source]
-
distributed
= False
-
patch_parser
(parser)[source]
-
tool_class
= None
-
tool_conf
= {}
-
oio.cli.admin.item_check module
-
class
oio.cli.admin.item_check.
AccountCheck
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.AccountCommandMixin
,oio.cli.admin.item_check.RecursiveCheckCommand
Check an account for problems.
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.item_check.
ChunkCheck
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ChunkCommandMixin
,oio.cli.admin.item_check.ItemCheckCommand
Check a chunk for problems.
Quick checks on the account, the container and the object owning the chunk will also be performed.
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.item_check.
ContainerCheck
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ContainerCommandMixin
,oio.cli.admin.item_check.RecursiveCheckCommand
Check a container for problems.
Quick checks on the account owning the container will also be performed.
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.item_check.
ItemCheckCommand
(app, app_args, cmd_name=None)[source] Bases:
cliff.lister.Lister
Various parameters that apply to all check commands.
-
checker
= None
-
columns
= ('Type', 'Item', 'Status', 'Errors')
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
logger
-
run
(parsed_args)[source] Invoked by the application when the command is run.
Developers implementing commands should override
take_action()
.Developers creating new command base classes (such as
Lister
andShowOne
) should override this method to wraptake_action()
.Return the value returned by
take_action()
or 0.
-
success
= True
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.item_check.
ObjectCheck
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ObjectCommandMixin
,oio.cli.admin.item_check.RecursiveCheckCommand
Check an object for problems.
Quick checks on the account and the container owning the object will also be performed.
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.item_check.
RecursiveCheckCommand
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.item_check.ItemCheckCommand
ItemCheckCommand with additional parameters to control recursion.
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
oio.cli.admin.item_locate module
-
class
oio.cli.admin.item_locate.
AccountLocate
(*args, **kwargs)[source] Bases:
oio.cli.admin.common.AccountCommandMixin
,oio.cli.admin.item_locate.ItemLocateCommand
Get location of the account service(s) hosting the specified account.
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
reqid_prefix
= 'ACLI-AL-'
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.item_locate.
ChunkLocate
(*args, **kwargs)[source] Bases:
oio.cli.admin.common.ChunkCommandMixin
,oio.cli.admin.item_locate.ItemLocateCommand
Get location of the services hosting the specified chunk(s).
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
reqid_prefix
= 'ACLI-CKL-'
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.item_locate.
ContainerLocate
(*args, **kwargs)[source] Bases:
oio.cli.admin.common.ContainerCommandMixin
,oio.cli.admin.item_locate.ItemLocateCommand
Get location of the services hosting the specified container(s).
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
reqid_prefix
= 'ACLI-CL-'
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.item_locate.
ItemLocateCommand
(*args, **kwargs)[source] Bases:
cliff.lister.Lister
A command to display which service is in charge of hosting an item.
-
account
Get an instance of AccountClient.
-
all_services
(srv_type, **kwargs)[source] Get a dictionary of (cached) services of the specified type.
-
cid_to_m1
(cid)[source] Get the name of the meta1 database where the reference information will be stored. Output will always have 4 hexdigits.
-
columns
= ('Type', 'Item', 'Service Id', 'Addr', 'Location', 'Status', 'Errors')
-
cs
Get an instance of ConscienceClient.
-
digits
Get the number of digits used to group CID prefixes.
-
dir
Get an instance of DirectoryClient.
-
format_chunks
(chunks, obj=None)[source]
-
format_m1
(cid, m1_srv)[source]
-
format_m2
(acct, ct, m2_srv)[source]
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
locate_accounts
(accounts)[source]
-
locate_chunks
(chunks)[source]
-
locate_containers
(containers, is_cid=False)[source]
-
locate_m0
(cid='', known_m0=None, error=None)[source] Locate the meta0 services responsible for cid.
Parameters: known_m0 – if provided, filter the list of all meta0 services, and keep only these ones.
-
locate_objects
(objects)[source]
-
logger
-
m2_item
(acct, ct, cid)[source]
-
reqid_prefix
= 'ACLI-LOC-'
-
run
(parsed_args)[source] Invoked by the application when the command is run.
Developers implementing commands should override
take_action()
.Developers creating new command base classes (such as
Lister
andShowOne
) should override this method to wraptake_action()
.Return the value returned by
take_action()
or 0.
-
storage
Get an instance of ObjectStorageApi.
-
success
= True
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.item_locate.
ObjectLocate
(*args, **kwargs)[source] Bases:
oio.cli.admin.common.ObjectCommandMixin
,oio.cli.admin.item_locate.ItemLocateCommand
Get location of the services hosting the specified object(s).
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
reqid_prefix
= 'ACLI-OL-'
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
oio.cli.admin.item_move module
-
class
oio.cli.admin.item_move.
ContainerMove
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ContainerCommandMixin
,oio.cli.admin.item_move.ItemMoveCommand
Move a container from source service to destination service. If the destination service isn’t set, a destination service is automatically selected.
-
columns
= ('Container', 'Base', 'Source', 'Destination', 'Status', 'Errors')
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.item_move.
ItemMoveCommand
(app, app_args, cmd_name=None)[source] Bases:
cliff.lister.Lister
Various parameters that apply to all move commands.
-
columns
= None
-
logger
-
run
(parsed_args)[source] Invoked by the application when the command is run.
Developers implementing commands should override
take_action()
.Developers creating new command base classes (such as
Lister
andShowOne
) should override this method to wraptake_action()
.Return the value returned by
take_action()
or 0.
-
success
= True
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
oio.cli.admin.item_rebuild module
-
class
oio.cli.admin.item_rebuild.
ChunkDistributedRebuild
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.item_rebuild.ChunkRebuildCommand
Rebuild the specified chunks, using several workers across the platform.
-
distributed
= True
-
-
class
oio.cli.admin.item_rebuild.
ChunkRebuild
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.item_rebuild.ChunkRebuildCommand
Rebuild the specified chunks.
-
class
oio.cli.admin.item_rebuild.
ChunkRebuildCommand
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.item_rebuild.ItemRebuildCommand
-
columns
= ('Chunk', 'Status', 'Errors')
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
tool_class
alias of
oio.blob.rebuilder.BlobRebuilder
-
-
class
oio.cli.admin.item_rebuild.
ItemRebuildCommand
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ToolCommandMixin
,cliff.lister.Lister
Various parameters that apply to all rebuild commands.
-
columns
= None
-
formatter_default
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
logger
-
rebuilder
= None
-
run
(parsed_args)[source] Invoked by the application when the command is run.
Developers implementing commands should override
take_action()
.Developers creating new command base classes (such as
Lister
andShowOne
) should override this method to wraptake_action()
.Return the value returned by
take_action()
or 0.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
oio.cli.admin.item_repair module
-
class
oio.cli.admin.item_repair.
AccountRepair
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.AccountCommandMixin
,oio.cli.admin.item_repair.ItemRepairCommand
Repair a account.
The steps of the repair: recompute the counter of this account ; refresh the counter of all containers in this account.
-
columns
= ('Entry', 'Status', 'Errors')
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
tool_class
-
-
class
oio.cli.admin.item_repair.
ContainerRepair
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ContainerCommandMixin
,oio.cli.admin.item_repair.ItemRepairCommand
Repair a container.
The steps of the repair: rebuild all missing, lost bases ; synchronize its bases ; update the counters for the account service.
-
columns
= ('Container', 'Status', 'Errors')
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
tool_class
-
-
class
oio.cli.admin.item_repair.
ItemRepairCommand
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ToolCommandMixin
,cliff.lister.Lister
Various parameters that apply to all repair commands.
-
columns
= None
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
logger
-
repairer
= None
-
run
(parsed_args)[source] Invoked by the application when the command is run.
Developers implementing commands should override
take_action()
.Developers creating new command base classes (such as
Lister
andShowOne
) should override this method to wraptake_action()
.Return the value returned by
take_action()
or 0.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.item_repair.
ObjectRepair
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ObjectCommandMixin
,oio.cli.admin.item_repair.ItemRepairCommand
Repair an object.
The steps of the repair: rebuild all missing, lost or corrupt chunks ; update the counters for the account service.
-
columns
= ('Object', 'Status', 'Errors')
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
tool_class
alias of
oio.content.repairer.ContentRepairer
-
oio.cli.admin.item_vacuum module
-
class
oio.cli.admin.item_vacuum.
ContainerVacuum
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ContainerCommandMixin
,cliff.lister.Lister
Vacuum (defragment) a database.
Execute the operation on the master service, then resynchronize the database on the slaves.
-
columns
= ('Container', 'Status')
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
oio.cli.admin.service_check module
-
class
oio.cli.admin.service_check.
BaseCheckCommand
(*args, **kwargs)[source] Bases:
cliff.lister.Lister
Base class for all check commands.
-
SRV
= None
-
columns
= ('Status', 'Errors')
-
static
filter_services
(srv, srvtype)[source]
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
load_catalog
(parsed_args)[source]
-
load_catalog_from_file
(path)[source]
-
load_live_services
()[source]
-
logger
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
zookeeper
()[source]
-
-
class
oio.cli.admin.service_check.
DirectoryCheck
(*args, **kwargs)[source] Bases:
oio.cli.admin.service_check.BaseCheckCommand
Check the directory has been fully bootstraped.
Check all container prefixes are set, from oioproxy and meta0. Check all meta0 show the same information. Check all meta1 are assigned.
-
class
oio.cli.admin.service_check.
Meta0Check
(*args, **kwargs)[source] Bases:
oio.cli.admin.service_check.BaseCheckCommand
Check the state of the meta0 services.
Check registered instances in zookeeper.
-
SRV
= 'meta0'
-
-
class
oio.cli.admin.service_check.
Meta1Check
(*args, **kwargs)[source] Bases:
oio.cli.admin.service_check.BaseCheckCommand
Check the state of meta1 services.
Compare registered instances against deployed instances.
-
SRV
= 'meta1'
-
-
class
oio.cli.admin.service_check.
RawxCheck
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.MultipleServicesCommandMixin
,oio.cli.admin.item_check.ItemCheckCommand
Check all rawx chunks.
Every chunk will also have his account, container and object quickly checked. This is similar to ‘openio-admin chunk check’ but for every chunk hosted by the service.
Default output format is ‘value’.
-
check_chunks
(service, chunks, checker)[source]
-
columns
= ('Chunk', 'Status', 'Errors')
-
formatter_default
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
reqid_prefix
= 'ACLI-RC-'
-
service_type
= 'rawx'
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.service_check.
RdirCheck
(*args, **kwargs)[source] Bases:
oio.cli.admin.service_check.BaseCheckCommand
Check rdir services.
Verify that all rawx and meta2 services are assigned. Check registered rdir services against deployed rdir services.
oio.cli.admin.service_config module
-
class
oio.cli.admin.service_config.
ProxyGetConfig
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ProxyCommandMixin
,cliff.show.ShowOne
Get all configuration parameters from the specified proxy service.
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
logger
-
take_action
(parsed_args)[source] Return a two-part tuple with a tuple of column names and a tuple of values.
-
-
class
oio.cli.admin.service_config.
ProxySetConfig
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ProxyCommandMixin
,oio.cli.admin.service_config.SetConfigCommand
Set configuration parameters on the specified proxy service.
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.service_config.
ServiceGetConfig
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.SingleServiceCommandMixin
,cliff.show.ShowOne
Get all configuration parameters from the specified service.
Works on all services using ASN.1 protocol (conscience, meta0, meta1, meta2).
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
logger
-
take_action
(parsed_args)[source] Return a two-part tuple with a tuple of column names and a tuple of values.
-
-
class
oio.cli.admin.service_config.
ServiceSetConfig
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.SingleServiceCommandMixin
,oio.cli.admin.service_config.SetConfigCommand
Set configuration parameters on the specified service.
Works on all services using ASN.1 protocol (conscience, meta0, meta1, meta2).
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.service_config.
SetConfigCommand
(app, app_args, cmd_name=None)[source] Bases:
cliff.lister.Lister
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
logger
-
run
(parsed_args)[source] Invoked by the application when the command is run.
Developers implementing commands should override
take_action()
.Developers creating new command base classes (such as
Lister
andShowOne
) should override this method to wraptake_action()
.Return the value returned by
take_action()
or 0.
-
success
= True
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
oio.cli.admin.service_decache module
-
class
oio.cli.admin.service_decache.
DecacheCommand
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.MultipleServicesCommandMixin
,cliff.lister.Lister
Base class for all decache commands.
-
admin
Get an instance of AdminClient.
-
columns
= ('Id', 'Status', 'Errors')
-
decache_services
(services)[source] Send a decache request to each specified service.
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
logger
-
run
(parsed_args)[source] Invoked by the application when the command is run.
Developers implementing commands should override
take_action()
.Developers creating new command base classes (such as
Lister
andShowOne
) should override this method to wraptake_action()
.Return the value returned by
take_action()
or 0.
-
success
= True
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.admin.service_decache.
Meta1Decache
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.service_decache.SqliterepoDecacheCommand
Flush the cache of a meta1 service.
-
service_type
= 'meta1'
-
-
class
oio.cli.admin.service_decache.
Meta2Decache
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.service_decache.SqliterepoDecacheCommand
Flush the cache of a meta2 service.
-
service_type
= 'meta2'
-
-
class
oio.cli.admin.service_decache.
ProxyDecache
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.service_decache.DecacheCommand
Flush the cache of a proxy service.
-
decache_services
(services)[source] Send a decache request to each specified service.
-
service_type
= 'oioproxy'
-
-
class
oio.cli.admin.service_decache.
SqliterepoDecacheCommand
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.service_decache.DecacheCommand
Flush the cache of an sqliterepo-based service.
-
decache_services
(services)[source] Send a decache request to each specified service.
-
oio.cli.admin.service_info module
-
class
oio.cli.admin.service_info.
ServiceInfo
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.SingleServiceCommandMixin
,cliff.show.ShowOne
Get all information from the specified service.
Works on all services using ASN.1 protocol except conscience (meta0, meta1, meta2).
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
logger
-
take_action
(parsed_args)[source] Return a two-part tuple with a tuple of column names and a tuple of values.
-
oio.cli.admin.service_list module
-
class
oio.cli.admin.service_list.
Meta2ListContainers
(*args, **kwargs)[source] Bases:
oio.cli.admin.service_list.ServiceListCommand
List containers hosted by the specified meta2 service.
-
columns
= ('Name',)
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
reqid_prefix
= 'ACLI-M2LC-'
-
-
class
oio.cli.admin.service_list.
RawxListContainers
(*args, **kwargs)[source] Bases:
oio.cli.admin.service_list.ServiceListCommand
List containers having chunks stored on the specified rawx service.
-
columns
= ('Name', 'Chunks')
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
reqid_prefix
= 'ACLI-RLC-'
-
-
class
oio.cli.admin.service_list.
ServiceListCommand
(*args, **kwargs)[source] Bases:
oio.cli.admin.common.SingleServiceCommandMixin
,cliff.lister.Lister
A command to display items of a specific service
-
columns
= None
-
dir
Get an instance of DirectoryClient.
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
logger
-
rdir
Get an instance of RdirClient.
-
reqid_prefix
= 'ACLI-LST-'
-
storage
Get an instance of ObjectStorageApi.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
translate_cid
(cid)[source] Resolve a CID into account/container names.
-
oio.cli.admin.service_rebuild module
-
class
oio.cli.admin.service_rebuild.
AccountServiceRebuild
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.service_rebuild.ServiceRebuildCommand
Rebuild account services. The steps of the rebuilding: recompute the counter of all accounts ; refresh the counter of all containers.
-
columns
= ('Entry', 'Status', 'Errors')
-
tool_class
-
-
class
oio.cli.admin.service_rebuild.
Meta1Rebuild
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.service_rebuild.ServiceRebuildCommand
Rebuild meta1 databases. To rebuild, the ‘last_rebuild’ property is set in admin table, thus triggering a replication. And print the failed container IDs.
-
columns
= ('Prefix', 'Status', 'Errors')
-
run
(parsed_args)[source] Invoked by the application when the command is run.
Developers implementing commands should override
take_action()
.Developers creating new command base classes (such as
Lister
andShowOne
) should override this method to wraptake_action()
.Return the value returned by
take_action()
or 0.
-
success
= False
-
tool_class
-
-
class
oio.cli.admin.service_rebuild.
Meta2Rebuild
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.SingleServiceCommandMixin
,oio.cli.admin.service_rebuild.ServiceRebuildCommand
Rebuild meta2 databases that were on the specified volume. The steps of the rebuilding: rebuild all missing, lost bases ; synchronize the bases.
-
columns
= ('Reference', 'Status', 'Errors')
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
rebuilder
= None
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
tool_class
-
-
class
oio.cli.admin.service_rebuild.
RawxDistributedRebuild
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.service_rebuild.RawxRebuildCommand
Rebuild chunks that were on the specified volume across the platform. It is necessary to declare an incident (with ‘openio volume admin incident’) before running this command.
-
distributed
= True
-
-
class
oio.cli.admin.service_rebuild.
RawxRebuild
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.service_rebuild.RawxRebuildCommand
Rebuild chunks that were on the specified volume. It is necessary to declare an incident (with ‘openio volume admin incident’) before running this command.
-
class
oio.cli.admin.service_rebuild.
RawxRebuildCommand
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.SingleServiceCommandMixin
,oio.cli.admin.service_rebuild.ServiceRebuildCommand
-
columns
= ('Chunk', 'Status', 'Errors')
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
tool_class
alias of
oio.blob.rebuilder.BlobRebuilder
-
-
class
oio.cli.admin.service_rebuild.
ServiceRebuildCommand
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.admin.common.ToolCommandMixin
,cliff.lister.Lister
Various parameters that apply to all rebuild commands.
-
columns
= None
-
formatter_default
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
logger
-
rebuilder
= None
-
run
(parsed_args)[source] Invoked by the application when the command is run.
Developers implementing commands should override
take_action()
.Developers creating new command base classes (such as
Lister
andShowOne
) should override this method to wraptake_action()
.Return the value returned by
take_action()
or 0.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
Module contents
Command-line interface for OpenIO SDS cluster administration.
-
class
oio.cli.admin.
OpenioAdminApp
[source] Bases:
oio.cli.common.shell.CommonShell
-
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.
-
request_id
(prefix='ACLI-')[source] Get an ID for requests generated by this application. If the user has specified a request ID, return it. Otherwise, generate one with the specified prefix.
-
-
oio.cli.admin.
main
(argv=['-v', '-E', '-d', '/tmp/sphinx', 'doc2', '/home/docbuild/repo/oio-docs/result-docs'])[source]