CLI Utilities

Module containing utilities for working with commandline tools.

class zaza.utilities.cli.StoreModelMapping(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)

Implement the Action API to process model arguments.

zaza.utilities.cli.add_model_parser(parser)

Add parser for model argument to supplied parser.

Parameters

parser (argparse.ArgumentParser) – argparse parser

zaza.utilities.cli.add_test_directory_argument(parser)

Add parser for location of test directory.

Parameters

parser (argparse.ArgumentParser) – argparse parser

zaza.utilities.cli.parse_arg(options, arg, multiargs=False)

Parse argparse argments.

Parameters
  • options (argparse object) – Argparse options

  • arg (string) – Argument attribute key

  • multiargs (bool) – More than one arugment or not

Returns

Argparse atrribute value

Return type

string

zaza.utilities.cli.setup_logging(log_level='INFO')

Do setup for logging.

Returns

Nothing: This fucntion is executed for its sideffect

Return type

None