summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelie <elie>2005-10-12 15:51:58 +0000
committerelie <elie>2005-10-12 15:51:58 +0000
commitbe71b3f4ac0baf1c41f5e7e7b3be00410c5cbe0c (patch)
treebdbde310c37aa7c9943343ab48ab4d73cd9956da
parent9122fc1442848c7af13266879529ea91a74ce505 (diff)
downloadpysnmp-be71b3f4ac0baf1c41f5e7e7b3be00410c5cbe0c.tar.gz
port number and var-binds fixed
-rw-r--r--examples/v3arch/agent/ntforg.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/v3arch/agent/ntforg.py b/examples/v3arch/agent/ntforg.py
index 9ab7db1..97442fd 100644
--- a/examples/v3arch/agent/ntforg.py
+++ b/examples/v3arch/agent/ntforg.py
@@ -16,18 +16,19 @@ config.addV3User(
)
# Transport params
-#config.addTargetParams(snmpEngine, 'myParams', 'test-user', 'authPriv')
-config.addTargetParams(snmpEngine, 'myParams', 'test-agent', 'noAuthNoPriv', 0)
+config.addTargetParams(snmpEngine, 'myParams', 'test-user', 'authPriv')
+#config.addTargetParams(snmpEngine, 'myParams', 'test-agent', 'noAuthNoPriv', 0)
# Transport addresses
config.addTargetAddr(
snmpEngine, 'myNMS', config.snmpUDPDomain,
- ('127.0.0.1', 1162), 'myParams', tagList='myManagementStations'
+ ('127.0.0.1', 162), 'myParams', tagList='myManagementStations'
)
# Notification targets
config.addNotificationTarget(
- snmpEngine, 'myNotifyName', 'myParams', 'myManagementStations'
+# snmpEngine, 'myNotifyName', 'myParams', 'myManagementStations', 'trap'
+ snmpEngine, 'myNotifyName', 'myParams', 'myManagementStations', 'inform'
)
# Setup transport endpoint
@@ -48,7 +49,7 @@ snmpContext = context.SnmpContext(snmpEngine)
ntforg.NotificationOriginator(snmpContext).sendNotification(
snmpEngine, 'myNotifyName', ('SNMPv2-MIB', 'coldStart'),
- (((1,3,6,1,2,1,1,5), v2c.Integer(1)),), ''
+ (((1,3,6,1,2,1,1,5), v2c.OctetString('Example Notificator')),), ''
)
snmpEngine.transportDispatcher.runDispatcher()