Omer Frenkel has submitted this change and it was merged.
Change subject: core: Convert CpuFlagsManagerHandler to singleton
......................................................................
core: Convert CpuFlagsManagerHandler to singleton
Change class with static methods CpuFlagsManagerHandler to be singleton
injected by SimpleDependecyInjector.
This change makes possible to mock CpuFlagsManagerHandler in tests. In
particular, it will be possible to mock
CpuFlagsManagerHandler.getCpuId() to return non-null CPU IDs. Without
this change, null check in VmHandler.isCpuSupported() (to ensure that
null CPU ID will not cause NPE) will break tests.
Change-Id: Icbc206b93dde4540152d2267ed956cdb188a20ec
Signed-off-by: Shmuel Melamud <smelamud(a)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/ChangeVDSClusterCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CpuFlagsManagerHandler.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAllServerCpuListQuery.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetClusterUnsupportedVmsCpusQuery.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetHostArchitectureQuery.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetSupportedCpuListQuery.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVdsByVdsIdQuery.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HandleVdsCpuFlagsOrClusterChangedCommand.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/SearchQuery.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsArchitectureHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsGroupCommandBase.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsGroupOperationCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CpuLevelFilterPolicyUnit.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/ClusterValidator.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/GetVdsByVdsIdQueryTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmCommandTest.java
25 files changed, 134 insertions(+), 50 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Shmuel Leib Melamud: Verified
Omer Frenkel: Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/44034
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icbc206b93dde4540152d2267ed956cdb188a20ec
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shmuel Leib Melamud <smelamud(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Shmuel Leib Melamud <smelamud(a)redhat.com>
Gerrit-Reviewer: Shmuel Melamud <smelamud(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org