Examples of waitForMe()


Examples of com.vmware.vim25.mo.Task.waitForMe()

       cloneSpec.setTemplate(false);

       Task task = vm.cloneVM_Task(vmFolder, cloneName, cloneSpec);
       System.out.println("Launching the VM clone task. It might take a while. Please wait for the result ...");
      
       String status =   task.waitForMe();
       if(status==Task.SUCCESS)
       {
              System.out.println("Virtual Machine got cloned successfully.");
       }
       else
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

    if("create".equalsIgnoreCase(op))
    {
      Task task = vm.createSnapshot_Task(
          snapshotname, desc, false, false);
      if(task.waitForMe()==Task.SUCCESS)
      {
        System.out.println("Snapshot was created.");
      }
    }
    else if("list".equalsIgnoreCase(op))
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

      VirtualMachineSnapshot vmsnap = getSnapshotInTree(
          vm, snapshotname);
      if(vmsnap!=null)
      {
        Task task = vmsnap.revertToSnapshot_Task(null);
        if(task.waitForMe()==Task.SUCCESS)
        {
          System.out.println("Reverted to snapshot:"
              + snapshotname);
        }
      }
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

      }
    }
    else if(op.equalsIgnoreCase("removeall"))
    {
      Task task = vm.removeAllSnapshots_Task();     
      if(task.waitForMe()== Task.SUCCESS)
      {
        System.out.println("Removed all snapshots");
      }
    }
    else if(op.equalsIgnoreCase("remove"))
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

      VirtualMachineSnapshot vmsnap = getSnapshotInTree(
          vm, snapshotname);
      if(vmsnap!=null)
      {
        Task task = vmsnap.removeSnapshot_Task(removechild);
        if(task.waitForMe()==Task.SUCCESS)
        {
          System.out.println("Removed snapshot:" + snapshotname);
        }
      }
    }
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

    String srcPath = basePath + "/Nostalgia011.vmdk";
    String dstPath = dirPath + "/copy of Nostalgia011.vmdk";
    Task cTask = fileMgr.copyDatastoreFile_Task(srcPath, dc,
        dstPath, dc, true);

    if(cTask.waitForMe()==Task.SUCCESS)
    {
      System.out.println("File copied successfully!");
    }
    else
    {
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

    Task task = vm.cloneVM_Task((Folder) vm.getParent(),
        cloneName, cloneSpec);
    System.out.println("Launching the VM clone task. " +
        "Please wait ...");

    String status = task.waitForMe();
    if(status==Task.SUCCESS)
    {
      System.out.println("VM got cloned successfully.");
    }
    else
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

        createRemoveDiskConfigSpec(vm.getConfig(), diskName);
    vmConfigSpec.setDeviceChange(
        new VirtualDeviceConfigSpec[]{vdiskSpec} );
    Task task = vm.reconfigVM_Task(vmConfigSpec);
   
    if(task.waitForMe()==Task.SUCCESS)
    {
      System.out.println("Disk removed.");
    }
    else
    {
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

    hdbss.setSearchCaseInsensitive(false);
    hdbss.setMatchPattern(new String[] {"sdk*.*"});
   
    Task task = hdb.searchDatastoreSubFolders_Task(
        datastorePath, hdbss);
    if(task.waitForMe()==Task.SUCCESS)
    {
      Object obj = task.getTaskInfo().getResult();
      if(obj instanceof ArrayOfHostDatastoreBrowserSearchResults)
      {
        HostDatastoreBrowserSearchResults[] results =
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

    vmfi.setVmPathName("["+ datastoreName +"]");
    vmSpec.setFiles(vmfi);

    // call the createVM_Task method on the vm folder
    Task task = vmFolder.createVM_Task(vmSpec, rp, null);
    String result = task.waitForMe();      
    if(result == Task.SUCCESS)
    {
      System.out.println("VM Created Sucessfully");
    }
    else
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.