Allon Mureinik has submitted this change and it was merged.
Change subject: core: AddDisk preview validation
......................................................................
core: AddDisk preview validation
In AddDiskCommand, moved the validation that the VM is not in preview
from ImagesHandler to SnapshotValidator, which is a more logical place
for it.
This patch contains the following:
* A new method in SnapshotValidator, vmNotInPreview(vmId)
* Tests for the aforementioned method in SnapshotValidatorTest.
* The usage of the aforementioned method in AddDiskCommand
* Minor amendments to AddDiskToVmCommandTest's mocking in light of the
previous change.
Note: This patch is part of a series of patches aimed at removing the
preview validation from ImagesHandler altogether.
Change-Id: Ib282279a4b938d6fb3b08e9b2d127af4653bd51c
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/SnapshotsValidator.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddDiskToVmCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/snapshots/SnapshotsValidatorTest.java
4 files changed, 49 insertions(+), 7 deletions(-)
Approvals:
Allon Mureinik: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/11179
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib282279a4b938d6fb3b08e9b2d127af4653bd51c
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Alissa Bonas <abonas(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk(a)redhat.com>