ofri masad has posted comments on this change.

Change subject: engine:Trusted Compute Pools - Open Attestation integration 
with oVirt engine
......................................................................


Patch Set 3: (5 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
Line 92: 
Line 93:     private void checkTrustedService() {
Line 94:         AuditLogableBase logable = new AuditLogableBase();
Line 95:         logable.addCustomValue("VmName", getVmName());
Line 96:         if (getParameters().getVm().isTrustedService() && 
!getVdsGroup().supportsTrustedService()) {
getParameters().getVm() will give you only en empty object (.isTrustedService() 
will always be false). use the field 'oldVm', which holds the full data of the 
VM before the update.
Line 97:             AuditLogDirector.log(logable, 
AuditLogType.USER_UPDATE_VM_FROM_TRUSTED_TO_UNTRUSTED);
Line 98:         }
Line 99:         else if (!getParameters().getVm().isTrustedService() && 
getVdsGroup().supportsTrustedService()) {
Line 100:             AuditLogDirector.log(logable, 
AuditLogType.USER_UPDATE_VM_FROM_UNTRUSTED_TO_TRUSTED);


Line 95:         logable.addCustomValue("VmName", getVmName());
Line 96:         if (getParameters().getVm().isTrustedService() && 
!getVdsGroup().supportsTrustedService()) {
Line 97:             AuditLogDirector.log(logable, 
AuditLogType.USER_UPDATE_VM_FROM_TRUSTED_TO_UNTRUSTED);
Line 98:         }
Line 99:         else if (!getParameters().getVm().isTrustedService() && 
getVdsGroup().supportsTrustedService()) {
same here
Line 100:             AuditLogDirector.log(logable, 
AuditLogType.USER_UPDATE_VM_FROM_UNTRUSTED_TO_TRUSTED);
Line 101:         }
Line 102:     }
Line 103: 


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
Line 620:         
severities.put(AuditLogType.USER_UPDATE_VM_TEMPLATE_FROM_UNTRUSTED_TO_TRUSTED, 
AuditLogSeverity.NORMAL);
Line 621:         
severities.put(AuditLogType.USER_ADD_VM_FROM_TRUSTED_TO_UNTRUSTED, 
AuditLogSeverity.NORMAL);
Line 622:         
severities.put(AuditLogType.USER_ADD_VM_FROM_UNTRUSTED_TO_TRUSTED, 
AuditLogSeverity.NORMAL);
Line 623:         
severities.put(AuditLogType.USER_UPDATE_VM_FROM_TRUSTED_TO_UNTRUSTED, 
AuditLogSeverity.NORMAL);
Line 624:         
severities.put(AuditLogType.USER_UPDATE_VM_FROM_UNTRUSTED_TO_TRUSTED, 
AuditLogSeverity.NORMAL);
please change both to "WARNING" instead of "NORMAL"
Line 625:     }
Line 626: 
Line 627:     private static void initClusterSeverities() {
Line 628:         severities.put(AuditLogType.USER_ADD_VDS_GROUP, 
AuditLogSeverity.NORMAL);


....................................................
File 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
Line 27: USER_UPDATE_VM_TEMPLATE_FROM_TRUSTED_TO_UNTRUSTED=the Template 
${VmTemplateName} was updated from trusted cluster to non-trusted cluster.
Line 28: USER_UPDATE_VM_TEMPLATE_FROM_UNTRUSTED_TO_TRUSTED=the Template 
${VmTemplateName} was updated from non-trusted cluster to trusted cluster.
Line 29: USER_ADD_VM_FROM_TRUSTED_TO_UNTRUSTED=the non-trusted Vm ${VmName} was 
created from trusted Template ${VmTemplateName}.
Line 30: USER_ADD_VM_FROM_UNTRUSTED_TO_TRUSTED=the trusted Vm ${VmName} was 
created from non-trusted Template ${VmTemplateName}.
Line 31: USER_UPDATE_VM_FROM_TRUSTED_TO_UNTRUSTED=the Vm ${VmName} was updated 
from trusted cluster to non-trusted cluster.
s/the/The 
s/Vm/VM
Line 32: USER_UPDATE_VM_FROM_UNTRUSTED_TO_TRUSTED=the Vm ${VmName} was updated 
from non-trusted cluster to trusted cluster.
Line 33: USER_ADD_VM_TO_POOL=VM ${VmName} was added to VM Pool ${VmPoolName} by 
${UserName}.
Line 34: USER_ADD_VM_TO_POOL_FAILED=Failed to add VM ${VmName} to VM Pool 
${VmPoolName}(User: ${UserName}).
Line 35: USER_ATTACH_USER_TO_POOL=User ${AdUserName} was attached to VM Pool 
${VmPoolName} by ${UserName}.


Line 28: USER_UPDATE_VM_TEMPLATE_FROM_UNTRUSTED_TO_TRUSTED=the Template 
${VmTemplateName} was updated from non-trusted cluster to trusted cluster.
Line 29: USER_ADD_VM_FROM_TRUSTED_TO_UNTRUSTED=the non-trusted Vm ${VmName} was 
created from trusted Template ${VmTemplateName}.
Line 30: USER_ADD_VM_FROM_UNTRUSTED_TO_TRUSTED=the trusted Vm ${VmName} was 
created from non-trusted Template ${VmTemplateName}.
Line 31: USER_UPDATE_VM_FROM_TRUSTED_TO_UNTRUSTED=the Vm ${VmName} was updated 
from trusted cluster to non-trusted cluster.
Line 32: USER_UPDATE_VM_FROM_UNTRUSTED_TO_TRUSTED=the Vm ${VmName} was updated 
from non-trusted cluster to trusted cluster.
same
Line 33: USER_ADD_VM_TO_POOL=VM ${VmName} was added to VM Pool ${VmPoolName} by 
${UserName}.
Line 34: USER_ADD_VM_TO_POOL_FAILED=Failed to add VM ${VmName} to VM Pool 
${VmPoolName}(User: ${UserName}).
Line 35: USER_ATTACH_USER_TO_POOL=User ${AdUserName} was attached to VM Pool 
${VmPoolName} by ${UserName}.
Line 36: USER_ATTACH_USER_TO_POOL_INTERNAL=User ${AdUserName} was attached to 
VM Pool ${VmPoolName}.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I477f0c76a011473ed0802b8e4a23738e34e52e18
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gang Wei <[email protected]>
Gerrit-Reviewer: Dave Chen <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Emily Zhang <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to