mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
upgrading azure-mgmt-compute to the latest (#47601)
* upgrading azure-mgmt-compute to the latest
This commit is contained in:
parent
60dcfc3a09
commit
406da7a568
7 changed files with 25 additions and 23 deletions
|
@ -999,7 +999,7 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
|
|||
parsed_availability_set = parse_resource_id(self.availability_set)
|
||||
availability_set = self.get_availability_set(parsed_availability_set.get('resource_group', self.resource_group),
|
||||
parsed_availability_set.get('name'))
|
||||
availability_set_resource = self.compute_models.SubResource(availability_set.id)
|
||||
availability_set_resource = self.compute_models.SubResource(id=availability_set.id)
|
||||
|
||||
# Get defaults
|
||||
if not self.network_interface_names:
|
||||
|
@ -1044,7 +1044,7 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
|
|||
promotion_code=self.plan.get('promotion_code'))
|
||||
|
||||
vm_resource = self.compute_models.VirtualMachine(
|
||||
self.location,
|
||||
location=self.location,
|
||||
tags=self.tags,
|
||||
os_profile=self.compute_models.OSProfile(
|
||||
admin_username=self.admin_username,
|
||||
|
@ -1187,13 +1187,13 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
|
|||
|
||||
availability_set_resource = None
|
||||
try:
|
||||
availability_set_resource = self.compute_models.SubResource(vm_dict['properties']['availabilitySet'].get('id'))
|
||||
availability_set_resource = self.compute_models.SubResource(id=vm_dict['properties']['availabilitySet'].get('id'))
|
||||
except Exception:
|
||||
# pass if the availability set is not set
|
||||
pass
|
||||
|
||||
vm_resource = self.compute_models.VirtualMachine(
|
||||
vm_dict['location'],
|
||||
location=vm_dict['location'],
|
||||
os_profile=self.compute_models.OSProfile(
|
||||
admin_username=vm_dict['properties'].get('osProfile', {}).get('adminUsername'),
|
||||
computer_name=vm_dict['properties'].get('osProfile', {}).get('computerName')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue