- os.path.join(TEMPEST_RESULTS_DIR, 'tempest.conf'))
-
-
-def configure_tempest(deployment_dir, image_id=None, flavor_id=None,
- compute_cnt=None):
- """
- Calls rally verify and updates the generated tempest.conf with
- given parameters
- """
- conf_file = configure_verifier(deployment_dir)
- configure_tempest_update_params(conf_file, image_id, flavor_id,
- compute_cnt)
-
-
-def configure_tempest_defcore(deployment_dir, image_id, flavor_id,
- image_id_alt, flavor_id_alt, tenant_id):
- # pylint: disable=too-many-arguments
- """
- Add/update needed parameters into tempest.conf file
- """
- conf_file = configure_verifier(deployment_dir)
- configure_tempest_update_params(conf_file, image_id, flavor_id)
-
- LOGGER.debug("Updating selected tempest.conf parameters for defcore...")
- config = ConfigParser.RawConfigParser()
- config.read(conf_file)
- config.set('DEFAULT', 'log_file', '{}/tempest.log'.format(deployment_dir))
- config.set('oslo_concurrency', 'lock_path',
- '{}/lock_files'.format(deployment_dir))
- generate_test_accounts_file(tenant_id=tenant_id)
- config.set('auth', 'test_accounts_file', TEST_ACCOUNTS_FILE)
- config.set('scenario', 'img_dir', '{}'.format(deployment_dir))
- config.set('scenario', 'img_file', 'tempest-image')
- config.set('compute', 'image_ref', image_id)
- config.set('compute', 'image_ref_alt', image_id_alt)
- config.set('compute', 'flavor_ref', flavor_id)
- config.set('compute', 'flavor_ref_alt', flavor_id_alt)
-
- with open(conf_file, 'wb') as config_file:
- config.write(config_file)
-
- confpath = pkg_resources.resource_filename(
- 'functest',
- 'opnfv_tests/openstack/refstack_client/refstack_tempest.conf')
- shutil.copyfile(conf_file, confpath)
-
-
-def generate_test_accounts_file(tenant_id):
- """
- Add needed tenant and user params into test_accounts.yaml
- """