Daniel Erez has posted comments on this change.

Change subject: core: block preview of active vm snapshot
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/27817/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/DiskSnapshotsValidator.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/DiskSnapshotsValidator.java:

Line 87:      * Validated whether the disk snapshots can be preview (according 
to the specified snapshot ID).
Line 88:      * Previewing an Active VM snapshot is applicable only when custom 
selecting a subset of disks
Line 89:      * (I.e. regular preview of Active VM snapshot isn't allowed).
Line 90:      *
Line 91:      * @return A {@link org.ovirt.engine.core.bll.ValidationResult} 
with the validation information.
> No need for the FQCN, it's already imported.
Done - should probably be changed in other vaildators..
Line 92:      */
Line 93:     public ValidationResult canDiskSnapshotsBePreviewed(Guid 
dstSnapshotId) {
Line 94:         Snapshot dstSnapshot = getSnapshotDao().get(dstSnapshotId);
Line 95:         if (dstSnapshot.getType() == Snapshot.SnapshotType.ACTIVE) {


Line 92:      */
Line 93:     public ValidationResult canDiskSnapshotsBePreviewed(Guid 
dstSnapshotId) {
Line 94:         Snapshot dstSnapshot = getSnapshotDao().get(dstSnapshotId);
Line 95:         if (dstSnapshot.getType() == Snapshot.SnapshotType.ACTIVE) {
Line 96:             if (images != null && !images.isEmpty()) {
> Don't think it's worth checking it. If you're using this validator, you sho
It makes it easier to use from the command (TryBackToAllSnapshotsOfVmCommand) - 
disks list is an optional attribute in parameters.
Line 97:                 for (DiskImage diskImage : images) {
Line 98:                     if (getDiskImageDao().get(diskImage.getImageId()) 
== null) {
Line 99:                         return ValidationResult.VALID;
Line 100:                     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iee5d5e6716cec69f36e2e98fa2c1578c53dc2384
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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