mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 05:01:19 -03:30
Fix Openstack credential region implementation.
The injector wasn't using the same variable name as the model.
This commit is contained in:
parent
67f1f9ac69
commit
e93518a030
@ -92,8 +92,8 @@ def _openstack_data(cred):
|
||||
},
|
||||
}
|
||||
|
||||
if cred.has_input('project_region_name'):
|
||||
openstack_data['clouds']['devstack']['region_name'] = cred.get_input('project_region_name', default='')
|
||||
if cred.has_input('region'):
|
||||
openstack_data['clouds']['devstack']['region_name'] = cred.get_input('region', default='')
|
||||
|
||||
return openstack_data
|
||||
|
||||
|
||||
@ -8,4 +8,5 @@ clouds:
|
||||
project_name: fooo
|
||||
username: fooo
|
||||
private: true
|
||||
region_name: fooo
|
||||
verify: false
|
||||
|
||||
@ -249,7 +249,7 @@ def test_openstack_client_config_generation_with_project_domain_name(mocker, sou
|
||||
@pytest.mark.parametrize("source,expected", [
|
||||
(None, True), (False, False), (True, True)
|
||||
])
|
||||
def test_openstack_client_config_generation_with_project_region_name(mocker, source, expected, private_data_dir):
|
||||
def test_openstack_client_config_generation_with_region(mocker, source, expected, private_data_dir):
|
||||
update = tasks.RunInventoryUpdate()
|
||||
credential_type = CredentialType.defaults['openstack']()
|
||||
inputs = {
|
||||
@ -259,7 +259,7 @@ def test_openstack_client_config_generation_with_project_region_name(mocker, sou
|
||||
'project': 'demo-project',
|
||||
'domain': 'my-demo-domain',
|
||||
'project_domain_name': 'project-domain',
|
||||
'project_region_name': 'region-name',
|
||||
'region': 'region-name',
|
||||
}
|
||||
if source is not None:
|
||||
inputs['verify_ssl'] = source
|
||||
|
||||
@ -276,7 +276,7 @@
|
||||
"help_text": "OpenStack domains define administrative boundaries. It is only needed for Keystone v3 authentication URLs. Refer to Ansible Tower documentation for common scenarios."
|
||||
},
|
||||
{
|
||||
"id": "project_region_name",
|
||||
"id": "region",
|
||||
"label": "Region Name",
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user