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:
morganrOL 2015-06-01 17:21:15 +02:00 committed by Morgan Richomme
parent b1ee60eef2
commit 238ca0c3d2
8 changed files with 20 additions and 6 deletions

View File

@ -126,6 +126,7 @@ class ExistingCloud(engine.EngineFactory):
endpoint=common.get("endpoint"),
domain_name=user.get("domain_name"),
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"),
https_insecure=common.get("https_insecure", False),
https_cacert=common.get("https_cacert")

View File

@ -22,7 +22,8 @@ class Endpoint(object):
permission=consts.EndpointPermission.USER,
region_name=None, endpoint_type=consts.EndpointType.PUBLIC,
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):
self.auth_url = auth_url
self.username = username
@ -33,6 +34,7 @@ class Endpoint(object):
self.endpoint_type = endpoint_type
self.domain_name = domain_name
self.user_domain_name = user_domain_name
self.admin_domain_name = admin_domain_name
self.project_domain_name = project_domain_name
self.endpoint = endpoint
self.insecure = https_insecure
@ -52,6 +54,7 @@ class Endpoint(object):
"https_insecure": self.insecure,
"https_cacert": self.cacert,
"user_domain_name": self.user_domain_name,
"admin_domain_name": self.admin_domain_name,
"project_domain_name": self.project_domain_name}
if include_permission:
dct["permission"] = self.permission

View File

@ -200,6 +200,8 @@ class TempestConf(object):
self.conf.set(section_name, "uri", self.endpoint["auth_url"])
self.conf.set(section_name, "uri_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"):
if "neutron" in self.available_services:

View File

@ -7,6 +7,7 @@
"username": "admin",
"password": "myadminpass",
"user_domain_name": "admin",
"admin_domain_name": "default",
"project_name": "admin",
"project_domain_name": "admin",
},

View File

@ -41,6 +41,7 @@ class TestExistingCloud(test.TestCase):
"domain_name": None,
"project_domain_name": "Default",
"user_domain_name": "Default",
"admin_domain_name": "Default",
}
}
}

View File

@ -36,7 +36,8 @@ class EndpointTestCase(test.TestCase):
"https_insecure": None,
"https_cacert": None,
"project_domain_name": "Default",
"user_domain_name": "Default"})
"user_domain_name": "Default",
"admin_domain_name": "Default"})
def test_to_dict_with_include_permission(self):
endpoint = objects.Endpoint("foo_url", "foo_user", "foo_password",
@ -55,7 +56,8 @@ class EndpointTestCase(test.TestCase):
"https_insecure": None,
"https_cacert": None,
"project_domain_name": "Default",
"user_domain_name": "Default"})
"user_domain_name": "Default",
"admin_domain_name": "Default"})
def test_to_dict_with_kwarg_endpoint(self):
endpoint = objects.Endpoint("foo_url", "foo_user", "foo_password",
@ -74,4 +76,5 @@ class EndpointTestCase(test.TestCase):
"https_insecure": None,
"https_cacert": None,
"project_domain_name": "Default",
"user_domain_name": "Default"})
"user_domain_name": "Default",
"admin_domain_name": "Default"})

View File

@ -37,7 +37,8 @@ FAKE_DEPLOYMENT_CONFIG = {
"tenant_name": "demo",
"domain_name": None,
"project_domain_name": "Default",
"user_domain_name": "Default"
"user_domain_name": "Default",
"admin_domain_name": "Default"
},
"region_name": "RegionOne",
"endpoint_type": consts.EndpointType.INTERNAL,

View File

@ -41,7 +41,8 @@ class ConfigTestCase(test.TestCase):
"tenant_name": "test",
"password": "test",
"auth_url": "http://test/v2.0",
"permission": "admin"}
"permission": "admin",
"admin_domain_name": "Default"}
mock_get.return_value = {"admin": self.endpoint}
self.deployment = "fake_deployment"
self.conf_generator = config.TempestConf(self.deployment)
@ -241,6 +242,7 @@ class ConfigTestCase(test.TestCase):
("admin_username", self.endpoint["username"]),
("admin_password", self.endpoint["password"]),
("admin_tenant_name", self.endpoint["username"]),
("admin_domain_name", self.endpoint["admin_domain_name"]),
("uri", self.endpoint["auth_url"]),
("uri_v3", self.endpoint["auth_url"].replace("/v2.0",
"/v3")))