Sergey Gotliv has posted comments on this change.

Change subject: core, restAPI:(wip) Add action type for previewed snapshot.
......................................................................


Patch Set 5:

(3 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestoreAllSnapshotsCommand.java
Line 132:         if (getParameters().getSnapshotPreviewAction() == 
SnapshotPreviewAction.UNDO) {
Line 133:             snapshot = getSnapshotDao().get(getVmId(), 
SnapshotType.PREVIEW);
Line 134:         } else if (getParameters().getSnapshotPreviewAction() == 
SnapshotPreviewAction.COMMIT) {
Line 135:             snapshot = getSnapshotDao().get(getVmId(), 
SnapshotType.ACTIVE);
Line 136:         }
I am missing else with exception here to clarify that there is no way to get 
any other action except of UNDO or COMMIT.

You defined 'NONE' in the enum, remember?
Line 137: 
Line 138:         if (snapshot != null) {
Line 139:             snapshotId = snapshot.getId();
Line 140:         }


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Snapshot.java
Line 262: 
Line 263:     public enum SnapshotPreviewAction {
Line 264:         UNDO,
Line 265:         COMMIT,
Line 266:         NONE
What is the 'NONE' Action?
Line 267:     }
Line 268: 


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java
Line 383:         {
Line 384:             Snapshot snapshot = getPreview();
Line 385: 
Line 386:             Frontend.RunAction(VdcActionType.RestoreAllSnapshots,
Line 387:                     new RestoreAllSnapshotsParameters(vm.getId(), 
snapshot.getId(), SnapshotPreviewAction.UNDO),
This is the logic change in webadmin, 
currently according to commit message you are changing the core and rest only.
Line 388:                     null,
Line 389:                     null);
Line 390:         }
Line 391:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If877befc5058c3412ae3d3731d5beacbc09e5c97
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to