Yair Zaslavsky has posted comments on this change.

Change subject: [WIP] engine : 998980 Generic mechanism for update diffs in 
audit
......................................................................


Patch Set 3:

(4 comments)

I agree with Itamar here,
This will cause inconsistency with current audit logs - one hand you will have 
VdsGroup and on the other hand you will have cluster?
I think that the next step is to have some mapping/resolvement (see also Eli's 
idea in the email) or we should get this from the REST layer...

....................................................
File 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
Line 713: USER_FAILED_TO_UPDATE_MOM_POLICIES=Mom policy could not be updated on 
host ${VdsName}.
Line 714: DISK_ALIGNMENT_SCAN_START=Starting alignment scan of disk 
'${DiskAlias}'.
Line 715: DISK_ALIGNMENT_SCAN_FAILURE=Alignment scan of disk '${DiskAlias}' 
failed.
Line 716: DISK_ALIGNMENT_SCAN_SUCCESS=Alignment scan of disk '${DiskAlias}' is 
complete.
Line 717: UPDATE_PARAMS= Update parameters are ${update_params}.
+1 on Eli's idea.


....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/JsonUtils.java
Line 29:      * @param newMap
Line 30:      *            {@link Map} containing new values for the properties
Line 31:      * @return Json string like in the example.
Line 32:      */
Line 33:     public static String buildJsonStringFromMaps(List<String> 
properties,
This method is per the bug you're trying to solve, do you think it should exist 
at JsonUtils, or even the JsonObject serializer/deserializer class?
Line 34:             Map<String, String> oldMap,
Line 35:             Map<String, String> newMap) {
Line 36: 
Line 37:         try {


Line 34:             Map<String, String> oldMap,
Line 35:             Map<String, String> newMap) {
Line 36: 
Line 37:         try {
Line 38:             ObjectMapper mapper = new ObjectMapper();
as previously discussed,  mapper should be static..
Line 39:             return 
mapper.writeValueAsString(prepareJsonMap(properties, oldMap, newMap));
Line 40:         } catch (IOException e) {
Line 41:             log.warn("JsonUtils :: buildJsonStringFromMaps unable to 
marshall map to json");
Line 42:             return "";


....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ReflectionUtils.java
Line 91:         }
Line 92:     }
Line 93: 
Line 94:     /**
Line 95:      * Replace an object in static filed for provided class.
s/filed/field
Line 96:      *
Line 97:      * @param clazz Class holds static field.
Line 98:      * @param fieldName Name of the field to be replaced.
Line 99:      * @param newObject Object which is used as replacement.


-- 
To view, visit http://gerrit.ovirt.org/20265
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If3362f9bfffe921df44103239ece8348001feca5
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Martin PeÅ™ina <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to