-def backup_tempest_config(conf_file):
- """
- Copy config file to tempest results directory
- """
- if not os.path.exists(TEMPEST_RESULTS_DIR):
- os.makedirs(TEMPEST_RESULTS_DIR)
- shutil.copyfile(conf_file,
- os.path.join(TEMPEST_RESULTS_DIR, 'tempest.conf'))
-
-
-def configure_tempest(deployment_dir, network_name=None, 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, network_name, image_id,
- flavor_id, compute_cnt)
-
-
-def generate_test_accounts_file(tenant_id):
- """
- Add needed tenant and user params into test_accounts.yaml
- """
-
- LOGGER.debug("Add needed params into test_accounts.yaml...")
- accounts_list = [
- {
- 'tenant_name': getattr(
- config.CONF, 'tempest_identity_tenant_name'),
- 'tenant_id': str(tenant_id),
- 'username': getattr(config.CONF, 'tempest_identity_user_name'),
- 'password': getattr(config.CONF, 'tempest_identity_user_password')
- }
- ]
-
- with open(TEST_ACCOUNTS_FILE, "w") as tfile:
- yaml.dump(accounts_list, tfile, default_flow_style=False)
-
-