Change in ovirt-engine[master]: core: @Inject OvfVmIconDefaultsProvider
Code Review
gerrit at ovirt.org
Sun Feb 12 17:07:35 UTC 2017
>From Allon Mureinik <amureini at redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: core: @Inject OvfVmIconDefaultsProvider
......................................................................
core: @Inject OvfVmIconDefaultsProvider
OvfVmIconDefaultsProvider is a stateless utility which is currently
injected via the old SimpleDependencyInjector. This patch converts it
to a standard java @Singleton, and @Injects it where needed.
The patch includes:
1. Moving OvfVmIconDefaultsProvider to
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/utils/ovf
alongside OvfManager where it's used.
2. Convert OvfVmIconDefaultsProvider to a class annotated with
@Singleton and removed the anonymous implementation from Backend
3. Move the actual logic from GetVmIconDefaultsQuery to
OvfVmIconDefaultsProvider. This way, the utility can be used
wherever needed, and leave the query to just handle the (dummy)
parameters and the return value, instead of having a redundant
roundtrip to call the backend to run the query and then extract the
result.
4. @Inject OvfVmIconDefaultsProvider instead of using the
SimpleDependencyInjector.
5. Fix tests accordingly.
Change-Id: I0ae5d1d73922e2d3e4098edf5d41c6d344270e84
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVmIconDefaultsQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/utils/ovf/OvfManager.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmIconDefaultsProvider.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/utils/ovf/OvfManagerTest.java
D backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmIconDefaultsProvider.java
7 files changed, 49 insertions(+), 59 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/71939
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0ae5d1d73922e2d3e4098edf5d41c6d344270e84
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
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