Allon Mureinik has uploaded a new change for review. Change subject: core: MoveVm vmDown validation ......................................................................
core: MoveVm vmDown validation Added an explicit test for VM.isDown in MoveVmCommand.canDoAction() instead of using ImagesHandler.PerformImagesChecks to do it. Note: This patch is part of a series intended to remove the VM status check from ImagesHandler. Change-Id: Iec3d1d48192be7256ac55a145e7cb058480901ba Signed-off-by: Allon Mureinik <amure...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/17/11017/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 0434be9..4b9e3e6 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 @@ -6,6 +6,7 @@ import org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker; import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator; +import org.ovirt.engine.core.bll.validator.VmValidator; import org.ovirt.engine.core.common.AuditLogType; import org.ovirt.engine.core.common.action.MoveVmParameters; import org.ovirt.engine.core.common.action.VdcActionType; @@ -64,7 +65,9 @@ setDescription(getVmName()); } - retValue = retValue && validate(new SnapshotsValidator().vmNotDuringSnapshot(getVmId())); + retValue = retValue + && validate(new SnapshotsValidator().vmNotDuringSnapshot(getVmId())) + && validate(new VmValidator(getVm()).vmDown()); // check that vm is down and images are ok // not checking storage domain, there is a check in @@ -80,7 +83,7 @@ true, true, true, - true, + false, false, true, diskImages); -- To view, visit http://gerrit.ovirt.org/11017 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec3d1d48192be7256ac55a145e7cb058480901ba Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <amure...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches