savoirfairelinux / mod-booster-snmp

Shinken module for boosting SNMP connections
GNU Affero General Public License v3.0
3 stars 9 forks source link

Refactor value casting. #12

Open Seb-Solon opened 9 years ago

Seb-Solon commented 9 years ago

Here : https://github.com/savoirfairelinux/mod-booster-snmp/blob/master/module/snmpbooster_poller.py#L209

We may have mistaken on the OID type in the configuration. The module should not crash in this case.

New types : pyasn1.type.univ.OctectString . We have to float(str()) it pysnmp.proto.rfc[1102|1155].Opaque. This is a subclass of above but the float(str()) does not work

Seb-Solon commented 9 years ago

Actullay we have to rework this part of code. Casting is done twice. Once here and once few line after in compute result function. We should split compute result into format and compute so that we only compute when necessary