Class SearchIndex


  • @Sample(name="search-index",
            description="This sample demonstrates the SearchIndex API")
    public class SearchIndex
    extends ConnectedVimServiceBase
     SearchIndex
    
     This sample demonstrates the SearchIndex API
    
     Parameters:
     url          [required] : url of the web service
     username     [required] : username for the authentication
     password     [required] : password for the authentication
     dcname       [required] : name of the datacenter
     vmdnsname    [optional] : Dns of a virtual machine
     hostdnsname  [optional] : Dns of the ESX host
     vmpath       [optional] : Inventory path of a virtual machine
     vmip         [optional] : IP Address of a virtual machine
    
     Command Line:
     Run the search index with dcName myDatacenter
     run.bat com.vmware.general.SearchIndex --url [webserviceurl]
     --username [username] --password [password] --dcName myDatacenter
    
     Run the search index with dcName myDatacenter and vmpath to virtual machine named Test
     run.bat com.vmware.general.SearchIndex --url [webserviceurl]
     --username [username] --password [password] --dcName myDatacenter
     --vmpath //DatacenterName//vm//Test
    
     Run the search index with dcName myDatacenter and hostdns 'abc.bcd.com'
     run.bat com.vmware.general.SearchIndex --url [webserviceurl]
     --username [username] --password [password]
     --dcName myDatacenter --hostDns abc.bcd.com
    
     Run the search index with dcName myDatacenter and ip of the vm as 111.123.155.21
     run.bat com.vmware.general.SearchIndex --url [webserviceurl]
     --username [username] --password [password]
     --dcName myDatacenter --vmIP 111.123.155.21
     
    • Constructor Detail

      • SearchIndex

        public SearchIndex()
    • Method Detail

      • setDcName

        @Option(name="dcname",
                description="name of the datacenter")
        public void setDcName​(java.lang.String dcName)
      • setVmDnsName

        @Option(name="vmdnsname",
                required=false,
                description="Dns of a virtual machine")
        public void setVmDnsName​(java.lang.String vmDnsName)
      • setHostDnsName

        @Option(name="hostdnsname",
                required=false,
                description="Dns of the ESX host")
        public void setHostDnsName​(java.lang.String hostDnsName)
      • setVmPath

        @Option(name="vmpath",
                required=false,
                description="Inventory path of a virtual machine")
        public void setVmPath​(java.lang.String vmPath)
      • setVmIP

        @Option(name="vmip",
                required=false,
                description="IP Address of a virtual machine")
        public void setVmIP​(java.lang.String vmIP)
      • printSoapFaultException

        public void printSoapFaultException​(jakarta.xml.ws.soap.SOAPFaultException sfe)
      • action

        @Action
        public void action()
                    throws com.vmware.vim25.RuntimeFaultFaultMsg,
                           com.vmware.vim25.InvalidPropertyFaultMsg
        Throws:
        com.vmware.vim25.RuntimeFaultFaultMsg
        com.vmware.vim25.InvalidPropertyFaultMsg