Change in ovirt-engine[master]: core: Move loading of VMs from ctor to init in UpdateVmDiskC...

tnisan at redhat.com tnisan at redhat.com
Tue May 10 13:05:26 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: core: Move loading of VMs from ctor to init in UpdateVmDiskCommand
......................................................................


core: Move loading of VMs from ctor to init in UpdateVmDiskCommand

The list of VMs the disk to be updated is plugged to was loaded in the
constructor of the command since it was used by the getExclusiveLocks()
method, having a DAO call in the constructor is considered bad practice
due to that the DAO call was moved to the init() method which is invoked
before getExclusiveLocks() thus not changing the original behavior

Change-Id: I2c8795bccd649ea972ccd6b6fa27913366856041
Signed-off-by: Tal Nisan <tnisan at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/UpdateVmDiskCommand.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/UpdateVmDiskCommandTest.java
2 files changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Tal Nisan: Verified; Passed CI tests
  Daniel Erez: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/57219
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c8795bccd649ea972ccd6b6fa27913366856041
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list