Allon Mureinik has submitted this change and it was merged.

Change subject: core: UpdateVmDisk: unify other disk retrieval
......................................................................


core: UpdateVmDisk: unify other disk retrieval

Several validations in the canDoAction() rely on getting the VM's other
disks from the database, which is unfortunately done in the said several
places.

This patch unifies them all to a lazy getter, getOtherVmDisks() for
better performance and readability.
Besides the code change, it also introduces a couple of new unit tests
to ensure that no functionality was damaged.

Relates-To: https://bugzilla.redhat.com/854964
Change-Id: I31bcb767bf86d6f16116cfa06a710bb0488b087f
Signed-off-by: Allon Mureinik <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
M 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmDiskCommandTest.java
2 files changed, 75 insertions(+), 11 deletions(-)

Approvals:
  Allon Mureinik: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I31bcb767bf86d6f16116cfa06a710bb0488b087f
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to