lib/rbvmomi/vim/Folder.rb
# Retrieve a virtual machine or host by DNS name
# @param name [String] The fully qualified domain name to find.
# @param type [Class] Return nil unless the found entity <tt>is_a? type</tt>.
# @param dc [RbVmomi::VIM::Datacenter] Restricts the query to entities in the given Datacenter.
# @return [VIM::ManagedEntity]
Retrieve a virtual machine or host by DNS name
Retrieve a virtual machine or host by DNS name
def findByDnsName name, type=RbVmomi::VIM::VirtualMachine, dc=nil
    propSpecs = {
      :entity => self, :dnsName => name,
      :vmSearch => type == RbVmomi::VIM::VirtualMachine
    }
    propSpecs[:datacenter] = dc if dc
    x = @soap.searchIndex.FindByDnsName(propSpecs)
    x if x.is_a? type
  end
def findByDnsName name , type = RbVmomi :: VIM :: VirtualMachine , dc = nil propSpecs = { :entity => self , :dnsName => name , :vmSearch => type == RbVmomi :: VIM :: VirtualMachine } propSpecs [ :datacenter ] = dc if dc x = @soap . searchIndex . FindByDnsName ( propSpecs ) x if x . is_a? type end
Retrieve a virtual machine or host by DNS name
Retrieve a virtual machine or host by DNS name
None
VIM::ManagedEntity
name
The fully qualified domain name to find.
The fully qualified domain name to find .
type
Return nil unless the found entity is_a. type.
Return nil unless the found entity is_a . type .
dc
Restricts the query to entities in the given Datacenter.
Restricts the query to entities in the given Datacenter .