com.vmware.vim25.mo
Class SearchIndex

java.lang.Object
  extended by com.vmware.vim25.mo.ManagedObject
      extended by com.vmware.vim25.mo.SearchIndex

public class SearchIndex
extends ManagedObject

The managed object class corresponding to the one defined in VI SDK API reference.

Author:
Steve JIN (sjin@vmware.com)

Constructor Summary
SearchIndex(ServerConnection serverConnection, ManagedObjectReference mor)
           
 
Method Summary
 ManagedEntity[] findAllByDnsName(Datacenter datacenter, String dnsName, boolean vmSearch)
           
 ManagedEntity[] findAllByIp(Datacenter datacenter, String ip, boolean vmSearch)
           
 ManagedEntity[] findAllByUuid(Datacenter datacenter, String uuid, boolean vmSearch, boolean instanceUuid)
           
 VirtualMachine findByDatastorePath(Datacenter datacenter, String dPath)
          Find a VM by its location on a datastore
 ManagedEntity findByDnsName(Datacenter datacenter, String dnsName, boolean vmOnly)
          Find a VM or Host by its DNS name
 ManagedEntity findByInventoryPath(String inventoryPath)
          find a managed object in the inventory tree.
 ManagedEntity findByIp(Datacenter datacenter, String ip, boolean vmOnly)
          Find a Virtual Machine or Host System by its IP address.
 ManagedEntity findByUuid(Datacenter datacenter, String uuid, boolean vmOnly)
          Find a VM or Host by its UUID
 ManagedEntity findByUuid(Datacenter datacenter, String uuid, boolean vmOnly, Boolean instanceUuid)
           
 ManagedEntity findChild(ManagedEntity parent, String name)
          Find a child entity under a ManagedObjectReference in the inventory.
 
Methods inherited from class com.vmware.vim25.mo.ManagedObject
convertMors, getCurrentProperty, getDatastores, getFilter, getHosts, getManagedObject, getManagedObjects, getManagedObjects, getMOR, getNetworks, getPropertiesByPaths, getPropertyByPath, getResourcePools, getScheduledTasks, getServerConnection, getTasks, getViews, getVimService, getVms, retrieveObjectProperties, setMOR, setServerConnection, toString, waitForValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SearchIndex

public SearchIndex(ServerConnection serverConnection,
                   ManagedObjectReference mor)
Method Detail

findByInventoryPath

public ManagedEntity findByInventoryPath(String inventoryPath)
                                  throws RuntimeFault,
                                         RemoteException
find a managed object in the inventory tree.

Parameters:
inventoryPath - The inventory path to the managed object searched.
Returns:
ManagedEntity object.
Throws:
RemoteException
RuntimeFault

findByIp

public ManagedEntity findByIp(Datacenter datacenter,
                              String ip,
                              boolean vmOnly)
                       throws RuntimeFault,
                              RemoteException
Find a Virtual Machine or Host System by its IP address.

Parameters:
datacenter - The datacenter within which it searches. If null is passed, all inventory is searched.
ip - The IP address of the VM or Host.
vmOnly - When set true only searches for VM; otherwise only for Host.
Returns:
A ManagedEntity to either HostSystem or VirtualMachine having the IP address.
Throws:
RuntimeFault
RemoteException

findByDnsName

public ManagedEntity findByDnsName(Datacenter datacenter,
                                   String dnsName,
                                   boolean vmOnly)
                            throws RuntimeFault,
                                   RemoteException
Find a VM or Host by its DNS name

Parameters:
datacenter - The datacenter within which it searches. If null is passed, all inventory is searched.
dnsName - DNS name like "dev.eng.vmware.com"
vmOnly - When set true only searches for VM; otherwise only for Host.
Returns:
A ManagedEntity to either HostSystem or VirtualMachine having the DNS name.
Throws:
RemoteException
RuntimeFault

findAllByDnsName

public ManagedEntity[] findAllByDnsName(Datacenter datacenter,
                                        String dnsName,
                                        boolean vmSearch)
                                 throws RuntimeFault,
                                        RemoteException
Throws:
RuntimeFault
RemoteException
Since:
SDK4.0

findAllByIp

public ManagedEntity[] findAllByIp(Datacenter datacenter,
                                   String ip,
                                   boolean vmSearch)
                            throws RuntimeFault,
                                   RemoteException
Throws:
RuntimeFault
RemoteException
Since:
SDK4.0

findAllByUuid

public ManagedEntity[] findAllByUuid(Datacenter datacenter,
                                     String uuid,
                                     boolean vmSearch,
                                     boolean instanceUuid)
                              throws RuntimeFault,
                                     RemoteException
Throws:
RuntimeFault
RemoteException
Since:
SDK4.0

findByDatastorePath

public VirtualMachine findByDatastorePath(Datacenter datacenter,
                                          String dPath)
                                   throws InvalidDatastore,
                                          RuntimeFault,
                                          RemoteException
Find a VM by its location on a datastore

Parameters:
datacenter - The datacenter within which it searches.
dPath - The datastore path, for example, "[storage1] WinXP/WinXP.vmx".
Returns:
A VirtualMachine that pointed by the dPath
Throws:
RemoteException
RuntimeFault
InvalidDatastore

findByUuid

public ManagedEntity findByUuid(Datacenter datacenter,
                                String uuid,
                                boolean vmOnly)
                         throws RuntimeFault,
                                RemoteException
Find a VM or Host by its UUID

Parameters:
datacenter - The datacenter within which it searches. If null is passed, all inventory is searched.
uuid - The UUID of the VM or Host
vmOnly - When set true only searches for VM; otherwise only for Host
Returns:
A VM or Host.
Throws:
RemoteException
RuntimeFault

findByUuid

public ManagedEntity findByUuid(Datacenter datacenter,
                                String uuid,
                                boolean vmOnly,
                                Boolean instanceUuid)
                         throws RuntimeFault,
                                RemoteException
Throws:
RuntimeFault
RemoteException

findChild

public ManagedEntity findChild(ManagedEntity parent,
                               String name)
                        throws RuntimeFault,
                               RemoteException
Find a child entity under a ManagedObjectReference in the inventory.

Parameters:
parent - The parent managed entity.
name - The name of the child to search.
Returns:
A child entity.
Throws:
RemoteException
RuntimeFault


Copyright © 2011-2012. All Rights Reserved.