-def configure_tempest():
- """
- Add/update needed parameters into tempest.conf file generated by Rally
- """
-
- creds_neutron = functest_utils.get_credentials("neutron")
- neutron_client = neutronclient.Client(**creds_neutron)
-
- logger.debug("Generating tempest.conf file...")
- cmd = "rally verify genconfig"
- functest_utils.execute_command(cmd,logger)
-
- logger.debug("Resolving deployment UUID...")
- cmd = "rally deployment list | awk '/"+DEPLOYMENT_MAME+"/ {print $2}'"
- p = subprocess.Popen(cmd, shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT);
- deployment_uuid = p.stdout.readline().rstrip()
- if deployment_uuid == "":
- logger.debug(" Rally deployment NOT found")
- return False
-
- logger.debug("Finding tempest.conf file...")
- tempest_conf_file = RALLY_INSTALLATION_DIR+"/tempest/for-deployment-" \
- +deployment_uuid+"/tempest.conf"
-
- logger.debug(" Updating fixed_network_name...")
- fixed_network = functest_utils.get_network_list(neutron_client)[0]['name']
- if fixed_network != None:
- cmd = "crudini --set "+tempest_conf_file+" compute fixed_network_name "+fixed_network
- functest_utils.execute_command(cmd,logger)
-
- return True
-
-