Add isolated MIB loaders to support multiple sets of MIBs#68
Add isolated MIB loaders to support multiple sets of MIBs#68iwanb wants to merge 4 commits intovincentbernat:masterfrom
Conversation
|
Thanks! The diff is huge, but I suppose GitHub is just confused about whitespaces. I will look at it more later. As for the test errors, Python 2.6 needs |
|
OK, I will also have a look at the failures. |
6 similar comments
|
Any idea about the error with PySNMP 4.2? |
|
Dunno. But I'll look more into it later (at the same time I'll read your changes). I will be unavailable for a week soon, so it can take two weeks for me to do something. |
|
I didn't forget about the PR, but I am lacking time. Please, be patient. |
I have added a MibLoader class in the mib module so you can load and use isolated sets of MIBs. It uses the dataset feature of libsmi (smiInit("tag:dataset")). I have added some simple tests for it, and all the existing tests are passing (on my machine at least).
One issue is that AFAIK there is not way to release the memory of only that dataset, so if you want to start from scratch you need to reset libsmi completely.
The goal is to support multiple agents with different versions of the same MIB.
Let me know if there are other things I need to do.