Examples of VirtualMachineSnapshotInfo


Examples of com.vmware.vim25.VirtualMachineSnapshotInfo

     *
     * @return a list of the name of snapshots.
     */
    public List<String> getAllSnapshotNameList()
    {
        VirtualMachineSnapshotInfo snapInfo = vm_.getSnapshot();
        if (snapInfo == null) { return null; }

        VirtualMachineSnapshotTree[] snapTree
            = snapInfo.getRootSnapshotList();

        List<String> ret = getAllSnapshotNameList(snapTree);

        return ret;
    }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineSnapshotInfo

        return false;
    }

  public boolean removeAllSnapshots() throws Exception {
    VirtualMachineSnapshotInfo snapshotInfo = getSnapshotInfo();

    if(snapshotInfo != null && snapshotInfo.getRootSnapshotList() != null) {
      List<VirtualMachineSnapshotTree> tree = snapshotInfo.getRootSnapshotList();
      for(VirtualMachineSnapshotTree treeNode : tree) {
        ManagedObjectReference morTask = _context.getService().removeSnapshotTask(treeNode.getSnapshot(), true, true);
        boolean result = _context.getVimClient().waitForTask(morTask);
        if(result) {
          _context.waitForTaskProgressDone(morTask);
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineSnapshotInfo

      DatastoreFile vmxFile = new DatastoreFile(fileInfo.getVmPathName());
      return vmxFile.getCompanionPath(vmName + ".vmsd");
  }

  public ManagedObjectReference getSnapshotMor(String snapshotName) throws Exception {
    VirtualMachineSnapshotInfo info = getSnapshotInfo();
    if(info != null) {
           List<VirtualMachineSnapshotTree> snapTree = info.getRootSnapshotList();
           return VmwareHelper.findSnapshotInTree(snapTree, snapshotName);
    }
    return null;
  }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineSnapshotInfo

        return false;
    }

    public boolean removeAllSnapshots() throws Exception {
        VirtualMachineSnapshotInfo snapshotInfo = getSnapshotInfo();

        if (snapshotInfo != null && snapshotInfo.getRootSnapshotList() != null) {
            List<VirtualMachineSnapshotTree> tree = snapshotInfo.getRootSnapshotList();
            for (VirtualMachineSnapshotTree treeNode : tree) {
                ManagedObjectReference morTask = _context.getService().removeSnapshotTask(treeNode.getSnapshot(), true, true);
                boolean result = _context.getVimClient().waitForTask(morTask);
                if (result) {
                    _context.waitForTaskProgressDone(morTask);
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineSnapshotInfo

        DatastoreFile vmxFile = new DatastoreFile(fileInfo.getVmPathName());
        return vmxFile.getCompanionPath(vmName + ".vmsd");
    }

    public ManagedObjectReference getSnapshotMor(String snapshotName) throws Exception {
        VirtualMachineSnapshotInfo info = getSnapshotInfo();
        if (info != null) {
            List<VirtualMachineSnapshotTree> snapTree = info.getRootSnapshotList();
            return VmwareHelper.findSnapshotInTree(snapTree, snapshotName);
        }
        return null;
    }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineSnapshotInfo

        }
        return null;
    }

    public boolean hasSnapshot() throws Exception {
        VirtualMachineSnapshotInfo info = getSnapshotInfo();
        if (info != null) {
            return info.getCurrentSnapshot() != null;
        }
        return false;
    }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineSnapshotInfo

        return false;
    }

  public boolean removeAllSnapshots() throws Exception {
    VirtualMachineSnapshotInfo snapshotInfo = getSnapshotInfo();

    if(snapshotInfo != null && snapshotInfo.getRootSnapshotList() != null) {
      List<VirtualMachineSnapshotTree> tree = snapshotInfo.getRootSnapshotList();
      for(VirtualMachineSnapshotTree treeNode : tree) {
        ManagedObjectReference morTask = _context.getService().removeSnapshotTask(treeNode.getSnapshot(), true, true);
        boolean result = _context.getVimClient().waitForTask(morTask);
        if(result) {
          _context.waitForTaskProgressDone(morTask);
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineSnapshotInfo

      DatastoreFile vmxFile = new DatastoreFile(fileInfo.getVmPathName());
      return vmxFile.getCompanionPath(vmName + ".vmsd");
  }

  public ManagedObjectReference getSnapshotMor(String snapshotName) throws Exception {
    VirtualMachineSnapshotInfo info = getSnapshotInfo();
    if(info != null) {
           List<VirtualMachineSnapshotTree> snapTree = info.getRootSnapshotList();
           return VmwareHelper.findSnapshotInTree(snapTree, snapshotName);
    }
    return null;
  }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineSnapshotInfo

    }
    return null;
  }
 
  public boolean hasSnapshot() throws Exception {
    VirtualMachineSnapshotInfo info = getSnapshotInfo();
    if(info != null) {
      return info.getCurrentSnapshot() != null;
    }
    return false;
  }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineSnapshotInfo

   
    return false;
  }
 
  public boolean removeAllSnapshots() throws Exception {
    VirtualMachineSnapshotInfo snapshotInfo = getSnapshotInfo();
   
    if(snapshotInfo != null && snapshotInfo.getRootSnapshotList() != null) {
      VirtualMachineSnapshotTree[] tree = snapshotInfo.getRootSnapshotList();
      for(VirtualMachineSnapshotTree treeNode : tree) {
        ManagedObjectReference morTask = _context.getService().removeSnapshot_Task(treeNode.getSnapshot(), true);
        String result = _context.getServiceUtil().waitForTask(morTask);
        if(result.equals("sucess")) {
          _context.waitForTaskProgressDone(morTask);
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.