mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
Add project_region_name input
This commit is contained in:
parent
06fa2a9e26
commit
bfb00aecbe
@ -819,6 +819,11 @@ ManagedCredentialType(
|
||||
'It is only needed for Keystone v3 authentication '
|
||||
'URLs. Refer to Ansible Tower documentation for '
|
||||
'common scenarios.')
|
||||
}, {
|
||||
'id': 'region',
|
||||
'label': ugettext_noop('Region Name'),
|
||||
'type': 'string',
|
||||
'help_text': ugettext_noop('For some cloud providers, like OVH, region must be specified'),
|
||||
}, {
|
||||
'id': 'verify_ssl',
|
||||
'label': ugettext_noop('Verify SSL'),
|
||||
|
||||
@ -82,14 +82,30 @@ def _openstack_data(cred):
|
||||
if cred.has_input('domain'):
|
||||
openstack_auth['domain_name'] = cred.get_input('domain', default='')
|
||||
verify_state = cred.get_input('verify_ssl', default=True)
|
||||
|
||||
# if cred.has_input('project_region_name'):
|
||||
# openstack_data = {
|
||||
# 'clouds': {
|
||||
# 'devstack': {
|
||||
# 'auth': openstack_auth,
|
||||
# 'verify': verify_state,
|
||||
# 'region_name': cred.get_input('project_region_name', default='')
|
||||
# },
|
||||
# },
|
||||
# }
|
||||
# else:
|
||||
openstack_data = {
|
||||
'clouds': {
|
||||
'devstack': {
|
||||
'auth': openstack_auth,
|
||||
'verify': verify_state,
|
||||
'verify': verify_state
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if cred.has_input('project_region_name'):
|
||||
openstack_data['clouds']['devstack']['region_name'] = cred.get_input('project_region_name', default='')
|
||||
|
||||
return openstack_data
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user