Merge pull request #6403 from ryanpetrello/fix-6380

OpenStack CredentialType needs a `domain` input field
This commit is contained in:
Ryan Petrello
2017-05-31 17:36:51 -04:00
committed by GitHub
2 changed files with 10 additions and 5 deletions

View File

@@ -751,17 +751,21 @@ def openstack(cls):
'type': 'string' 'type': 'string'
}, { }, {
'id': 'password', 'id': 'password',
'label': 'Password', 'label': 'Password (API Key)',
'type': 'string', 'type': 'string',
'secret': True, 'secret': True,
}, { }, {
'id': 'host', 'id': 'host',
'label': 'Host', 'label': 'Host (Authentication URL)',
'type': 'string', 'type': 'string',
}, { }, {
'id': 'project', 'id': 'project',
'label': 'Project', 'label': 'Project (Tenant Name)',
'type': 'string', 'type': 'string',
}, {
'id': 'domain',
'label': 'Domain Name',
'type': 'string'
}], }],
'required': ['username', 'password', 'host', 'project'] 'required': ['username', 'password', 'host', 'project']
} }

View File

@@ -122,7 +122,7 @@ def test_openstack_client_config_generation(mocker):
'credential.username': 'demo', 'credential.username': 'demo',
'credential.password': 'secrete', 'credential.password': 'secrete',
'credential.project': 'demo-project', 'credential.project': 'demo-project',
'credential.domain': None, 'credential.domain': 'my-demo-domain',
'source_vars_dict': {} 'source_vars_dict': {}
}) })
cloud_config = update.build_private_data(inventory_update) cloud_config = update.build_private_data(inventory_update)
@@ -135,7 +135,8 @@ def test_openstack_client_config_generation(mocker):
'auth_url': 'https://keystone.openstack.example.org', 'auth_url': 'https://keystone.openstack.example.org',
'password': 'secrete', 'password': 'secrete',
'project_name': 'demo-project', 'project_name': 'demo-project',
'username': 'demo' 'username': 'demo',
'domain_name': 'my-demo-domain',
}, },
'private': True 'private': True
} }