Class: Fog::Compute::AzureRM::DataDisk

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/azurerm/models/compute/data_disk.rb

Overview

DataDisk Model for Compute Service

Class Method Summary collapse

Class Method Details

.parse(disk) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/fog/azurerm/models/compute/data_disk.rb', line 16

def self.parse(disk)
  disk_hash = get_hash_from_object(disk)
  disk_hash['vhd_uri'] = disk.vhd.uri if disk.vhd
  disk_hash['image_uri'] = disk.image.uri if disk.image
  disk_hash['managed_disk_id'] = disk.managed_disk.id if disk.managed_disk
  disk_hash
end