Skip to content

Commit b843240

Browse files
author
Hieu LE
committed
Ignore domain related config when using with keystone v2
Currently, "/usr/bin/openstack --insecure token issue" fails when OS_AUTH_URL and OS_IDENTITY_API_VERSION indicate keystone v2 if OS_PROJECT_DOMAIN_NAME or OS_USER_DOMAIN_NAME are set. This patchset ignore domain related configs if using with keystone v2 and print warning for each ignored config. Change-Id: I8afbda787df7855c3f8e868b0f07cbf3b9cd97fd Closes-bug: #1447704
1 parent 4cd702c commit b843240

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

openstackclient/common/clientmanager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ def setup_auth(self, required_scope=True):
200200
# ignore all domain related configs.
201201
if (self._api_version.get('identity') == '2.0' and
202202
self.auth_plugin_name.endswith('password')):
203-
LOG.warning("Ignoring domain related configs "
204-
"because identity API version is 2.0")
205203
domain_props = ['project_domain_name', 'project_domain_id',
206204
'user_domain_name', 'user_domain_id']
207205
for prop in domain_props:
208-
self._auth_params.pop(prop, None)
206+
if self._auth_params.pop(prop, None) is not None:
207+
LOG.warning("Ignoring domain related configs " +
208+
prop + " because identity API version is 2.0")
209209

210210
# For compatibility until all clients can be updated
211211
if 'project_name' in self._auth_params:

0 commit comments

Comments
 (0)