tempest: add `admin_domain_name' to generated conf
Add admin_domain_name=default of autogenerated tempest.conf This line prevents the keystone v3 related tests to be declared as failure. Closes-Bug:1460680 Change-Id: I9e0eeb2e9392df17fc0e0c71bf9268482e921ac9 Signed-off-by: morganrOL <morgan.richomme@orange.com>
This commit is contained in:
parent
b1ee60eef2
commit
238ca0c3d2
@ -126,6 +126,7 @@ class ExistingCloud(engine.EngineFactory):
|
|||||||
endpoint=common.get("endpoint"),
|
endpoint=common.get("endpoint"),
|
||||||
domain_name=user.get("domain_name"),
|
domain_name=user.get("domain_name"),
|
||||||
user_domain_name=user.get("user_domain_name", "Default"),
|
user_domain_name=user.get("user_domain_name", "Default"),
|
||||||
|
admin_domain_name=user.get("admin_domain_name", "Default"),
|
||||||
project_domain_name=user.get("project_domain_name", "Default"),
|
project_domain_name=user.get("project_domain_name", "Default"),
|
||||||
https_insecure=common.get("https_insecure", False),
|
https_insecure=common.get("https_insecure", False),
|
||||||
https_cacert=common.get("https_cacert")
|
https_cacert=common.get("https_cacert")
|
||||||
|
@ -22,7 +22,8 @@ class Endpoint(object):
|
|||||||
permission=consts.EndpointPermission.USER,
|
permission=consts.EndpointPermission.USER,
|
||||||
region_name=None, endpoint_type=consts.EndpointType.PUBLIC,
|
region_name=None, endpoint_type=consts.EndpointType.PUBLIC,
|
||||||
admin_port=None, domain_name=None, endpoint=None,
|
admin_port=None, domain_name=None, endpoint=None,
|
||||||
user_domain_name="Default", project_domain_name="Default",
|
user_domain_name="Default", admin_domain_name="Default",
|
||||||
|
project_domain_name="Default",
|
||||||
https_insecure=None, https_cacert=None):
|
https_insecure=None, https_cacert=None):
|
||||||
self.auth_url = auth_url
|
self.auth_url = auth_url
|
||||||
self.username = username
|
self.username = username
|
||||||
@ -33,6 +34,7 @@ class Endpoint(object):
|
|||||||
self.endpoint_type = endpoint_type
|
self.endpoint_type = endpoint_type
|
||||||
self.domain_name = domain_name
|
self.domain_name = domain_name
|
||||||
self.user_domain_name = user_domain_name
|
self.user_domain_name = user_domain_name
|
||||||
|
self.admin_domain_name = admin_domain_name
|
||||||
self.project_domain_name = project_domain_name
|
self.project_domain_name = project_domain_name
|
||||||
self.endpoint = endpoint
|
self.endpoint = endpoint
|
||||||
self.insecure = https_insecure
|
self.insecure = https_insecure
|
||||||
@ -52,6 +54,7 @@ class Endpoint(object):
|
|||||||
"https_insecure": self.insecure,
|
"https_insecure": self.insecure,
|
||||||
"https_cacert": self.cacert,
|
"https_cacert": self.cacert,
|
||||||
"user_domain_name": self.user_domain_name,
|
"user_domain_name": self.user_domain_name,
|
||||||
|
"admin_domain_name": self.admin_domain_name,
|
||||||
"project_domain_name": self.project_domain_name}
|
"project_domain_name": self.project_domain_name}
|
||||||
if include_permission:
|
if include_permission:
|
||||||
dct["permission"] = self.permission
|
dct["permission"] = self.permission
|
||||||
|
@ -200,6 +200,8 @@ class TempestConf(object):
|
|||||||
self.conf.set(section_name, "uri", self.endpoint["auth_url"])
|
self.conf.set(section_name, "uri", self.endpoint["auth_url"])
|
||||||
self.conf.set(section_name, "uri_v3",
|
self.conf.set(section_name, "uri_v3",
|
||||||
self.endpoint["auth_url"].replace("/v2.0", "/v3"))
|
self.endpoint["auth_url"].replace("/v2.0", "/v3"))
|
||||||
|
self.conf.set(section_name, "admin_domain_name",
|
||||||
|
self.endpoint["admin_domain_name"])
|
||||||
|
|
||||||
def _set_network(self, section_name="network"):
|
def _set_network(self, section_name="network"):
|
||||||
if "neutron" in self.available_services:
|
if "neutron" in self.available_services:
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"username": "admin",
|
"username": "admin",
|
||||||
"password": "myadminpass",
|
"password": "myadminpass",
|
||||||
"user_domain_name": "admin",
|
"user_domain_name": "admin",
|
||||||
|
"admin_domain_name": "default",
|
||||||
"project_name": "admin",
|
"project_name": "admin",
|
||||||
"project_domain_name": "admin",
|
"project_domain_name": "admin",
|
||||||
},
|
},
|
||||||
|
@ -41,6 +41,7 @@ class TestExistingCloud(test.TestCase):
|
|||||||
"domain_name": None,
|
"domain_name": None,
|
||||||
"project_domain_name": "Default",
|
"project_domain_name": "Default",
|
||||||
"user_domain_name": "Default",
|
"user_domain_name": "Default",
|
||||||
|
"admin_domain_name": "Default",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,8 @@ class EndpointTestCase(test.TestCase):
|
|||||||
"https_insecure": None,
|
"https_insecure": None,
|
||||||
"https_cacert": None,
|
"https_cacert": None,
|
||||||
"project_domain_name": "Default",
|
"project_domain_name": "Default",
|
||||||
"user_domain_name": "Default"})
|
"user_domain_name": "Default",
|
||||||
|
"admin_domain_name": "Default"})
|
||||||
|
|
||||||
def test_to_dict_with_include_permission(self):
|
def test_to_dict_with_include_permission(self):
|
||||||
endpoint = objects.Endpoint("foo_url", "foo_user", "foo_password",
|
endpoint = objects.Endpoint("foo_url", "foo_user", "foo_password",
|
||||||
@ -55,7 +56,8 @@ class EndpointTestCase(test.TestCase):
|
|||||||
"https_insecure": None,
|
"https_insecure": None,
|
||||||
"https_cacert": None,
|
"https_cacert": None,
|
||||||
"project_domain_name": "Default",
|
"project_domain_name": "Default",
|
||||||
"user_domain_name": "Default"})
|
"user_domain_name": "Default",
|
||||||
|
"admin_domain_name": "Default"})
|
||||||
|
|
||||||
def test_to_dict_with_kwarg_endpoint(self):
|
def test_to_dict_with_kwarg_endpoint(self):
|
||||||
endpoint = objects.Endpoint("foo_url", "foo_user", "foo_password",
|
endpoint = objects.Endpoint("foo_url", "foo_user", "foo_password",
|
||||||
@ -74,4 +76,5 @@ class EndpointTestCase(test.TestCase):
|
|||||||
"https_insecure": None,
|
"https_insecure": None,
|
||||||
"https_cacert": None,
|
"https_cacert": None,
|
||||||
"project_domain_name": "Default",
|
"project_domain_name": "Default",
|
||||||
"user_domain_name": "Default"})
|
"user_domain_name": "Default",
|
||||||
|
"admin_domain_name": "Default"})
|
||||||
|
@ -37,7 +37,8 @@ FAKE_DEPLOYMENT_CONFIG = {
|
|||||||
"tenant_name": "demo",
|
"tenant_name": "demo",
|
||||||
"domain_name": None,
|
"domain_name": None,
|
||||||
"project_domain_name": "Default",
|
"project_domain_name": "Default",
|
||||||
"user_domain_name": "Default"
|
"user_domain_name": "Default",
|
||||||
|
"admin_domain_name": "Default"
|
||||||
},
|
},
|
||||||
"region_name": "RegionOne",
|
"region_name": "RegionOne",
|
||||||
"endpoint_type": consts.EndpointType.INTERNAL,
|
"endpoint_type": consts.EndpointType.INTERNAL,
|
||||||
|
@ -41,7 +41,8 @@ class ConfigTestCase(test.TestCase):
|
|||||||
"tenant_name": "test",
|
"tenant_name": "test",
|
||||||
"password": "test",
|
"password": "test",
|
||||||
"auth_url": "http://test/v2.0",
|
"auth_url": "http://test/v2.0",
|
||||||
"permission": "admin"}
|
"permission": "admin",
|
||||||
|
"admin_domain_name": "Default"}
|
||||||
mock_get.return_value = {"admin": self.endpoint}
|
mock_get.return_value = {"admin": self.endpoint}
|
||||||
self.deployment = "fake_deployment"
|
self.deployment = "fake_deployment"
|
||||||
self.conf_generator = config.TempestConf(self.deployment)
|
self.conf_generator = config.TempestConf(self.deployment)
|
||||||
@ -241,6 +242,7 @@ class ConfigTestCase(test.TestCase):
|
|||||||
("admin_username", self.endpoint["username"]),
|
("admin_username", self.endpoint["username"]),
|
||||||
("admin_password", self.endpoint["password"]),
|
("admin_password", self.endpoint["password"]),
|
||||||
("admin_tenant_name", self.endpoint["username"]),
|
("admin_tenant_name", self.endpoint["username"]),
|
||||||
|
("admin_domain_name", self.endpoint["admin_domain_name"]),
|
||||||
("uri", self.endpoint["auth_url"]),
|
("uri", self.endpoint["auth_url"]),
|
||||||
("uri_v3", self.endpoint["auth_url"].replace("/v2.0",
|
("uri_v3", self.endpoint["auth_url"].replace("/v2.0",
|
||||||
"/v3")))
|
"/v3")))
|
||||||
|
Loading…
Reference in New Issue
Block a user