mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-27 10:21:49 -05:00
Merge pull request #137 from matburt/openstack_inventory_support
Openstack inventory support
This commit is contained in:
@@ -56,7 +56,7 @@ PERMISSION_TYPE_CHOICES = [
|
||||
(PERM_JOBTEMPLATE_CREATE, _('Create a Job Template')),
|
||||
]
|
||||
|
||||
CLOUD_INVENTORY_SOURCES = ['ec2', 'rax', 'vmware', 'gce', 'azure', 'custom']
|
||||
CLOUD_INVENTORY_SOURCES = ['ec2', 'rax', 'vmware', 'gce', 'azure', 'openstack', 'custom']
|
||||
|
||||
VERBOSITY_CHOICES = [
|
||||
(0, '0 (Normal)'),
|
||||
|
||||
@@ -34,6 +34,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique):
|
||||
('vmware', _('VMware vCenter')),
|
||||
('gce', _('Google Compute Engine')),
|
||||
('azure', _('Microsoft Azure')),
|
||||
('openstack', _('Openstack')),
|
||||
]
|
||||
|
||||
BECOME_METHOD_CHOICES = [
|
||||
|
||||
@@ -740,6 +740,7 @@ class InventorySourceOptions(BaseModel):
|
||||
('gce', _('Google Compute Engine')),
|
||||
('azure', _('Microsoft Azure')),
|
||||
('vmware', _('VMware vCenter')),
|
||||
('openstack', _('Openstack')),
|
||||
('custom', _('Custom Script')),
|
||||
]
|
||||
|
||||
@@ -963,6 +964,11 @@ class InventorySourceOptions(BaseModel):
|
||||
"""
|
||||
return [('all', 'All')]
|
||||
|
||||
@classmethod
|
||||
def get_openstack_region_choices(self):
|
||||
"""I don't think openstack has regions"""
|
||||
return [('all', 'All')]
|
||||
|
||||
def clean_credential(self):
|
||||
if not self.source:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user