Package com.vmware.vim25

Examples of com.vmware.vim25.HostDatastoreBrowserSearchResults


    DatastoreFile dirFile = new DatastoreFile(file.getDatastoreName(), file.getDir());
   
    HostDatastoreBrowserMO browserMo = getHostDatastoreBrowserMO();
 
    s_logger.info("Search file " + file.getFileName() + " on " + dirFile.getPath());
    HostDatastoreBrowserSearchResults results = browserMo.searchDatastore(dirFile.getPath(), file.getFileName(), true);
    if(results != null) {
      FileInfo[] info = results.getFile();
      if(info != null && info.length > 0) {
        s_logger.info("File " + fileFullPath + " exists on datastore");
        return true;
      }
    }
View Full Code Here


  }
 
  public boolean folderExists(String folderParentDatastorePath, String folderName) throws Exception {
    HostDatastoreBrowserMO browserMo = getHostDatastoreBrowserMO();
   
    HostDatastoreBrowserSearchResults results = browserMo.searchDatastore(folderParentDatastorePath, folderName, true);
    if(results != null) {
      FileInfo[] info = results.getFile();
      if(info != null && info.length > 0) {
        s_logger.info("Folder " + folderName + " exists on datastore");
        return true;
      }
    }
View Full Code Here

          ((ArrayOfHostDatastoreBrowserSearchResults)
              obj).getHostDatastoreBrowserSearchResults();
       
        for(int i=0; i<results.length; i++)
        {
          HostDatastoreBrowserSearchResults result = results[i];
          System.out.println("\nFolder:"
              + result.getFolderPath());
          FileInfo[] fis = result.getFile();
          for(int j=0; fis!=null && j<fis.length; j++)
          {
            System.out.println("Path:" + fis[j].getPath());
            System.out.println("FileSize:"
                + fis[j].getFileSize());
View Full Code Here

    DatastoreFile dirFile = new DatastoreFile(file.getDatastoreName(), file.getDir());

    HostDatastoreBrowserMO browserMo = getHostDatastoreBrowserMO();

    s_logger.info("Search file " + file.getFileName() + " on " + dirFile.getPath());
    HostDatastoreBrowserSearchResults results = browserMo.searchDatastore(dirFile.getPath(), file.getFileName(), true);
    if(results != null) {
      List<FileInfo> info = results.getFile();
      if(info != null && info.size() > 0) {
        s_logger.info("File " + fileFullPath + " exists on datastore");
        return true;
      }
    }
View Full Code Here

  }

  public boolean folderExists(String folderParentDatastorePath, String folderName) throws Exception {
    HostDatastoreBrowserMO browserMo = getHostDatastoreBrowserMO();

    HostDatastoreBrowserSearchResults results = browserMo.searchDatastore(folderParentDatastorePath, folderName, true);
    if(results != null) {
      List<FileInfo> info = results.getFile();
      if(info != null && info.size() > 0) {
        s_logger.info("Folder " + folderName + " exists on datastore");
        return true;
      }
    }
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.HostDatastoreBrowserSearchResults

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.