Search in sources :

Example 11 with HostDatastoreBrowserSearchSpec

use of com.vmware.vim25.HostDatastoreBrowserSearchSpec in project cloudstack by apache.

the class HostDatastoreBrowserMO method searchDatastore.

public HostDatastoreBrowserSearchResults searchDatastore(String datastorePath, String fileName, boolean caseInsensitive) throws Exception {
    HostDatastoreBrowserSearchSpec spec = new HostDatastoreBrowserSearchSpec();
    spec.setSearchCaseInsensitive(caseInsensitive);
    spec.getMatchPattern().add(fileName);
    return searchDatastore(datastorePath, spec);
}
Also used : HostDatastoreBrowserSearchSpec(com.vmware.vim25.HostDatastoreBrowserSearchSpec)

Example 12 with HostDatastoreBrowserSearchSpec

use of com.vmware.vim25.HostDatastoreBrowserSearchSpec in project cloudstack by apache.

the class HostDatastoreBrowserMO method searchDatastoreSubFolders.

public ArrayList<HostDatastoreBrowserSearchResults> searchDatastoreSubFolders(String datastorePath, String fileName, boolean caseInsensitive) throws Exception {
    HostDatastoreBrowserSearchSpec spec = new HostDatastoreBrowserSearchSpec();
    spec.setSearchCaseInsensitive(caseInsensitive);
    spec.getMatchPattern().add(fileName);
    return searchDatastoreSubFolders(datastorePath, spec);
}
Also used : HostDatastoreBrowserSearchSpec(com.vmware.vim25.HostDatastoreBrowserSearchSpec)

Aggregations

HostDatastoreBrowserSearchSpec (com.vmware.vim25.HostDatastoreBrowserSearchSpec)8 HostDatastoreBrowserSearchResults (com.vmware.vim25.HostDatastoreBrowserSearchResults)5 ManagedObjectReference (com.vmware.vim25.ManagedObjectReference)5 FileQueryFlags (com.vmware.vim25.FileQueryFlags)3 FileInfo (com.vmware.vim25.FileInfo)2 ArrayList (java.util.ArrayList)2 DatastoreFile (com.cloud.hypervisor.vmware.mo.DatastoreFile)1 DatastoreMO (com.cloud.hypervisor.vmware.mo.DatastoreMO)1 HostDatastoreBrowserMO (com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO)1 FinderException (com.vmware.photon.controller.model.adapters.vsphere.util.finders.FinderException)1 DiskService (com.vmware.photon.controller.model.resources.DiskService)1 ArrayOfHostDatastoreBrowserSearchResults (com.vmware.vim25.ArrayOfHostDatastoreBrowserSearchResults)1 FileFaultFaultMsg (com.vmware.vim25.FileFaultFaultMsg)1 InvalidCollectorVersionFaultMsg (com.vmware.vim25.InvalidCollectorVersionFaultMsg)1 InvalidDatastoreFaultMsg (com.vmware.vim25.InvalidDatastoreFaultMsg)1 InvalidPropertyFaultMsg (com.vmware.vim25.InvalidPropertyFaultMsg)1 RuntimeFaultFaultMsg (com.vmware.vim25.RuntimeFaultFaultMsg)1 TaskInfo (com.vmware.vim25.TaskInfo)1 VmDiskFileQuery (com.vmware.vim25.VmDiskFileQuery)1 VmDiskFileQueryFilter (com.vmware.vim25.VmDiskFileQueryFilter)1