oio.cli.election package
Submodules
oio.cli.election.client module
oio.cli.election.election module
-
class
oio.cli.election.election.
ElectionBalance
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.Lister
Ask all the services to leave many elections.
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
log
= <logging.Logger object>
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.election.election.
ElectionCmd
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.Lister
Base class for election subcommands
-
get_params
(parsed_args)[source]
-
get_parser
(prog_name)[source] Return an
argparse.ArgumentParser
.
-
log
= <logging.Logger object>
-
-
class
oio.cli.election.election.
ElectionDebug
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.election.election.ElectionCmd
Get debugging information about an election.
-
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.election.election.
ElectionLeave
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.election.election.ElectionCmd
Ask all peers to leave an election.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.election.election.
ElectionPing
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.election.election.ElectionCmd
Trigger or refresh an election.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.election.election.
ElectionStatus
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.election.election.ElectionCmd
Get the status of an election (trigger it if necessary).
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
class
oio.cli.election.election.
ElectionSync
(app, app_args, cmd_name=None)[source] Bases:
oio.cli.election.election.ElectionCmd
Try to synchronize a dubious election.
-
take_action
(parsed_args)[source] Return a tuple containing the column names and an iterable containing the data to be listed.
-
-
oio.cli.election.election.
format_json
(parsed_args, json)[source]