333334335336337338339340341342343
break; case DELETE: task = vmsnap.removeSnapshot_Task(true); break; case REVERT: task = vmsnap.revertToSnapshot_Task(null, true); break; default: throw new Exception("Snapshot TaskType is wrong."); } assert task != null;
979899100101102103104105106107
{ 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); }