Package com.vmware.vim25

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


        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

        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

        }
        return null;
    }

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

        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

      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

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

   
    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

      DatastoreFile vmxFile = new DatastoreFile(fileInfo.getVmPathName());
      return vmxFile.getCompanionPath(vmName + ".vmsd");
  }
 
  public ManagedObjectReference getSnapshotMor(String snapshotName) throws Exception {
    VirtualMachineSnapshotInfo info = getSnapshotInfo();
    if(info != null) {
           VirtualMachineSnapshotTree[] snapTree = info.getRootSnapshotList();
           return VmwareHelper.findSnapshotInTree(snapTree, snapshotName);
    }
    return null;
  }
View Full Code Here

        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

TOP

Related Classes of com.vmware.vim25.VirtualMachineSnapshotInfo

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.