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

amureini at redhat.com amureini at redhat.com
Tue Mar 12 10:00:02 UTC 2013


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



More information about the Engine-commits mailing list