lib/vcloud-rest/vcloud/vm.rb
def set_vm_disk_info(vmid, disk_info={})
      get_response, headers = __get_disk_info(vmid)

      if disk_info[:add]
        data = add_disk(get_response, disk_info)
      else
        data = edit_disk(get_response, disk_info)
      end

      params = {
        'method' => :put,
        'command' => "/vApp/vm-#{vmid}/virtualHardwareSection/disks"
      }
      put_response, headers = send_request(params, data, "application/vnd.vmware.vcloud.rasdItemsList+xml")

      task_id = headers[:location].gsub(/.*\/task\//, "")
      task_id
    end
def set_vm_disk_info(vmid, disk_info={})
      get_response, headers = __get_disk_info(vmid)

      if disk_info[:add]
        data = add_disk(get_response, disk_info)
      else
        data = edit_disk(get_response, disk_info)
      end

      params = {
        'method' => :put,
        'command' => "/vApp/vm-#{vmid}/virtualHardwareSection/disks"
      }
      put_response, headers = send_request(params, data, "application/vnd.vmware.vcloud.rasdItemsList+xml")

      task_id = headers[:location].gsub(/.*\/task\//, "")
      task_id
    end
def set_vm_disk_info ( vmid , disk_info = { } ) get_response , headers = __get_disk_info ( vmid ) if disk_info [ :add ] data = add_disk ( get_response , disk_info ) else data = edit_disk ( get_response , disk_info ) end params = { 'method' => :put , 'command' => "/vApp/vm-#{vmid}/virtualHardwareSection/disks" } put_response , headers = send_request ( params , data , "application/vnd.vmware.vcloud.rasdItemsList+xml" ) task_id = headers [ :location ] . gsub ( / \/ \/ / , "" ) task_id end
Set information about Disks

 Disks can be added, deleted or modified
Set information about Disks