Change in ovirt-engine[master]: core: Remove VmDeviceUtils from DiskValidator constructor

tnisan at redhat.com tnisan at redhat.com
Thu Sep 29 09:25:41 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: core: Remove VmDeviceUtils from DiskValidator constructor
......................................................................


core: Remove VmDeviceUtils from DiskValidator constructor

Patch 6fa804a1 moved VmDeviceUtils (VDU) to CDI, since VDU is used in
DiskValidator as a part of the change VDU was passed to the validator in
the constructor, this approach is wrong since a validator should not get
in the ctor anything but the validated entity let alone various utils.
This patch removes VDU from the ctor of DiskValidator and uses
Injector::get to get an instance of VDU in the single method which uses it.
Also a redundant usage of injectorRule.bind of VDU was removed.

Change-Id: I77e3e8c409a8e488fd4e349995c4b4bd0c2091d3
Signed-off-by: Tal Nisan <tnisan at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AbstractDiskVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AttachDiskToVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/MoveDisksCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/MoveOrCopyDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/RemoveDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/CopyImageGroupCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/lsm/LiveMigrateDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/lsm/LiveMigrateVmDisksCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/repoimage/ExportRepoImageCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/DiskValidator.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportExportRepoImageCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/AddDiskCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/HotPlugDiskToVmCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/repoimage/ImportRepoImageCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/storage/DiskValidatorTest.java
15 files changed, 16 insertions(+), 61 deletions(-)

Approvals:
  Tal Nisan: Verified; Passed CI tests
  Martin Betak: Looks good to me, but someone else must approve
  Allon Mureinik: Looks good to me, approved
  Freddy Rolland: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I77e3e8c409a8e488fd4e349995c4b4bd0c2091d3
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list