Moti Asayag has submitted this change and it was merged.
Change subject: core: When updating entity name the event...
......................................................................
core: When updating entity name the event...
When updating entity name the event message should contain the
former entity name.
This patch adds a event log message when an entity is renamed so the
proceeding log message on the entity update that uses the new name is
clear.
This is done by introducing a RenamedEntityInfoProvider interface that
all relevant Update*Command are implementing.
The interface forces those commands to state the affected entity name,
the old entity name, the new entity name and to set the relevant object
ID such that the relevant event will be shown when the entity is
selected in the UI.
The CommandBase is checking for each command if it implements the
RenamedEntityInfoProvider interface and checks if the entity was
renamed. If it founds that the entity was renamed, a proper message is
written to the audit log.
Change-Id: I17f0049ca0ffb1a3868ba404b112a8c10ee7778e
Signed-off-by: Eli Mesika <emesika(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
A
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RenamedEntityInfoProvider.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.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/UpdateVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmPoolWithVmsCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/dc/UpdateNetworkCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStorageDomainCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommand.java
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/main/resources/bundles/AuditLogMessages.properties
13 files changed, 233 insertions(+), 13 deletions(-)
Approvals:
Eli Mesika: Verified
Moti Asayag: Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/11756
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I17f0049ca0ffb1a3868ba404b112a8c10ee7778e
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs(a)redhat.com>