summaryrefslogtreecommitdiff
path: root/examples/v3arch/oneliner/agent/ntforg.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/v3arch/oneliner/agent/ntforg.py')
-rw-r--r--examples/v3arch/oneliner/agent/ntforg.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/v3arch/oneliner/agent/ntforg.py b/examples/v3arch/oneliner/agent/ntforg.py
new file mode 100644
index 0000000..a5576f1
--- /dev/null
+++ b/examples/v3arch/oneliner/agent/ntforg.py
@@ -0,0 +1,16 @@
+from pysnmp.entity.rfc3413.oneliner import ntforg
+from pysnmp.proto.api import v2c
+
+errorIndication = ntforg.NotificationOriginator().sendNotification(
+ # SNMP v1
+ ntforg.CommunityData('test-manager', 'public', 0),
+ # SNMP v2
+# 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))
+ )
+
+if errorIndication:
+ print errorIndication