lib/fog/azurerm/models/compute/server.rb in far-gem-0.5.1 vs lib/fog/azurerm/models/compute/server.rb in far-gem-0.5.2
- old
+ new
@@ -9,10 +9,11 @@
attribute :location
attribute :resource_group
attribute :vm_size
attribute :storage_account_name
attribute :os_disk_name
+ attribute :os_disk_id
attribute :os_disk_vhd_uri
attribute :os_disk_caching
attribute :publisher
attribute :offer
attribute :sku
@@ -44,10 +45,14 @@
hash['location'] = vm.location
hash['resource_group'] = get_resource_group_from_id(vm.id)
hash['vm_size'] = vm.hardware_profile.vm_size unless vm.hardware_profile.vm_size.nil?
unless vm.storage_profile.nil?
hash['os_disk_name'] = vm.storage_profile.os_disk.name
+
+ subscription_id = get_subscription_id(vm.id)
+ hash['os_disk_id'] = "/subscriptions/#{subscription_id}/resourceGroups/#{hash['resource_group']}/providers/Microsoft.Compute/disks/#{hash['os_disk_name']}"
+
hash['os_disk_size'] = vm.storage_profile.os_disk.disk_size_gb
if vm.storage_profile.os_disk.vhd.nil?
hash['managed_disk_storage_type'] = vm.storage_profile.os_disk.managed_disk.storage_account_type
else
hash['os_disk_vhd_uri'] = vm.storage_profile.os_disk.vhd.uri
@@ -226,10 +231,12 @@
vhd_path: vhd_path,
os_disk_caching: os_disk_caching,
managed_disk_storage_type: managed_disk_storage_type,
os_disk_size: os_disk_size,
tags: tags,
- image_ref: image_ref
+ image_ref: image_ref,
+ os_disk_name: os_disk_name,
+ os_disk_vhd_uri: os_disk_vhd_uri
}
end
def data_disk_params(disk_name, disk_size = nil, storage_account = nil, disk_resource_group = nil)
{