Ejemplo n.º 1
0
def config(config_file, config_profile):
    config = oci.config.from_file(file_location=config_file, profile_name=config_profile)
    util.target_region = config['region']

    pass_phrase = os.environ.get('PYTHON_TESTS_ADMIN_PASS_PHRASE')
    if pass_phrase:
        config['pass_phrase'] = pass_phrase

    util.init_availability_domain_variables(oci.identity.IdentityClient(config), config['tenancy'])

    return config
Ejemplo n.º 2
0
def config(config_file, config_profile):
    config = oci.config.from_file(file_location=config_file, profile_name=config_profile)
    util.target_region = config['region']

    pass_phrase = os.environ.get('PYTHON_TESTS_ADMIN_PASS_PHRASE')
    if pass_phrase:
        config['pass_phrase'] = pass_phrase

    util.init_availability_domain_variables(oci.identity.IdentityClient(config), config['tenancy'])

    return config
Ejemplo n.º 3
0
def config(config_file, config_profile):
    if not os.path.exists(config_file):
        pytest.skip("Config file, {}, does not exist".format(config_file))

    config = oci.config.from_file(file_location=config_file, profile_name=config_profile)
    util.target_region = config['region']

    pass_phrase = os.environ.get('PYTHON_TESTS_ADMIN_PASS_PHRASE')
    if pass_phrase:
        config['pass_phrase'] = pass_phrase

    util.init_availability_domain_variables(oci.identity.IdentityClient(config), config['tenancy'])

    return config