allow access to insights credentials in /api/v1/

see: #6978
This commit is contained in:
Ryan Petrello
2017-07-17 10:12:18 -04:00
parent 32de723c6d
commit 0b6c43dac0
3 changed files with 31 additions and 4 deletions

View File

@@ -59,6 +59,7 @@ class V1Credential(object):
('azure', 'Microsoft Azure Classic (deprecated)'),
('azure_rm', 'Microsoft Azure Resource Manager'),
('openstack', 'OpenStack'),
('insights', 'Insights'),
]
FIELDS = {
'kind': models.CharField(
@@ -480,7 +481,7 @@ class CredentialType(CommonModelNameNotUnique):
requirements['kind'] = 'vault'
else:
requirements['kind'] = 'ssh'
elif kind in ('net', 'scm'):
elif kind in ('net', 'scm', 'insights'):
requirements['kind'] = kind
elif kind in kind_choices:
requirements.update(dict(