Merge pull request #1635 from matburt/new_azure_inventory_and_credentials

Implement Azure RM creds and inventory
This commit is contained in:
Matthew Jones
2016-04-21 14:38:13 -04:00
13 changed files with 943 additions and 15 deletions

View File

@@ -355,7 +355,7 @@ class Host(CommonModelNameNotUnique, ResourceMixin):
help_text=_('Is this host online and available for running jobs?'),
)
instance_id = models.CharField(
max_length=100,
max_length=1024,
blank=True,
default='',
)
@@ -748,7 +748,8 @@ class InventorySourceOptions(BaseModel):
('rax', _('Rackspace Cloud Servers')),
('ec2', _('Amazon EC2')),
('gce', _('Google Compute Engine')),
('azure', _('Microsoft Azure')),
('azure', _('Microsoft Azure Classic (deprecated)')),
('azure_rm', _('Microsoft Azure Resource Manager')),
('vmware', _('VMware vCenter')),
('foreman', _('Red Hat Satellite 6')),
('cloudforms', _('Red Hat CloudForms')),
@@ -969,6 +970,10 @@ class InventorySourceOptions(BaseModel):
regions.insert(0, ('all', 'All'))
return regions
@classmethod
def get_azure_rm_region_choices(self):
return InventorySourceOptions.get_azure_region_choices()
@classmethod
def get_vmware_region_choices(self):
"""Return a complete list of regions in VMware, as a list of two-tuples