barman.clients.cloud_cli module#

exception barman.clients.cloud_cli.CLIErrorExitView on GitHub#

Bases: SystemExit

Dedicated exit code for CLI level errors.

__init__()View on GitHub#
class barman.clients.cloud_cli.CloudArgumentParser(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=<class 'argparse.HelpFormatter'>, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True, allow_abbrev=True, exit_on_error=True)View on GitHub#

Bases: ArgumentParser

ArgumentParser which exits with CLIErrorExit on errors.

error(message: string)View on GitHub#

Prints a usage message incorporating the message to stderr and exits.

If you override this in a subclass, it should not return – it should either exit or raise an exception.

exception barman.clients.cloud_cli.GeneralErrorExitView on GitHub#

Bases: SystemExit

Dedicated exit code for general barman cloud errors.

__init__()View on GitHub#
exception barman.clients.cloud_cli.NetworkErrorExitView on GitHub#

Bases: SystemExit

Dedicated exit code for network related errors.

__init__()View on GitHub#
exception barman.clients.cloud_cli.OperationErrorExitView on GitHub#

Bases: SystemExit

Dedicated exit code for errors where connectivity to the cloud provider was ok but the operation still failed.

__init__()View on GitHub#
class barman.clients.cloud_cli.UrlArgumentTypeView on GitHub#

Bases: object

destination = 'destination'#
source = 'source'#
barman.clients.cloud_cli.__parse_tag(tag)View on GitHub#

Parse key,value tag with csv reader

barman.clients.cloud_cli.add_tag_argument(parser, name, help)View on GitHub#
barman.clients.cloud_cli.create_argument_parser(description, source_or_destination='source')View on GitHub#

Create a barman-cloud argument parser with the given description.

Returns an argparse.ArgumentParser object which parses the core arguments and options for barman-cloud commands.

barman.clients.cloud_cli.get_missing_attrs(config, attrs)View on GitHub#

Returns list of each attr not found in config.

Parameters:
  • config (argparse.Namespace) – The backup options provided at the command line.

  • attrs (list[str]) – List of attribute names to be searched for in the config.

Return type:

list[str]

Returns:

List of all items in attrs which were not found as attributes of config.