Eli Mesika has submitted this change and it was merged.
Change subject: engine: Refactor AuditLog severity handling - step 1
......................................................................
engine: Refactor AuditLog severity handling - step 1
Having a separate structure (AuditLogDirector.severities) to hold
the severity definitions for messages from AuditLogType has so far
caused many warnings and bug reports. Developers were forgetting
to update the map.
Java supports fields in Enums and we were already using them to
limit the frequency of reporting for certain messages.
This patch moves the severity to the AuditLogType enum. NORMAL
severity is considered default and does not have to be specified.
It keeps the severities map and adds a test that compares the old
map with the new field to make sure no mistake was made during the
rewrite.
Change-Id: I9c784a2f63d1c1d194f8f6712a39fa18a21b17da
Signed-off-by: Martin Sivak <msivak(a)redhat.com>
---
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
M
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
M
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirectorTest.java
3 files changed, 540 insertions(+), 453 deletions(-)
Approvals:
Martin Sivák: Verified
Martin Peřina: Looks good to me, but someone else must approve
Eli Mesika: Verified; Looks good to me, approved
Yair Zaslavsky: Looks good to me, but someone else must approve
--
To view, visit
http://gerrit.ovirt.org/24441
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9c784a2f63d1c1d194f8f6712a39fa18a21b17da
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server