Kobi Ianko has uploaded a new change for review.

Change subject: engine: remove Quota audit log message when DC is in enforce 
mode.
......................................................................

engine: remove Quota audit log message when DC is in enforce mode.

When DC Quote mode enforced is selected and a VM does not have a quota
definitions, a log is printed the the DC is in audit mode.
Removing that log message.

Change-Id: I795f28ae247b0e78d7d785b37a3da834086a1e30
Bug-Url: https://bugzilla.redhat.com/1102613
Signed-off-by: Kobi Ianko <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/74/28274/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
index b30ce8d..377930c 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
@@ -699,9 +699,14 @@
             parameters.getCanDoActionMessages().add(String.format("$VmName 
%1$s",
                     parameters.getAuditLogable()
                             .getVmName()));
-            auditLogPair.setFirst(param.getParameterType() == 
QuotaConsumptionParameter.ParameterType.STORAGE ?
-                    
AuditLogType.MISSING_QUOTA_STORAGE_PARAMETERS_PERMISSIVE_MODE :
-                    
AuditLogType.MISSING_QUOTA_CLUSTER_PARAMETERS_PERMISSIVE_MODE);
+            if (QuotaEnforcementTypeEnum.SOFT_ENFORCEMENT == 
parameters.getAuditLogable()
+                    .getStoragePool()
+                    .getQuotaEnforcementType()) {
+                auditLogPair.setFirst(param.getParameterType() == 
QuotaConsumptionParameter.ParameterType.STORAGE ?
+                        
AuditLogType.MISSING_QUOTA_STORAGE_PARAMETERS_PERMISSIVE_MODE
+                        :
+                        
AuditLogType.MISSING_QUOTA_CLUSTER_PARAMETERS_PERMISSIVE_MODE);
+            }
             log.errorFormat("No Quota id passed from command: {0}", 
parameters.getAuditLogable().getClass().getName());
             corruptedParameters.add(param);
             return false;


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I795f28ae247b0e78d7d785b37a3da834086a1e30
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kobi Ianko <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to