mooli tayer has posted comments on this change.

Change subject: notifier: modify the oid schema for SNMP notification.
......................................................................


Patch Set 6:

(3 comments)

http://gerrit.ovirt.org/#/c/32951/6/Makefile
File Makefile:

Line 418:       $(MAKE) copy-recursive SOURCEDIR=packaging/pki 
TARGETDIR="$(DESTDIR)$(PKG_PKI_DIR)" EXCLUDE_GEN="$(GENERATED)"
Line 419:       for d in bin branding conf files firewalld services setup; do \
Line 420:               $(MAKE) copy-recursive SOURCEDIR="packaging/$${d}" 
TARGETDIR="$(DESTDIR)$(DATA_DIR)/$${d}" EXCLUDE_GEN="$(GENERATED)"; \
Line 421:       done
Line 422:       $(MAKE) copy-recursive SOURCEDIR=packaging/doc 
TARGETDIR="$(DESTDIR)$(DOC_DIR)" EXCLUDE_GEN="$(GENERATED)"
> s/DOC_DIR/PKG_DOC_DIR/
Done
Line 423:       $(MAKE) copy-recursive SOURCEDIR=packaging/man 
TARGETDIR="$(DESTDIR)$(MAN_DIR)" EXCLUDE_GEN="$(GENERATED)"
Line 424:       $(MAKE) copy-recursive SOURCEDIR=packaging/pythonlib 
TARGETDIR="$(DESTDIR)$(PYTHON_DIR)" EXCLUDE_GEN="$(GENERATED)"
Line 425: 
Line 426:       # we should avoid make these directories dirty


http://gerrit.ovirt.org/#/c/32951/6/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 203: 
Line 204:     private void addString(PDU v2pdu, OID prefix, int suffix, String 
val, boolean allowEmpty) {
Line 205:         if (allowEmpty || !StringUtils.isEmpty(val)) {
Line 206:             v2pdu.add(new VariableBinding(new 
OID(prefix).append(suffix), new OctetString(val == null ? "" : val)));
Line 207:         }
> consider:
I think the current one is nicer.
Line 208:     }
Line 209: 
Line 210:     private void addInt(PDU v2pdu, OID prefix, int suffix, Integer 
val, boolean allowEmpty) {
Line 211:         if (allowEmpty || val != null) {


Line 214:     }
Line 215: 
Line 216:     private void addUuid(PDU v2pdu, final OID prefix, int suffix, 
Guid val) {
Line 217:         if (!Guid.Empty.equals(val)) {
Line 218:             addString(v2pdu, prefix, suffix, val.toString(), false);
> but this is invalid if val == null, because of that I preferred to have add
so since I cannot use Object at add string due to StringUtils.isEmpty(String 
str):

if (val != null && !Guid.Empty.equals(val)) {

}
?
Line 219:         }
Line 220:     }
Line 221: 
Line 222:     private static class Host {


-- 
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: 6
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

Reply via email to