diff options
author | elie <elie> | 2013-05-05 11:11:51 +0000 |
---|---|---|
committer | elie <elie> | 2013-05-05 11:11:51 +0000 |
commit | a6bb3d327278d4a981b685aa01e02e053eb56115 (patch) | |
tree | b58a163a6ceb237640da98f219128e81484442ca /examples | |
parent | b1031a19082078b845f21fa382cc52ee67806c12 (diff) | |
download | pysnmp-a6bb3d327278d4a981b685aa01e02e053eb56115.tar.gz |
Fix and significant logic rework of snmpCommunityTable to make it working
in both Generator and Responder modes and better follow RFC2576 requirements on sequential entries lookup and selection. As a side effect,
untagged snmpCommunityTable entries will *not* match tagged
snmpTargetAddrTable entries and vice versa.
Diffstat (limited to 'examples')
9 files changed, 11 insertions, 10 deletions
diff --git a/examples/v3arch/agent/ntforg/inform-multiple-protocols.py b/examples/v3arch/agent/ntforg/inform-multiple-protocols.py index 655c474..7b1be81 100644 --- a/examples/v3arch/agent/ntforg/inform-multiple-protocols.py +++ b/examples/v3arch/agent/ntforg/inform-multiple-protocols.py @@ -27,7 +27,7 @@ snmpEngine = engine.SnmpEngine() # SNMPv2c: # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds-1', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/agent/ntforg/inform-v2c.py b/examples/v3arch/agent/ntforg/inform-v2c.py index 0054211..7a27e3d 100644 --- a/examples/v3arch/agent/ntforg/inform-v2c.py +++ b/examples/v3arch/agent/ntforg/inform-v2c.py @@ -21,8 +21,9 @@ from pysnmp.proto.api import v2c # Create SNMP engine instance snmpEngine = engine.SnmpEngine() -# SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +# SecurityName <-> CommunityName mapping (+ transport binding) +config.addV1System(snmpEngine, 'my-area', 'public', + transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/agent/ntforg/trap-v1-from-specific-address.py b/examples/v3arch/agent/ntforg/trap-v1-from-specific-address.py index c0b3504..c4773dd 100644 --- a/examples/v3arch/agent/ntforg/trap-v1-from-specific-address.py +++ b/examples/v3arch/agent/ntforg/trap-v1-from-specific-address.py @@ -20,7 +20,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv1 -> 0) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 0) diff --git a/examples/v3arch/agent/ntforg/trap-v1.py b/examples/v3arch/agent/ntforg/trap-v1.py index 62974ed..d9e0269 100644 --- a/examples/v3arch/agent/ntforg/trap-v1.py +++ b/examples/v3arch/agent/ntforg/trap-v1.py @@ -28,7 +28,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv1 -> 0) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 0) diff --git a/examples/v3arch/agent/ntforg/trap-v2c-multiple-addresses.py b/examples/v3arch/agent/ntforg/trap-v2c-multiple-addresses.py index 8218195..e118bf1 100644 --- a/examples/v3arch/agent/ntforg/trap-v2c-multiple-addresses.py +++ b/examples/v3arch/agent/ntforg/trap-v2c-multiple-addresses.py @@ -23,7 +23,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/agent/ntforg/trap-v2c-multiple-targets.py b/examples/v3arch/agent/ntforg/trap-v2c-multiple-targets.py index 562f465..34aaac1 100644 --- a/examples/v3arch/agent/ntforg/trap-v2c-multiple-targets.py +++ b/examples/v3arch/agent/ntforg/trap-v2c-multiple-targets.py @@ -23,7 +23,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/agent/ntforg/trap-v2c-multiple-transports.py b/examples/v3arch/agent/ntforg/trap-v2c-multiple-transports.py index 1a9aa65..1572597 100644 --- a/examples/v3arch/agent/ntforg/trap-v2c-multiple-transports.py +++ b/examples/v3arch/agent/ntforg/trap-v2c-multiple-transports.py @@ -22,7 +22,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/agent/ntforg/trap-v2c-with-objects.py b/examples/v3arch/agent/ntforg/trap-v2c-with-objects.py index ab7a2a5..b86569a 100644 --- a/examples/v3arch/agent/ntforg/trap-v2c-with-objects.py +++ b/examples/v3arch/agent/ntforg/trap-v2c-with-objects.py @@ -66,7 +66,7 @@ mibInstrumCtl.mibBuilder.exportSymbols( # # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/agent/ntforg/trap-v2c.py b/examples/v3arch/agent/ntforg/trap-v2c.py index c5bc933..337c376 100644 --- a/examples/v3arch/agent/ntforg/trap-v2c.py +++ b/examples/v3arch/agent/ntforg/trap-v2c.py @@ -22,7 +22,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) |