diff options
author | Ilya Etingof <etingof@gmail.com> | 2016-11-05 22:59:31 +0100 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2016-11-05 22:59:31 +0100 |
commit | c54a3f6dc8ee433a55001e1cd97f6801bd6e52b7 (patch) | |
tree | 36b8477a686d5e15a8c6ab028626c69e7303eb10 /pysnmp/hlapi/asyncio/ntforg.py | |
parent | a0ef4b6ce81683dc33ae00b3dcedd1c4ec282249 (diff) | |
download | pysnmp-git-asyncio-dispatcher-fixes.tar.gz |
WIP: gracefully shutdown asyncio dispatcherasyncio-dispatcher-fixes
Diffstat (limited to 'pysnmp/hlapi/asyncio/ntforg.py')
-rw-r--r-- | pysnmp/hlapi/asyncio/ntforg.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/pysnmp/hlapi/asyncio/ntforg.py b/pysnmp/hlapi/asyncio/ntforg.py index 13ec63bd..0541684e 100644 --- a/pysnmp/hlapi/asyncio/ntforg.py +++ b/pysnmp/hlapi/asyncio/ntforg.py @@ -21,13 +21,28 @@ try: except ImportError: import trollius as asyncio -__all__ = ['sendNotification'] +__all__ = ['sendNotification', 'unconfigureNtfOrg'] vbProcessor = NotificationOriginatorVarBinds() lcd = NotificationOriginatorLcdConfigurator() @asyncio.coroutine +def unconfigureNtfOrg(snmpEngine, authData=None): + """Remove LCD configuration entry. + + If `authData` is not given, all currently configured LCD entries will be + removed. + + Note + ---- + Configuration entry removal may have a side effect of removing unused transport + and shutting down unused transport dispatcher. + """ + lcd.unconfigure(snmpEngine, authData) + + +@asyncio.coroutine def sendNotification(snmpEngine, authData, transportTarget, contextData, notifyType, varBinds, **options): """Creates a generator to send SNMP notification. |