summaryrefslogtreecommitdiff
path: root/examples/hlapi/asyncore/agent/ntforg/async-multiple-informs-at-once.py
diff options
context:
space:
mode:
authorelie <elie>2015-09-27 10:26:25 +0000
committerelie <elie>2015-09-27 10:26:25 +0000
commit627d9ff4a3715477e56fe397f099ad0db0d5c1b9 (patch)
tree60cdd6f446e892194122abad0dfa4c6413eb4374 /examples/hlapi/asyncore/agent/ntforg/async-multiple-informs-at-once.py
parentbdfbce73382678e0288d8bc8d3093c827b05e1d1 (diff)
downloadpysnmp-627d9ff4a3715477e56fe397f099ad0db0d5c1b9.tar.gz
* Asyncore and asyncio-based APIs reworked to become functions.
* Asyncio and Twisted API moved entirely into high-level domain to be aligned with other high-level APIs. This WILL BREAK backward compatibility for those apps that use Twisted API.
Diffstat (limited to 'examples/hlapi/asyncore/agent/ntforg/async-multiple-informs-at-once.py')
-rw-r--r--examples/hlapi/asyncore/agent/ntforg/async-multiple-informs-at-once.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/hlapi/asyncore/agent/ntforg/async-multiple-informs-at-once.py b/examples/hlapi/asyncore/agent/ntforg/async-multiple-informs-at-once.py
index e2cacbe..c0ae96b 100644
--- a/examples/hlapi/asyncore/agent/ntforg/async-multiple-informs-at-once.py
+++ b/examples/hlapi/asyncore/agent/ntforg/async-multiple-informs-at-once.py
@@ -42,10 +42,8 @@ def cbFun(snmpEngine, sendRequestHandle, errorIndication,
snmpEngine = SnmpEngine()
-ntfOrg = AsyncNotificationOriginator()
-
for authData, transportTarget, contextData in targets:
- sendPduHandle = ntfOrg.sendNotification(
+ sendPduHandle = sendNotification(
snmpEngine,
authData,
transportTarget,
@@ -54,7 +52,7 @@ for authData, transportTarget, contextData in targets:
NotificationType(
ObjectIdentity('SNMPv2-MIB', 'coldStart')
).addVarBinds( ( '1.3.6.1.2.1.1.1.0', 'my name' ) ),
- cbInfo=(cbFun, None)
+ cbFun=cbFun
)
snmpEngine.transportDispatcher.runDispatcher()