1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Addition of project domain name to OpenStack Credential

Keystone v3 requires user_domain_id and project_domain_name to authenticate, but AWX openstack credential only requests the user_domain_id.
Added in project_domain_name into the credential templating. Not added as a required field as this is only needed when using Keystone v3.
This commit is contained in:
Dave Lewis 2020-04-23 11:24:51 +01:00
parent a34a63ec7f
commit 08323a11b6
2 changed files with 6 additions and 1 deletions

View File

@ -799,6 +799,10 @@ ManagedCredentialType(
'id': 'project', 'id': 'project',
'label': ugettext_noop('Project (Tenant Name)'), 'label': ugettext_noop('Project (Tenant Name)'),
'type': 'string', 'type': 'string',
}, {
'id': 'project_domain_name',
'label': ugettext_noop('Project (Domain Name)'),
'type': 'string',
}, { }, {
'id': 'domain', 'id': 'domain',
'label': ugettext_noop('Domain Name'), 'label': ugettext_noop('Domain Name'),

View File

@ -76,7 +76,8 @@ def _openstack_data(cred):
openstack_auth = dict(auth_url=cred.get_input('host', default=''), openstack_auth = dict(auth_url=cred.get_input('host', default=''),
username=cred.get_input('username', default=''), username=cred.get_input('username', default=''),
password=cred.get_input('password', default=''), password=cred.get_input('password', default=''),
project_name=cred.get_input('project', default='')) project_name=cred.get_input('project', default=''),
project_domain_name=cred.get_input('project_domain_name'))
if cred.has_input('domain'): if cred.has_input('domain'):
openstack_auth['domain_name'] = cred.get_input('domain', default='') openstack_auth['domain_name'] = cred.get_input('domain', default='')
verify_state = cred.get_input('verify_ssl', default=True) verify_state = cred.get_input('verify_ssl', default=True)