Keystone v3 needs extra parameters
To support keystone v3, this commit adds project_domain_name and user_domain_name into env. Change-Id: Ic1b7e9d6bbb62f2c9aaa468c4c64d07ae34cdd20
This commit is contained in:
parent
b423e2071e
commit
a9e2a83e26
@ -62,6 +62,8 @@ class KeystoneAuthHandler(auth.AuthHandler):
|
|||||||
target_cacert = req.get('target_cacert')
|
target_cacert = req.get('target_cacert')
|
||||||
target_region_name = req.get('target_region_name')
|
target_region_name = req.get('target_region_name')
|
||||||
target_insecure = req.get('target_insecure')
|
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:
|
if project_name and project_id:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
@ -88,7 +90,9 @@ class KeystoneAuthHandler(auth.AuthHandler):
|
|||||||
auth_url=auth_url,
|
auth_url=auth_url,
|
||||||
endpoint=auth_url,
|
endpoint=auth_url,
|
||||||
cacert=cacert,
|
cacert=cacert,
|
||||||
insecure=insecure
|
insecure=insecure,
|
||||||
|
user_domain_name=user_domain_name,
|
||||||
|
project_domain_name=project_domain_name
|
||||||
)
|
)
|
||||||
|
|
||||||
keystone.authenticate()
|
keystone.authenticate()
|
||||||
|
@ -283,6 +283,24 @@ class MistralShell(app.App):
|
|||||||
help='Authentication token (Env: OS_AUTH_TOKEN)'
|
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(
|
parser.add_argument(
|
||||||
'--os-auth-url',
|
'--os-auth-url',
|
||||||
action='store',
|
action='store',
|
||||||
@ -490,7 +508,9 @@ class MistralShell(app.App):
|
|||||||
|
|
||||||
kwargs = {
|
kwargs = {
|
||||||
'cert': self.options.os_cert,
|
'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(
|
self.client = client.client(
|
||||||
|
Loading…
Reference in New Issue
Block a user