Roy Golan has submitted this change and it was merged.
Change subject: core: programatically inject backend into Commands
......................................................................
core: programatically inject backend into Commands
Commands, specially storage commands must have backend instance in the
constructor.
- example CloneVmCommand constructor is running internalQuery
This contradicts with DI as dependincies can be injected only after you
have and instance in hand.
So we're still can't use proper Injection of dependencies into commands.
the real fix is to move parts that need dependencies into @PostConstruct
methods.
Change-Id: I38d2aa7f14f13cb71a00f9080e3ec97d8884eea3
Signed-off-by: Roy Golan <rgolan(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/AddGlusterHookCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/CommitRemoveGlusterVolumeBricksCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GlusterHookCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/RemoveGlusterHookCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StartRemoveGlusterVolumeBricksCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StopRebalanceGlusterVolumeCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StopRemoveGlusterVolumeBricksCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/UpdateGlusterHookCommandTest.java
10 files changed, 14 insertions(+), 15 deletions(-)
Approvals:
Sahina Bose: Looks good to me, but someone else must approve
Roy Golan: Verified
Moti Asayag: Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/35741
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I38d2aa7f14f13cb71a00f9080e3ec97d8884eea3
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayilsa(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server