Exemple #1
0
def configure():
    """Fixture which setups up hil.cfg, and loads extensions and such."""
    tc.config_testsuite()
    tc.config_merge({
        'extensions': {
            'hil.ext.auth.null': None,
            'hil.ext.auth.keystone': '',
        },
        'hil.ext.auth.keystone': {
            'auth_url': 'http://127.0.0.1:35357/v3',
            'auth_protocol': 'http',
            'username': '******',
            'password': '******',
            'project_name': 'admin',
            'admin_user': '******',
            'admin_password': '******',
        },
    })
    # the keystone client library actually bombs out if we don't configure
    # logging:
    config.configure_logging()
    config.load_extensions()
Exemple #2
0
def configure():
    """Fixture which setups up hil.cfg, and loads extensions and such."""
    tc.config_testsuite()
    tc.config_merge({
        'extensions': {
            'hil.ext.auth.null': None,
            'hil.ext.auth.keystone': '',
        },
        'hil.ext.auth.keystone': {
            'auth_url': 'http://127.0.0.1:35357/v3',
            'auth_protocol': 'http',
            'username': '******',
            'password': '******',
            'project_name': 'admin',
            'admin_user': '******',
            'admin_password': '******',
        },
    })
    # the keystone client library actually bombs out if we don't configure
    # logging:
    config.configure_logging()
    config.load_extensions()
Exemple #3
0
def configure(tmpdir):
    """Set up HIL configuration.

    This creates a hil.cfg in tmpdir, and loads it. The file needs to be
    written out separately , since we invoke other commands that read it,
    besides the test process.
    """
    cfg = '\n'.join([
        "[extensions]",
        "hil.ext.network_allocators.null =",
        "hil.ext.auth.null =",
        "hil.ext.obm.ipmi = ",
        "[devel]",
        "dry_run = True",
        "[headnode]",
        "base_imgs = base-headnode, img1, img2, img3, img4",
        "[database]",
        "uri = sqlite:///" + tmpdir + "/hil.db",
    ])
    with open(tmpdir + '/hil.cfg', 'w') as f:
        f.write(cfg)
    config.load(tmpdir + '/hil.cfg')
    config.configure_logging()
    config.load_extensions()
Exemple #4
0
def configure():
    config_testsuite()
    config.configure_logging()
    config.load_extensions()
Exemple #5
0
def configure():
    """Set up the HIL config."""
    config_testsuite()
    config.configure_logging()
    config.load_extensions()