Ejemplo n.º 1
0
def make_config():
    """Build an inventory configuration from the sample AIO files.

    Take any files specified as '.aio' and load their keys into a
    configuration dict  and write them out to a file for consumption by
    the tests.
    """
    # Allow access here so we can populate the dictionary.
    global _BASE_CONFIG

    _BASE_CONFIG = tools.make_example_config(AIO_CONFIG_FILE, CONFD)

    tools.write_example_config(USER_CONFIG_FILE, _BASE_CONFIG)
Ejemplo n.º 2
0
def make_config():
    """Build an inventory configuration from the sample AIO files.

    Take any files specified as '.aio' and load their keys into a
    configuration dict  and write them out to a file for consumption by
    the tests.
    """
    # Allow access here so we can populate the dictionary.
    global _BASE_CONFIG

    _BASE_CONFIG = tools.make_example_config(AIO_CONFIG_FILE, CONFD)

    tools.write_example_config(USER_CONFIG_FILE, _BASE_CONFIG)
Ejemplo n.º 3
0
    )

    parser.add_argument(
        '--base',
        '-b',
        help="Base file to be used.",
    )

    parser.add_argument(
        '--conf_dir',
        '-c',
        help=("Directory of service-specific configuration files.\n"
              "Only files ending in *.aio will be processed"),
    )

    parser.add_argument('--output',
                        '-o',
                        help=("Path to combined output file, defaults to "
                              "./openstack_user_config.yml"),
                        default=os.path.join(os.getcwd(),
                                             'openstack_user_config.yml'))

    return vars(parser.parse_args(arg_list))


if __name__ == "__main__":
    script_args = args(sys.argv[1:])
    config = tools.make_example_config(script_args['base'],
                                       script_args['conf_dir'])
    tools.write_example_config(script_args['output'], config)
Ejemplo n.º 4
0
    parser.add_argument(
        '--base',
        '-b',
        help="Base file to be used.",
    )

    parser.add_argument(
        '--conf_dir',
        '-c',
        help=("Directory of service-specific configuration files.\n"
              "Only files ending in *.aio will be processed"),
    )

    parser.add_argument(
        '--output',
        '-o',
        help=("Path to combined output file, defaults to "
              "./openstack_user_config.yml"),
        default=os.path.join(os.getcwd(), 'openstack_user_config.yml')
    )

    return vars(parser.parse_args(arg_list))

if __name__ == "__main__":
    script_args = args(sys.argv[1:])
    config = tools.make_example_config(
        script_args['base'],
        script_args['conf_dir']
    )
    tools.write_example_config(script_args['output'], config)