mooli tayer has posted comments on this change. Change subject: notifier: modify the oid schema for SNMP notification. ......................................................................
Patch Set 4: (2 comments) http://gerrit.ovirt.org/#/c/32951/4/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java File backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java: Line 147: } catch (IllegalArgumentException e) { Line 148: log.warn("Could not find event: " + event.getName() + " in auditLogTypes"); Line 149: } Line 150: // { [baseoid] objects(2) audit(1) } Line 151: OID auditObjects = new OID(profile.oid).append(2).append(1); > not sure what is previous and this... but what I mean is to have symbolic c ovirtEngineNotifierNotificationsAudit = AUDIT objectsAuditSuffix = OBJECTS_AUDIT Line 152: Line 153: v2pdu.add(new VariableBinding( Line 154: new OID(auditObjects).append(1), Line 155: new OctetString(event.getName()))); Line 224: v2pdu.add(new VariableBinding( Line 225: new OID(auditObjects).append(17), Line 226: new OctetString(event.getStorageDomainName()))); Line 227: } Line 228: if (event.getStorageDomainId() != null && !event.getStorageDomainId().equals(Guid.Empty)) { > prefix.append will modify the parameter. Right. private void addString(PDU v2pdu, OID prefix,int suffix, String str) { if (!StringUtils.isEmpty(str)){ v2pdu.add(new VariableBinding(new Oid(prefix).append(suffix), new OctetString(str))); } } Line 229: v2pdu.add(new VariableBinding( Line 230: new OID(auditObjects).append(18), Line 231: new OctetString(event.getStorageDomainId().toString()))); Line 232: } -- To view, visit http://gerrit.ovirt.org/32951 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic8a06063f8ebbbe4d05783cb25036e870a6be3b7 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: mooli tayer <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Barak Azulay <[email protected]> Gerrit-Reviewer: Martin Peřina <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: mooli tayer <[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
