Use both domain id and name
devstack has made keystone v3 the default, it seems
the env variables for domain names are not set.
Change-Id: Ief9314b81f8b7624ceb390c432d6487fce5b4a5e
Closes-Bug: #1646343
diff --git a/common/clients.py b/common/clients.py
index 96a34b7..afdc477 100644
--- a/common/clients.py
+++ b/common/clients.py
@@ -123,6 +123,8 @@
password=self._password())
def _get_identity_client(self):
+ user_domain_id = self.conf.user_domain_id
+ project_domain_id = self.conf.project_domain_id
user_domain_name = self.conf.user_domain_name
project_domain_name = self.conf.project_domain_name
kwargs = {
@@ -134,6 +136,8 @@
# keystone v2 can't ignore domain details
if self.auth_version == '3':
kwargs.update({
+ 'user_domain_id': user_domain_id,
+ 'project_domain_id': project_domain_id,
'user_domain_name': user_domain_name,
'project_domain_name': project_domain_name})
auth = password.Password(**kwargs)
diff --git a/common/config.py b/common/config.py
index 3cef5aa..4aa7e67 100644
--- a/common/config.py
+++ b/common/config.py
@@ -53,6 +53,12 @@
cfg.StrOpt('project_domain_name',
help="Project domain name, if keystone v3 auth_url"
"is used"),
+ cfg.StrOpt('user_domain_id',
+ help="User domain id, if keystone v3 auth_url"
+ "is used"),
+ cfg.StrOpt('project_domain_id',
+ help="Project domain id, if keystone v3 auth_url"
+ "is used"),
cfg.StrOpt('region',
help="The region name to use"),
cfg.StrOpt('instance_type',
diff --git a/functional/test_event_sinks.py b/functional/test_event_sinks.py
index e4a23ff..ea66b7d 100644
--- a/functional/test_event_sinks.py
+++ b/functional/test_event_sinks.py
@@ -43,7 +43,11 @@
'os_username': self.conf.username,
'os_password': self.conf.password,
'os_project_name': self.conf.tenant_name,
- 'os_auth_url': self.conf.auth_url
+ 'os_auth_url': self.conf.auth_url,
+ 'os_user_domain_id': self.conf.user_domain_id,
+ 'os_project_domain_id': self.conf.project_domain_id,
+ 'os_user_domain_name': self.conf.user_domain_name,
+ 'os_project_domain_name': self.conf.project_domain_name
}
}
}