lib/vcloud-rest/vcloud/vm.rb
def get_vm_disk_info(vmid)
      response, headers = __get_disk_info(vmid)

      disks = []
      response.css("Item").each do |entry|
        # Pick only entries with node "HostResource"
        resource = entry.css("rasd|HostResource").first
        next unless resource

        name = entry.css("rasd|ElementName").first
        name = name.text unless name.nil?
        capacity = resource.attribute("capacity").text

        disks << {
          :name => name,
          :capacity => "#{capacity} MB"
        }
      end
      disks
    end
def get_vm_disk_info(vmid)
      response, headers = __get_disk_info(vmid)

      disks = []
      response.css("Item").each do |entry|
        # Pick only entries with node "HostResource"
        resource = entry.css("rasd|HostResource").first
        next unless resource

        name = entry.css("rasd|ElementName").first
        name = name.text unless name.nil?
        capacity = resource.attribute("capacity").text

        disks << {
          :name => name,
          :capacity => "#{capacity} MB"
        }
      end
      disks
    end
def get_vm_disk_info ( vmid ) response , headers = __get_disk_info ( vmid ) disks = [ ] response . css ( "Item" ) . each do | entry | # Pick only entries with node "HostResource" resource = entry . css ( "rasd|HostResource" ) . first next unless resource name = entry . css ( "rasd|ElementName" ) . first name = name . text unless name . nil? capacity = resource . attribute ( "capacity" ) . text disks << { :name => name , :capacity => "#{capacity} MB" } end disks end
Retrieve information about Disks
Retrieve information about Disks