Allon Mureinik has submitted this change and it was merged.
Change subject: core: VM ImageIllegal status check in ImagesHandler
......................................................................
core: VM ImageIllegal status check in ImagesHandler
Since we now have statuses per disk, checking a VM's status for
ImageInvalid seems unrelated to ImagesHandler.
In fact, this has become a more "logical" illegal status, not directly
associated to the VM's images.
The relevant code was removed from ImagesHandler and moved to
VmValidator, where it belongs.
Note that only place that used this validation (i.e., checkIsValid=true
&& checkImagesIllegal=true) and did not explicitly validate the VM's
state beforhand (regardless) is CreateAllSnapshotFromVmCommad.
To seal the deal, the API of the relevant methods was changed to use VM
ID instead of a VM, to show it is no longer needed.
Change-Id: I0578a91929689a95845b51a6cd5b1f42ef497c91
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/AddVmTemplateCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestoreAllSnapshotsCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TryBackToAllSnapshotsOfVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmRunHandler.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmValidator.java
14 files changed, 37 insertions(+), 36 deletions(-)
Approvals:
Allon Mureinik: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/11212
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0578a91929689a95845b51a6cd5b1f42ef497c91
Gerrit-PatchSet: 6
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>