The way SNMP tables are declared right now (using a simple dictionary for the columns), one gets error about "OID not increasing" when using eg. snmpwalk:
$ snmpwalk -Of -v2c -c public localhost DFS-HW-MIB::cpus
.iso.org.dod.internet.private.enterprises.dfs.systemhaus.dfsHwMIB.cpus.cpusNumber = INTEGER: 2
.iso.org.dod.internet.private.enterprises.dfs.systemhaus.dfsHwMIB.cpus.cpusTable.cpuEntry.0 = INTEGER: 0
.iso.org.dod.internet.private.enterprises.dfs.systemhaus.dfsHwMIB.cpus.cpusTable.cpuEntry.cpuIndex.1 = INTEGER: 0
.iso.org.dod.internet.private.enterprises.dfs.systemhaus.dfsHwMIB.cpus.cpusTable.cpuEntry.cpuIndex.2 = INTEGER: 1
.iso.org.dod.internet.private.enterprises.dfs.systemhaus.dfsHwMIB.cpus.cpusTable.cpuEntry.cpuStatus.1 = INTEGER: OK(1)
.iso.org.dod.internet.private.enterprises.dfs.systemhaus.dfsHwMIB.cpus.cpusTable.cpuEntry.cpuStatus.2 = INTEGER: OK(1)
.iso.org.dod.internet.private.enterprises.dfs.systemhaus.dfsHwMIB.cpus.cpusTable.cpuEntry.cpuNumCores.1 = INTEGER: 2
Error: OID not increasing: .iso.org.dod.internet.private.enterprises.dfs.systemhaus.dfsHwMIB.cpus.cpusTable.cpuEntry.cpuStatus.2
>= .iso.org.dod.internet.private.enterprises.dfs.systemhaus.dfsHwMIB.cpus.cpusTable.cpuEntry.cpuNumCores.1
While this can be worked around with with the "-Cc" flag to snmpwalk, this does not fix the case for other SNMP applications.
Attached patch changes the format of the Table declaration: instead of specifying a dictionairy as in
axd.Table(
"tableEntry",
{
"columnOne": [ 0, 1 ],
"columnTwo": [ 4, 5 ]
}
)
one now specifies a list of tuples as in
axd.Table(
"tableEntry",
[
( "columnOne", [ 0, 1 ] ),
( "columnTwo", [ 4, 5 ] )
]
)
The list maintains the order in which the columns were declared, thus yielding correct "noid" assignment and working snmpwalk output without a need for the -Cc switch.
Patch to implement ordered Table columns to allow declarations of properly increasing OIDs