from functest.opnfv_tests.openstack.tempest import conf_utils
from functest.utils import config
from functest.utils import env
+from functest.utils import functest_utils
LOGGER = logging.getLogger(__name__)
html_file = os.path.join(self.res_dir,
"tempest-report.html")
cmd = ["rally", "verify", "report", "--type", "html", "--uuid",
- self.verification_id, "--to", html_file]
- subprocess.Popen(cmd, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
+ self.verification_id, "--to", str(html_file)]
+ subprocess.check_output(cmd)
def update_rally_regex(self, rally_conf='/etc/rally/rally.conf'):
"""Set image name as tempest img_name_regex"""
config.CONF, '{}_image_format'.format(self.case_name),
self.image_format))
extra_properties = self.extra_properties.copy()
- if env.get('IMG_PROP'):
- extra_properties.update(dict((k.strip(), v.strip()) for k, v in
- (item.split(': ') for item in
- env.get('IMG_PROP').split(','))))
+ if env.get('IMAGE_PROPERTIES'):
+ extra_properties.update(
+ functest_utils.convert_ini_to_dict(
+ env.get('IMAGE_PROPERTIES')))
extra_properties.update(
getattr(config.CONF, '{}_extra_properties'.format(
self.case_name), {}))
rconfig.set(
'scenario', 'img_properties',
- conf_utils.convert_dict_to_ini(extra_properties))
+ functest_utils.convert_dict_to_ini(extra_properties))
with open(self.conf_file, 'wb') as config_file:
rconfig.write(config_file)