Change in ovirt-engine[master]: backend: Reduce usages of Backend#getResourceManager()

masayag at redhat.com masayag at redhat.com
Tue Nov 24 14:51:30 UTC 2015


Moti Asayag has submitted this change and it was merged.

Change subject: backend: Reduce usages of Backend#getResourceManager()
......................................................................


backend: Reduce usages of Backend#getResourceManager()

Replaced accesses to VdsBrokerFrontend via Backend lookup with injection where
possible.

Also introduced runVdsCommand helper in QueriesCommandBase so Queries wouldn't
need to manually inject the VdsBrokerFrontend - similary as it is done in
CommandBase.

Change-Id: Ibaedc7f03c530db054883393db35e735f43043a9
Signed-off-by: Martin Betak <mbetak 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/CommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetLunsByVgIdQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetUnregisteredDiskQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetUnregisteredDisksQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVmFromOvaQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVmsFromExternalProviderQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/QueriesCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVmCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsEventListener.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetAddedGlusterServersQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterJob.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterQueriesCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/AttachNetworkToVdsInterfaceCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/DetachNetworkFromVdsInterfaceCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/HostSetupNetworksCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/pm/StopVdsCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddSANStorageDomainCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/DiscoverSendTargetsQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetAllFromExportDomainQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetDeviceListQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetExistingStorageDomainListQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetStorageDomainsWithAttachedStoragePoolGuidQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetUnregisteredBlockStorageDomainsQuery.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddVmCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RemoveVdsCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RestoreAllSnapshotCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RunVmCommandTest.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/GetAddedGlusterServersQueryTest.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
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/pm/StartVdsCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/AttachStorageDomainToPoolCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/DeactivateStorageDomainCommandTest.java
45 files changed, 109 insertions(+), 170 deletions(-)

Approvals:
  Martin Peřina: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Martin Betak: Verified
  Moti Asayag: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibaedc7f03c530db054883393db35e735f43043a9
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <mbetak 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: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list