fixed deallocated vm facts problem (#52540)
This commit is contained in:
parent
a499244a53
commit
d6600b0ab6
1 changed files with 4 additions and 4 deletions
|
@ -347,10 +347,10 @@ class AzureRMVirtualMachineFacts(AzureRMModuleBase):
|
|||
disks = result['properties']['storageProfile']['dataDisks']
|
||||
for disk_index in range(len(disks)):
|
||||
new_result['data_disks'].append({
|
||||
'lun': disks[disk_index]['lun'],
|
||||
'disk_size_gb': disks[disk_index]['diskSizeGB'],
|
||||
'managed_disk_type': disks[disk_index]['managedDisk']['storageAccountType'],
|
||||
'caching': disks[disk_index]['caching']
|
||||
'lun': disks[disk_index].get('lun'),
|
||||
'disk_size_gb': disks[disk_index].get('diskSizeGB'),
|
||||
'managed_disk_type': disks[disk_index].get('managedDisk', {}).get('storageAccountType'),
|
||||
'caching': disks[disk_index].get('caching')
|
||||
})
|
||||
|
||||
new_result['network_interface_names'] = []
|
||||
|
|
Loading…
Reference in a new issue