Merge pull request #9304 from wenottingham/stacks-n-such

Fix Openstack credential region implementation.

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2021-02-16 03:40:12 +00:00 committed by GitHub
commit 6e8c71a231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -8,4 +8,5 @@ clouds:
project_name: fooo
username: fooo
private: true
region_name: fooo
verify: false

View File

@ -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

View File

@ -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"
},