lib/vcloud-rest/vcloud/vm.rb
def get_vm_by_name(organization, vdcName, vAppName, vmName)
      result = nil

      get_vapp_by_name(organization, vdcName, vAppName)[:vms_hash].each do |key, values|
        if key.downcase == vmName.downcase
          result = get_vm(values[:id])
        end
      end

      result
    end
def get_vm_by_name(organization, vdcName, vAppName, vmName)
      result = nil

      get_vapp_by_name(organization, vdcName, vAppName)[:vms_hash].each do |key, values|
        if key.downcase == vmName.downcase
          result = get_vm(values[:id])
        end
      end

      result
    end
def get_vm_by_name ( organization , vdcName , vAppName , vmName ) result = nil get_vapp_by_name ( organization , vdcName , vAppName ) [ :vms_hash ] . each do | key , values | if key . downcase == vmName . downcase result = get_vm ( values [ :id ] ) end end result end
Friendly helper method to fetch a vApp by name
 - Organization object
 - Organization VDC Name
 - vApp Name
 - VM Name
Friendly helper method to fetch a vApp by name - Organization object - Organization VDC Name - vApp Name - VM Name