Allon Mureinik has submitted this change and it was merged.
Change subject: core: VM ImageLocked status check in ImagesHandler
......................................................................
core: VM ImageLocked status check in ImagesHandler
Since we now have statuses per disk, checking a VM's status for
ImageLocked seems unrelated to ImagesHandler.
In fact, this has become a more "logical" locked 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 most places that required this validation already validated
first that the VM was in fact down, so adding an additional status check
there was pointless.
In the places where the additional check was warranted, care was taken
to make the VM's status check /AFTER/ the disks', so that the most
informative error message (containing the aliases of the locked disks)
could be produced.
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: Iacfcb81df64b778b2093c7c84a8582cfd59be29c
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/AddVmFromSnapshotCommand.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/ImagesHandler.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/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/lsm/LiveMigrateVmDisksCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmValidator.java
9 files changed, 60 insertions(+), 21 deletions(-)
Approvals:
Allon Mureinik: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/11190
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iacfcb81df64b778b2093c7c84a8582cfd59be29c
Gerrit-PatchSet: 7
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>