diff --git a/mistralclient/auth/keystone.py b/mistralclient/auth/keystone.py index 3b66af17..ff2694dd 100644 --- a/mistralclient/auth/keystone.py +++ b/mistralclient/auth/keystone.py @@ -62,6 +62,8 @@ class KeystoneAuthHandler(auth.AuthHandler): target_cacert = req.get('target_cacert') target_region_name = req.get('target_region_name') target_insecure = req.get('target_insecure') + user_domain_name = req.get('user_domain_name', 'Default') + project_domain_name = req.get('project_domain_name', 'Default') if project_name and project_id: raise RuntimeError( @@ -88,7 +90,9 @@ class KeystoneAuthHandler(auth.AuthHandler): auth_url=auth_url, endpoint=auth_url, cacert=cacert, - insecure=insecure + insecure=insecure, + user_domain_name=user_domain_name, + project_domain_name=project_domain_name ) keystone.authenticate() diff --git a/mistralclient/shell.py b/mistralclient/shell.py index ac0f2a7b..54f44db1 100644 --- a/mistralclient/shell.py +++ b/mistralclient/shell.py @@ -283,6 +283,24 @@ class MistralShell(app.App): help='Authentication token (Env: OS_AUTH_TOKEN)' ) + parser.add_argument( + '--os-project-domain-name', + action='store', + dest='project_domain_name', + default=env('OS_PROJECT_DOMAIN_NAME', default='Default'), + help='Authentication project domain name' + ' (Env: OS_PROJECT_DOMAIN_NAME)' + ) + + parser.add_argument( + '--os-user-domain-name', + action='store', + dest='user_domain_name', + default=env('OS_USER_DOMAIN_NAME', default='Default'), + help='Authentication user domain name' + ' (Env: OS_USER_DOMAIN_NAME)' + ) + parser.add_argument( '--os-auth-url', action='store', @@ -490,7 +508,9 @@ class MistralShell(app.App): kwargs = { 'cert': self.options.os_cert, - 'key': self.options.os_key + 'key': self.options.os_key, + 'user_domain_name': self.options.user_domain_name, + 'project_domain_name': self.options.project_domain_name } self.client = client.client(