From b0cdea76886841fd93b4a5a452cf30ec920bdaf3 Mon Sep 17 00:00:00 2001 From: elie Date: Wed, 12 Oct 2005 15:56:39 +0000 Subject: adjusted to changed sendNotification() params --- examples/v3arch/oneliner/agent/ntforg.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/examples/v3arch/oneliner/agent/ntforg.py b/examples/v3arch/oneliner/agent/ntforg.py index a5576f1..3277ba3 100644 --- a/examples/v3arch/oneliner/agent/ntforg.py +++ b/examples/v3arch/oneliner/agent/ntforg.py @@ -3,14 +3,20 @@ from pysnmp.proto.api import v2c errorIndication = ntforg.NotificationOriginator().sendNotification( # SNMP v1 - ntforg.CommunityData('test-manager', 'public', 0), +# ntforg.CommunityData('test-manager', 'public', 0), # SNMP v2 -# ntforg.CommunityData('test-manager', 'public'), +# ntforg.CommunityData('test-manager', 'public'), # SNMP v3 -# ntforg.UsmUserData('test-manager', 'authkey1', 'privkey1'), - ntforg.UdpTransportTarget(('localhost', 1162)), - ('SNMPv2-MIB', 'coldStart')#, ((1,3,6,1,2,1,1,3,0), v2c.Integer(32)) + ntforg.UsmUserData('test-user', 'authkey1', 'privkey1'), + ntforg.UdpTransportTarget(('localhost', 162)), + 'trap', + ('SNMPv2-MIB', 'coldStart'), + (((1,3,6,1,2,1,1,3,0), v2c.TimeTicks(44100)),) ) if errorIndication: print errorIndication + +# XXX +# informs require cbFun? +# responses do not come back for informs -- cgit v1.2.1