Allon Mureinik has uploaded a new change for review.

Change subject: core: MoveVm preview validation
......................................................................

core: MoveVm preview validation

In MovVm, moved the validation that the VM is not
in preview from ImagesHandler to SnapshotValidator, which is a more
logical place for it.

Note: This patch is part of a series of patches aimed at removing the
preview validation from ImagesHandler altogether.

Change-Id: I695a938b5fbb969421deb431f52fd1d0f0caa834
Signed-off-by: Allon Mureinik <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/11182/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java
index d63aa94..0cb264a 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java
@@ -65,8 +65,10 @@
             setDescription(getVmName());
         }
 
+        SnapshotsValidator snapshotValidator = new SnapshotsValidator();
         retValue = retValue
-                && validate(new 
SnapshotsValidator().vmNotDuringSnapshot(getVmId()))
+                && validate(snapshotValidator.vmNotDuringSnapshot(getVmId()))
+                && validate(snapshotValidator.vmNotInPreview(getVmId()))
                 && validate(new VmValidator(getVm()).vmDown());
 
         // check that images are ok
@@ -82,7 +84,7 @@
                                 true,
                                 true,
                                 true,
-                                true,
+                                false,
                                 false,
                                 true,
                                 diskImages);


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I695a938b5fbb969421deb431f52fd1d0f0caa834
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to