
On Tue, Jul 11, 2006 at 02:21:17PM -0700, Randy Couey wrote:
[...]
I have written a patch for the python & perl dumpers to fix this problem. It creates a new key called 'ranges' which references a list of range dictionaries. To ensure backward compatibility, the last 'range' key/value pair is retained.
[...]
This allows knowledgeable apps to iterate through the 'ranges' list and properly deal with constraint unions, while older apps can still use the original, but possibly incorrect, 'range' key.
I have no clue how important it is to maintain bugward compatibility since I have no clue if anyone is using these output formats. On the other hand, if we do not provide the old range, apps might believe there is no range defined at all.
Another alternative could be to generate a range which is less strict, that is for [1:1] and [8:8] we could spit out [1:8] which might be better than generating just [8:8]. (Note that libsmi ensures that ranges are in ascending order if I recall correctly, regardless how things were defined in the MIB module.)
/js