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
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