upgrading azure-mgmt-compute to the latest (#47601)

* upgrading azure-mgmt-compute to the latest
This commit is contained in:
Zim Kalinowski 2018-11-15 15:24:42 +08:00 committed by GitHub
parent 60dcfc3a09
commit 406da7a568
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 23 deletions

View file

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