Revision c25a863c src/tm_mad/vcenter/mkimage

View differences:

src/tm_mad/vcenter/mkimage
61 61

  
62 62
# Get adapter and disk type
63 63
one_vm = VCenterDriver::VIHelper.one_item(OpenNebula::VirtualMachine, vmid)
64
adapter_type = one_vm["/VM/TEMPLATE/DISK[DISK_ID=#{disk_id}]/VCENTER_ADAPTER_TYPE"]
65

  
66
# TODO disk_type support, that info is not coming thin, thick...
67
disk_type = one_vm["/VM/TEMPLATE/DISK[DISK_ID=#{disk_id}]/VCENTER_DISK_TYPE"]
68
disk_type = "thin" if disk_type.nil? || disk_type.empty?
64
adapter_type = one_vm["/VM/TEMPLATE/DISK[DISK_ID=#{disk_id}]/VCENTER_ADAPTER_TYPE"] ||
65
               VCenterDriver::VIHelper.get_default("IMAGE/TEMPLATE/VCENTER_ADAPTER_TYPE")
66
disk_type = one_vm["/VM/TEMPLATE/DISK[DISK_ID=#{disk_id}]/VCENTER_DISK_TYPE"] ||
67
            VCenterDriver::VIHelper.get_default("IMAGE/TEMPLATE/VCENTER_DISK_TYPE")
69 68

  
70 69
check_valid adapter_type, "adapter_type"
70
check_valid disk_type, "disk_type"
71 71

  
72 72
begin
73 73
    vi_client = VCenterDriver::VIClient.new_from_host(host_id)

Also available in: Unified diff