Eli Mesika has uploaded a new change for review.

Change subject: core:Event log - a method to bypass flo..(#875375)
......................................................................

core:Event log - a method to bypass flo..(#875375)

Event log - a method to bypass flood filtering

Adding a customId field to AuditLogableBase in order to enable
distinguishing between events that have same instance references (dc,
cluster, vm etc) but still should be treated as separate events such
that the anti-flood event mechanism will not mask those events and
display just one per the defined period.
It is the responsibility of the AuditLogableBase instance creator to call
setCustomId with a different id per log message instance in order to
treat those messages as different messages.

Change-Id: Iff160c4241618a2d0c475e13ea13ddefe8220f06
Signed-off-by: Eli Mesika <emes...@redhat.com>
---
M 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
M 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java
2 files changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/48/9148/1

diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
index a56cb5d..2119afe 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
@@ -853,6 +853,9 @@
         sb.append("template=");
         sb.append(logable.getVmTemplateId().equals(Guid.Empty) ? "" : 
logable.getVmTemplateId().toString());
         sb.append(DELIMITER);
+        sb.append("customId=");
+        sb.append(logable.getCustomId() == null ? "" : 
logable.getCustomId().toString());
+        sb.append(DELIMITER);
 
         return sb.toString();
     }
diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java
index 83700ea..2ed527b 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBase.java
@@ -66,6 +66,7 @@
     private NGuid glusterVolumeId;
     private String glusterVolumeName;
     private GlusterVolumeEntity glusterVolume;
+    private Integer customId = null;
 
     public AuditLogableBase() {
     }
@@ -552,6 +553,14 @@
         return DbFacade.getInstance();
     }
 
+    public Integer getCustomId() {
+        return customId;
+    }
+
+    public void setCustomId(Integer customId) {
+        this.customId = customId;
+    }
+
     private static final Log log = LogFactory.getLog(AuditLogableBase.class);
 
 }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff160c4241618a2d0c475e13ea13ddefe8220f06
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to