diff options
Diffstat (limited to 'examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py')
-rw-r--r-- | examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py b/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py index 5f59738a..5681d28c 100644 --- a/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py +++ b/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py @@ -21,18 +21,19 @@ Functionally similar to: from pysnmp.hlapi import * errorIndication, errorStatus, errorIndex, varBinds = next( - sendNotification(SnmpEngine(), - CommunityData('public'), - UdpTransportTarget(('demo.snmplabs.com', 162)), - ContextData(), - 'trap', - NotificationType( - ObjectIdentity('IF-MIB', 'linkUp'), - instanceIndex=(123,), - objects={('IF-MIB', 'ifIndex'): 123, - ('IF-MIB', 'ifAdminStatus'): 'up', - ('IF-MIB', 'ifOperStatus'): 'up'} - ) + sendNotification( + SnmpEngine(), + CommunityData('public'), + UdpTransportTarget(('demo.snmplabs.com', 162)), + ContextData(), + 'trap', + NotificationType( + ObjectIdentity('IF-MIB', 'linkUp'), + instanceIndex=(123,), + objects={('IF-MIB', 'ifIndex'): 123, + ('IF-MIB', 'ifAdminStatus'): 'up', + ('IF-MIB', 'ifOperStatus'): 'up'} + ) ) ) |