puresnmp icon indicating copy to clipboard operation
puresnmp copied to clipboard

Asyncio Traps

Open sburlappp opened this issue 4 years ago • 2 comments

Issue Description

Please add AIO support for the trap listener.

I have a Python project which catches traps and reposts them to a web interface via Socket.IO, which currently needs to use both threads and asyncio (using eventlet.monkey_patch), but could be better implemented with just asyncio.

I've gone looking for a Python library with asyncio trap catching support, but there doesn't appear to be anything else available. Adding this feature to puresnmp would fill an unmet need in the Python module library.

sburlappp avatar Sep 09 '21 18:09 sburlappp

Thanks for the request. It is something that I already have in the back of my head as well.

There is an incoming new major release (v2.x) which is asyncio-only but it's currently help back by some internal bureaucracy. I was initially hoping that it would be done by the beginning of 2021. But here we are.

The new version contains asyncio based trap handling as well. But this feature is not yet thoroughly tested. If it finally gets released I would appreciate any feedback on this. Even for non-functional issues like an API that does not feel "pythonic" or "not quite right".

Keep an eye out on the project. My aim is to release this in 2021 but I am bound by the company-internal open-source policy so I too have to wait :)

exhuma avatar Sep 13 '21 13:09 exhuma

This issue could potentially be considered for closure, given the 2.x series has been released. However, as per #107, the current handling appears broken (but can probably be further worked through there).

Also, even in the current state, support for SNMPv1 for traps is notably still missing - which can tie back to #36 (which is still open as of this writing). Notably, most of the current reasons that are bringing me around to these efforts here are due to efforts to communicate with equipment that, unfortunately, is still all tied to SNMPv1. I have some other efforts around this that I hope to circle back around to here as well...

ziesemer avatar Mar 26 '23 19:03 ziesemer