Allon Mureinik has submitted this change and it was merged.
Change subject: engine: Remove unused AppErrors
......................................................................
engine: Remove unused AppErrors
The various AppErrors in the project contain many deprecated errors that
are no longer used. This patch clears them up and adds tests to assure
this situation doesn't repeat in the future.
The patch contains:
1. Adding the capability to detect keys that aren't present in the
EngineMessage and EngineError enums to DuplicateKeysCheck.
2. Rename DuplicateKeysCheck to PropertiesTestUtils which better
represents its current functionality.
3. Rename DuplicateKeysTest classes to ErrorMessagesTest to better
represent their new capabilities.
4. Remove unused keys from:
backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
5. Remove keys from AppErrors.java that were removed from the properties
files. Note that the tests do not validate this class, so they may
still be unused keys in it.
6. AppErrors keys that were in fact in use (found by grep) but did not
appear in one of the aforementioned classes were added to
EngineMessage so they could be properly managed.
7. Some Malformed multiline values in the various AppErrors.properties
files that broke its loading by java.util.Properties were fixed so
to make their value contained in a singleline with inline
linebreaks.
8. When a key could not be added to EngineMessages since it contained a
"." it was renamed to replace "." with "_", and then
added.
Relates-to:
https://bugzilla.redhat.com/1244766
Change-Id: Ide734305c7f417967f05b37bca48dbb0e595728c
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddDiskCommandTest.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVmFromSnapshotParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVmTemplateFromSnapshotParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVmTemplateParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/CreateAllSnapshotsFromVmParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/HostSetupNetworksParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/RunVmOnceParams.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/SetupNetworksParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/CreateGlusterVolumeParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterClusterParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterHookParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterVolumeBricksParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterVolumeOptionParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterVolumeParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterVolumeRemoveBricksParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/MacRange.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Quota.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageDomainStatic.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StoragePool.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Tags.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDSGroup.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsStatic.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmPool.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/event_subscriber.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterBrickEntity.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeEntity.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeOptionEntity.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/Network.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/VmNic.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/pm/FenceAgent.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/BaseDisk.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/Image.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/EngineMessage.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ServerParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/gluster/GlusterHookContentQueryParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/gluster/GlusterParameters.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
D backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/DuplicateKeysTest.java
A backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/ErrorMessagesTest.java
A
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/EnumTranslationProperties.java
A
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/MissingEnumTranslationException.java
R
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/PropertiesTestUtils.java
M
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
D
frontend/webadmin/modules/userportal-gwtp/src/test/java/org/ovirt/engine/ui/userportal/DuplicateKeysTest.java
A
frontend/webadmin/modules/userportal-gwtp/src/test/java/org/ovirt/engine/ui/userportal/ErrorMessagesTest.java
M
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
D
frontend/webadmin/modules/webadmin/src/test/java/org/ovirt/engine/ui/webadmin/DuplicateKeysTest.java
A
frontend/webadmin/modules/webadmin/src/test/java/org/ovirt/engine/ui/webadmin/ErrorMessagesTest.java
52 files changed, 400 insertions(+), 936 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Allon Mureinik: Verified; Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/43919
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ide734305c7f417967f05b37bca48dbb0e595728c
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org