Merge pull request #137 from matburt/openstack_inventory_support

Openstack inventory support
This commit is contained in:
Matthew Jones
2015-04-14 12:43:20 -04:00
1120 changed files with 368209 additions and 2413 deletions

View File

@@ -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)'),

View File

@@ -34,6 +34,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique):
('vmware', _('VMware vCenter')),
('gce', _('Google Compute Engine')),
('azure', _('Microsoft Azure')),
('openstack', _('Openstack')),
]
BECOME_METHOD_CHOICES = [

View File

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