Package com.vmware.vim25

Examples of com.vmware.vim25.HostDatastoreBrowserSearchSpec


        return null;
    }

    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);
    }
View Full Code Here


        return null;
    }

    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);
    }
View Full Code Here

        long size = 0;
        ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(hyperHost, poolUuid);
        DatastoreMO dsMo = new DatastoreMO(context, morDs);
        HostDatastoreBrowserMO browserMo = dsMo.getHostDatastoreBrowserMO();
        String datastorePath = "[" + dsMo.getName() + "]";
        HostDatastoreBrowserSearchSpec searchSpec = new HostDatastoreBrowserSearchSpec();
        FileQueryFlags fqf = new FileQueryFlags();
        fqf.setFileSize(true);
        fqf.setFileOwner(true);
        fqf.setModification(true);
        searchSpec.setDetails(fqf);
        searchSpec.setSearchCaseInsensitive(false);
        searchSpec.getMatchPattern().add(fileName);
        ArrayList<HostDatastoreBrowserSearchResults> results = browserMo.
                searchDatastoreSubFolders(datastorePath, searchSpec);
        for(HostDatastoreBrowserSearchResults result : results){
            if (result != null) {
                List<FileInfo> info = result.getFile();
View Full Code Here

    {
      System.out.println("FileQuery["+i+"]="
          + fqs[i].getClass().getName());
    }
   
    HostDatastoreBrowserSearchSpec hdbss =
      new HostDatastoreBrowserSearchSpec();
    hdbss.setQuery(new FileQuery[] { new VmDiskFileQuery()});
    FileQueryFlags fqf = new FileQueryFlags();
    fqf.setFileSize(true);
    fqf.setModification(true);
    hdbss.setDetails(fqf);
    hdbss.setSearchCaseInsensitive(false);
    hdbss.setMatchPattern(new String[] {"sdk*.*"});
   
    Task task = hdb.searchDatastoreSubFolders_Task(
        datastorePath, hdbss);
    if(task.waitForMe()==Task.SUCCESS)
    {
View Full Code Here

                    throws Exception{
        long size = 0;
        DatastoreMO dsMo = new DatastoreMO(context, morDs);
        HostDatastoreBrowserMO browserMo = dsMo.getHostDatastoreBrowserMO();
        String datastorePath = "[" + dsMo.getName() + "]";
        HostDatastoreBrowserSearchSpec searchSpec = new HostDatastoreBrowserSearchSpec();
        FileQueryFlags fqf = new FileQueryFlags();
        fqf.setFileSize(true);
        fqf.setFileOwner(true);
        fqf.setModification(true);
        searchSpec.setDetails(fqf);
        searchSpec.setSearchCaseInsensitive(false);
        searchSpec.getMatchPattern().add(fileName);
        ArrayList<HostDatastoreBrowserSearchResults> results = browserMo.
                searchDatastoreSubFolders(datastorePath, searchSpec);
        for(HostDatastoreBrowserSearchResults result : results){
            if (result != null) {
                List<FileInfo> info = result.getFile();
View Full Code Here

        }

        String morefOfNewVm = null;
       
        /* wait nfc lease */
        HttpNfcLeaseState hls;
    while (true) {
      hls = httpNfcLease.getState();
      if (hls == HttpNfcLeaseState.ready ||
                hls == HttpNfcLeaseState.error) { break; }
    }
View Full Code Here

                return node.getSnapshot();
            } else {
                VirtualMachineSnapshotTree[] childTree =
                    node.getChildSnapshotList();
                if (childTree != null) {
                    ManagedObjectReference mor =
                        findSnapshotInTree(childTree, snapName);
                    if (mor != null) { return mor; }
                }
            }
        }
View Full Code Here

       
        VirtualMachineSnapshotTree[] snapTree =
            vm_.getSnapshot().getRootSnapshotList();
       
        if (snapTree != null) {
            ManagedObjectReference mor = findSnapshotInTree(snapTree, snapName);
            if (mor != null) {
                return new
                    VirtualMachineSnapshot(vm_.getServerConnection(), mor);
            }
        }
View Full Code Here

        if (entityType == null || morefStr == null) {
            return null;
        }

        /* create managed object reference */
        ManagedObjectReference mor = new ManagedObjectReference();
        mor.setType(entityType);
        mor.setVal(morefStr);

        return mor;
    }
View Full Code Here

     */
    protected VirtualMachine generateVirtualMachineWithMoref(String morefStr)
    {
        if (si_ == null || morefStr == null) { return null; }

        ManagedObjectReference mor =
            generateMoref("VirtualMachine", morefStr);
        if (mor == null) { return null; }

        ManagedEntity vm =
            MorUtil.createExactManagedEntity(si_.getServerConnection(), mor);
View Full Code Here

TOP

Related Classes of com.vmware.vim25.HostDatastoreBrowserSearchSpec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.