Change in ovirt-engine[master]: core: UpdateVmDisk: unify other disk retrieval

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 <amureini@redhat.com> --- 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 <amureini@redhat.com> Gerrit-Reviewer: Alissa Bonas <abonas@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Daniel Erez <derez@redhat.com> Gerrit-Reviewer: Liron Ar <laravot@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipchuk@redhat.com> Gerrit-Reviewer: Tal Nisan <tnisan@redhat.com> Gerrit-Reviewer: Vered Volansky <vvolansk@redhat.com>
participants (1)
-
amureini@redhat.com