Merge "Ranger Tempest Updates:"

This commit is contained in:
Zuul 2019-02-20 19:15:24 +00:00 committed by Gerrit Code Review
commit 84e921b15d
3 changed files with 12 additions and 11 deletions

View File

@ -33,6 +33,7 @@ libssl-dev --no-install-recommends \
/usr/share/doc-base
RUN pip install -U setuptools --user
RUN pip install wheel --user
RUN pip install --upgrade six
# RUN pip install virtualenv

View File

@ -42,7 +42,7 @@ OrmGroup = [
default='8082',
help="fms port of the orm url."),
cfg.StrOpt("region_port",
default='7003',
default='8080',
help="region port of the orm url."),
cfg.BoolOpt("alt_region_available",
default=None,

View File

@ -42,10 +42,10 @@ class ImsBaseOrmTest(base.BaseOrmTest):
# setup variables
cls.region_id = CONF.identity.region
cls.tenant_id = cls._get_tenant_id(
cls.os_primary.credentials.tenant_name)
cls.alt_tenant_id = cls._get_tenant_id(
cls.os_alt.credentials.tenant_name)
cls.tenant_id = cls._get_project_id(
cls.os_primary.credentials.project_name)
cls.alt_tenant_id = cls._get_project_id(
cls.os_alt.credentials.project_name)
@classmethod
def _get_image_params(cls, set_region=True, single_tenant=True,
@ -87,12 +87,12 @@ class ImsBaseOrmTest(base.BaseOrmTest):
return post_body
@classmethod
def _get_tenant_id(cls, tenant_name):
body = cls.identity_client.list_tenants()
for tenant in body["tenants"]:
if(tenant["name"] == tenant_name):
return tenant["id"]
message = ('tenant %s not found on tenant list' % cls.tenant_name)
def _get_project_id(cls, project_name):
body = cls.identity_client.list_projects()
for project in body["projects"]:
if(project["name"] == project_name):
return project["id"]
message = ('project %s not found on project list' % project_name)
raise exceptions.TempestException(message)
@classmethod