Daniel Erez has posted comments on this change.

Change subject: core: introduce customized snapshot preview support
......................................................................


Patch Set 6:

(5 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestoreAllSnapshotsCommand.java
Line 246: 
Line 247:             getParameters().setImagesList((List<DiskImage>) 
CollectionUtils.union(imagesFromPreviewSnapshot, intersection));
Line 248:             imagesToRestore = imagesFromPreviewSnapshot;
Line 249:             updateSnapshotIdForSkipRestoreImages(
Line 250:                     
ImagesHandler.imagesSubtract(imagesFromActiveSnapshot, imagesToRestore), 
targetSnapshot.getId());
I'll move these lines to the PREVIEW case.
Line 251:             break;
Line 252: 
Line 253:         // Currently UI sends the "in preview" snapshot to restore 
when "Commit" is pressed.
Line 254:         case REGULAR:


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TryBackToAllSnapshotsOfVmCommand.java
Line 176:                     for (DiskImage image : filteredImages) {
Line 177:                         VdcReturnValueBase vdcReturnValue =
Line 178:                                 
Backend.getInstance().runInternalAction(VdcActionType.TryBackToSnapshot,
Line 179:                                         
buildTryBackToSnapshotParameters(newActiveSnapshotId, image),
Line 180:                                         
ExecutionHandler.createDefaultContexForTasks(getExecutionContext()));
The excluded disks are just for handling a scenario in which the user didn't 
select some disks at all (not even from the Active VM in the first row). So, 
these disks won't be a part of the preview snapshot, which means that user 
won't see them as part of the VM - i.e. effectively removing these disks when 
committing...)
Line 181: 
Line 182:                         if (vdcReturnValue.getSucceeded()) {
Line 183:                             
getTaskIdList().addAll(vdcReturnValue.getInternalVdsmTaskIdList());
Line 184:                         } else if (vdcReturnValue.getFault() != null) 
{


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/SnapshotsManager.java
Line 462:             vm.setImages(imagesFromVmConf);
Line 463:         }
Line 464: 
Line 465:         return true;
Line 466:     }
1. right, I'll move it out of the loop.
2. it's the images, so break is enough indeed.
Line 467: 
Line 468:     /**
Line 469:      * @param vmDevice
Line 470:      * @return true if the device can be removed (disk which allows 
snapshot can be removed as it is part


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/RestoreAllSnapshotsParameters.java
Line 7: 
Line 8: public class RestoreAllSnapshotsParameters extends 
TryBackToAllSnapshotsOfVmParameters implements java.io.Serializable {
Line 9:     private static final long serialVersionUID = -8756081739745132849L;
Line 10: 
Line 11:     private List<DiskImage> images;
Done
Line 12: 
Line 13:     public RestoreAllSnapshotsParameters(Guid vmId, Guid 
dstSnapshotId) {
Line 14:         super(vmId, dstSnapshotId);
Line 15:     }


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/TryBackToAllSnapshotsOfVmParameters.java
Line 45:     public List<DiskImage> getDisks() {
Line 46:         return disks;
Line 47:     }
Line 48: 
Line 49:     public void setDisks(List<DiskImage> images) {
Done
Line 50:         this.disks = images;
Line 51:     }


-- 
To view, visit http://gerrit.ovirt.org/22776
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I89332a1538c7259dd3ea62d693ac062f47e52cd0
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to