示例#1
0
def setup():
    """Parse command line and configure logging"""
    opts = base_parser(
        auth.build_auth_plugins_option_parser(argparse.ArgumentParser(description="Object API Example"))
    ).parse_args()
    configure_logging(opts)
    return opts
示例#2
0
def setup():
    """Parse command line and configure logging"""
    opts = base_parser(
        auth.build_auth_plugins_option_parser(
            argparse.ArgumentParser(
                description='Object API Example'))).parse_args()
    configure_logging(opts)
    return opts
示例#3
0
def build_option_parser(parser):
    """Hook to add global options"""
    parser.add_argument('--os-identity-api-version',
                        metavar='<identity-api-version>',
                        default=utils.env('OS_IDENTITY_API_VERSION'),
                        help='Identity API version, default=' +
                        DEFAULT_API_VERSION +
                        ' (Env: OS_IDENTITY_API_VERSION)')
    return auth.build_auth_plugins_option_parser(parser)
示例#4
0
def build_option_parser(parser):
    """Hook to add global options"""
    parser.add_argument(
        '--os-identity-api-version',
        metavar='<identity-api-version>',
        default=utils.env('OS_IDENTITY_API_VERSION'),
        help='Identity API version, default=' +
             DEFAULT_API_VERSION +
             ' (Env: OS_IDENTITY_API_VERSION)')
    return auth.build_auth_plugins_option_parser(parser)