summaryrefslogtreecommitdiff
path: root/examples/hlapi
diff options
context:
space:
mode:
authorelie <elie>2015-12-13 12:05:03 +0000
committerelie <elie>2015-12-13 12:05:03 +0000
commit1090a68028c88f05bd02b567c5d45e9bd753d9ee (patch)
treef2978bed8f5e26b1eeb6d05e54d531786b13d889 /examples/hlapi
parent1244961c3fb0c76289bc94c6b66da7474838c556 (diff)
downloadpysnmp-git-1090a68028c88f05bd02b567c5d45e9bd753d9ee.tar.gz
notification originator examples re-pointed to Notification Receiver
at demo.snmplabs.com
Diffstat (limited to 'examples/hlapi')
-rw-r--r--examples/hlapi/asyncio/agent/ntforg/default-v1-trap.py2
-rw-r--r--examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py4
-rw-r--r--examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py2
-rw-r--r--examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py4
-rw-r--r--examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py4
-rw-r--r--examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py4
-rw-r--r--examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py2
-rw-r--r--examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py2
-rw-r--r--examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py2
-rw-r--r--examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py2
-rw-r--r--examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py2
-rw-r--r--examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-via-notification-type.py2
-rw-r--r--examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py2
-rw-r--r--examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py2
-rw-r--r--examples/hlapi/trollius/agent/ntforg/default-v1-trap.py2
-rw-r--r--examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py3
16 files changed, 21 insertions, 20 deletions
diff --git a/examples/hlapi/asyncio/agent/ntforg/default-v1-trap.py b/examples/hlapi/asyncio/agent/ntforg/default-v1-trap.py
index dbfb45a3..e11fbc90 100644
--- a/examples/hlapi/asyncio/agent/ntforg/default-v1-trap.py
+++ b/examples/hlapi/asyncio/agent/ntforg/default-v1-trap.py
@@ -35,7 +35,7 @@ def run():
errorIndication, errorStatus, errorIndex, varBinds = yield from sendNotification(
snmpEngine,
CommunityData('public', mpModel=0),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData(),
'trap',
NotificationType(
diff --git a/examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py b/examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py
index a67e374d..7907b3c3 100644
--- a/examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py
+++ b/examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py
@@ -19,7 +19,7 @@ what leads to excessive tables information.
Functionally similar to:
| $ snmptrap -v2c -c public demo.snmplabs.com 12345 1.3.6.1.6.3.1.1.5.2
-| $ snmpinform -v2c -c public localhost 12345 1.3.6.1.6.3.1.1.5.2
+| $ snmpinform -v2c -c public demo.snmplabs.com 12345 1.3.6.1.6.3.1.1.5.2
| $ snmptrap -v2c -c public demo.snmplabs.com 12345 1.3.6.1.6.3.1.1.5.2
"""#
@@ -51,5 +51,5 @@ snmpEngine = SnmpEngine()
loop = asyncio.get_event_loop()
loop.run_until_complete(
asyncio.wait([sendone(snmpEngine, 'demo.snmplabs.com', 'trap'),
- sendone(snmpEngine, 'localhost', 'inform')])
+ sendone(snmpEngine, 'demo.snmplabs.com', 'inform')])
)
diff --git a/examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py b/examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py
index f36009eb..8f48dbe9 100644
--- a/examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py
+++ b/examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py
@@ -33,7 +33,7 @@ snmpEngine = SnmpEngine()
sendNotification(
snmpEngine,
CommunityData('public', mpModel=0),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData(),
'trap',
NotificationType(
diff --git a/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py b/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py
index c0ae96b0..05cad09b 100644
--- a/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py
+++ b/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py
@@ -20,11 +20,11 @@ from pysnmp.hlapi.asyncore import *
targets = (
# 1-st target (SNMPv2c over IPv4/UDP)
( CommunityData('public'),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData() ),
# 2-nd target (SNMPv3 over IPv4/UDP)
( UsmUserData('usr-md5-des', 'authkey1', 'privkey1'),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData() ),
)
diff --git a/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py b/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py
index 729f2e5c..40175d11 100644
--- a/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py
+++ b/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py
@@ -21,11 +21,11 @@ from pysnmp.hlapi.asyncore import *
targets = (
# 1-st target (SNMPv1 over IPv4/UDP)
( CommunityData('public', mpModel=0),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData() ),
# 2-nd target (SNMPv2c over IPv4/UDP)
( CommunityData('public'),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData() ),
)
diff --git a/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py b/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py
index ce9db153..80e7f2c2 100644
--- a/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py
+++ b/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py
@@ -34,11 +34,11 @@ from pysnmp.carrier.asyncore.dispatch import AsyncoreDispatcher
targets = (
# 1-st target (SNMPv2c over IPv4/UDP)
( CommunityData('public'),
- UdpTransportTarget(('localhost', 1162)),
+ UdpTransportTarget(('demo.snmplabs.com', 1162)),
ContextData() ),
# 2-nd target (SNMPv3 over IPv4/UDP)
( UsmUserData('usr-md5-des', 'authkey1', 'privkey1'),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData() ),
)
diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py b/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py
index 2ccdafe6..f25da4ce 100644
--- a/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py
+++ b/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py
@@ -29,7 +29,7 @@ from pysnmp.hlapi import *
errorIndication, errorStatus, errorIndex, varBinds = next(
sendNotification(SnmpEngine(),
UsmUserData('usr-md5-none', 'authkey1'),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData(OctetString(hexValue='8000000004030201')),
'inform',
NotificationType(ObjectIdentity('1.3.6.1.6.3.1.1.5.2')))
diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py b/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py
index a087c7ef..31171760 100644
--- a/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py
+++ b/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py
@@ -29,7 +29,7 @@ from pysnmp.hlapi import *
errorIndication, errorStatus, errorIndex, varBinds = next(
sendNotification(SnmpEngine(),
UsmUserData('usr-md5-none', 'authkey1'),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData(contextName='my-context'),
'inform',
NotificationType(ObjectIdentity('1.3.6.1.6.3.1.1.5.2')))
diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py b/examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py
index 768ad26b..41ae4cc3 100644
--- a/examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py
+++ b/examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py
@@ -33,7 +33,7 @@ from pysnmp.hlapi import *
errorIndication, errorStatus, errorIndex, varBinds = next(
sendNotification(SnmpEngine(),
CommunityData('public', mpModel=0),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData(),
'trap',
NotificationType(
diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py b/examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py
index 7d4a9d00..42308bcb 100644
--- a/examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py
+++ b/examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py
@@ -31,7 +31,7 @@ from pysnmp.hlapi import *
errorIndication, errorStatus, errorIndex, varBinds = next(
sendNotification(SnmpEngine(),
CommunityData('public', mpModel=0),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData(),
'trap',
NotificationType(
diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py b/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py
index 17cf8991..7ae42902 100644
--- a/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py
+++ b/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py
@@ -25,7 +25,7 @@ from pysnmp.hlapi import *
errorIndication, errorStatus, errorIndex, varBinds = next(
sendNotification(SnmpEngine(),
CommunityData('public'),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData(),
'inform',
NotificationType(
diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-via-notification-type.py b/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-via-notification-type.py
index e5121b2b..ddf66e14 100644
--- a/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-via-notification-type.py
+++ b/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-via-notification-type.py
@@ -24,7 +24,7 @@ from pysnmp.hlapi import *
errorIndication, errorStatus, errorIndex, varBinds = next(
sendNotification(SnmpEngine(),
CommunityData('public'),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData(),
'trap',
NotificationType(
diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py b/examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py
index 39f5127e..5d8e284a 100644
--- a/examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py
+++ b/examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py
@@ -25,7 +25,7 @@ from pysnmp.hlapi import *
errorIndication, errorStatus, errorIndex, varBinds = next(
sendNotification(SnmpEngine(),
UsmUserData('usr-md5-des', 'authkey1', 'privkey1'),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData(),
'inform',
NotificationType(
diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py b/examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py
index ba62b398..fb644e45 100644
--- a/examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py
+++ b/examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py
@@ -33,7 +33,7 @@ errorIndication, errorStatus, errorIndex, varBinds = next(
UsmUserData('usr-sha-aes128', 'authkey1', 'privkey1',
authProtocol=usmHMACSHAAuthProtocol,
privProtocol=usmAesCfb128Protocol),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData(),
'trap',
NotificationType(
diff --git a/examples/hlapi/trollius/agent/ntforg/default-v1-trap.py b/examples/hlapi/trollius/agent/ntforg/default-v1-trap.py
index dbfb63e4..f5f4879f 100644
--- a/examples/hlapi/trollius/agent/ntforg/default-v1-trap.py
+++ b/examples/hlapi/trollius/agent/ntforg/default-v1-trap.py
@@ -38,7 +38,7 @@ def run():
sendNotification(
snmpEngine,
CommunityData('public'), # mpModel=0),
- UdpTransportTarget(('localhost', 162)),
+ UdpTransportTarget(('demo.snmplabs.com', 162)),
ContextData(),
'inform',
NotificationType(
diff --git a/examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py b/examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py
index e0839c30..f4dc8aef 100644
--- a/examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py
+++ b/examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py
@@ -70,4 +70,5 @@ def sendall(reactor, destinations):
for hostname, notifyType in destinations ]
)
-react(sendall, [[('localhost', 'trap'), ('localhost', 'inform')]])
+react(sendall, [[('demo.snmplabs.com', 'trap'),
+ ('demo.snmplabs.com', 'inform')]])