output = logfile.read()
success_testcases = []
- for match in re.findall(r'.*\{0\} (.*?)[. ]*success ', output):
+ for match in re.findall(r'.*\{\d{1,2}\} (.*?) \.{3} success ',
+ output):
success_testcases.append(match)
failed_testcases = []
- for match in re.findall(r'.*\{0\} (.*?)[. ]*fail', output):
+ for match in re.findall(r'.*\{\d{1,2}\} (.*?) \.{3} fail',
+ output):
failed_testcases.append(match)
skipped_testcases = []
- for match in re.findall(r'.*\{0\} (.*?)[. ]*skip:', output):
+ for match in re.findall(r'.*\{\d{1,2}\} (.*?) \.{3} skip:',
+ output):
skipped_testcases.append(match)
self.details = {"tests_number": stat['num_tests'],
def __init__(self):
self.guid = '-' + str(uuid.uuid4())
self.cloud = os_client_config.make_shade()
- self.domain_id = self.cloud.auth["project_domain_id"]
+ LOGGER.debug("cloud: %s", self.cloud)
+ self.domain = self.cloud.auth.get("project_domain_name", "Default")
+ LOGGER.debug("domain: %s", self.domain)
self.project = None
self.user = None
self.network = None
getattr(config.CONF, 'tempest_identity_tenant_name') + self.guid,
description=getattr(
config.CONF, 'tempest_identity_tenant_description'),
- domain_id=self.domain_id)
+ domain_id=self.domain)
LOGGER.debug("project: %s", self.project)
def _create_user(self):
password=getattr(config.CONF, 'tempest_identity_user_password'),
default_project=getattr(
config.CONF, 'tempest_identity_tenant_name') + self.guid,
- domain_id=self.domain_id)
+ domain_id=self.domain)
LOGGER.debug("user: %s", self.user)
def _create_network(self):
def _create_image(self, name):
"""Create image for tests"""
LOGGER.info("Creating image with name: '%s'", name)
+ meta = getattr(config.CONF, 'openstack_extra_properties', None)
image = self.cloud.create_image(
name, filename=getattr(config.CONF, 'openstack_image_url'),
- is_public=True)
+ is_public=True, meta=meta)
LOGGER.debug("image: %s", image)
return image