Compare commits

...

89 Commits

Author SHA1 Message Date
Ilya Etingof acd16a65f8 Disable pypy build in Travis
Because it stopped working.
2018-11-03 19:44:02 +01:00
Ilya Etingof e425da2a0f Disable Travis builds for py 2.6, 3.2 & 3.3
Seems like they discontinued those.
2018-11-03 14:18:59 +01:00
Ilya Etingof 4994111b2b Fix hlapi LCD to include `contextName` (#217)
Fixed hlapi LCD configurator to include `contextName`.
Prior to this fix sending SNMPv3 TRAP with non-default
`contextName` would fail.

This change modifies the signature of the internal
LCD methods.
2018-11-03 12:55:51 +01:00
Ilya Etingof 9ebd0c0fab Expose ASN.1 `Null` type through `rfc1902` module 2018-10-26 08:45:56 +02:00
Ilya Etingof 4aac8b23d5 Use `compile()` before `exec` of MIB modules
This change attaches the file name to the stack frames
what is helpful when reading traceback or debugging
interactively.
2018-10-26 08:45:46 +02:00
Ilya Etingof 602c4dd304 Merge branch 'master' of github.com:etingof/pysnmp 2018-10-26 08:20:37 +02:00
Ilya Etingof 0c0d054e8e
Refactor MIB state machine into asynchronous operations (#210)
Convert to async MIB instrumentation API (#210)

MIB instrumentation API changed to allow for asynchronous
managed objects access. The MIB instrumentation methods
called by the state machine now return immediately and
resume once the callback is called.

The built-in SNMPv2-SMI objects are still synchronous.

This change is a prerequisite for fully asynchronous managed objects
implementation.
2018-10-24 10:14:33 +02:00
Ilya Etingof 40cfd938c4 Fix typos 2018-10-17 23:28:26 +02:00
Ilya Etingof 534a5bb810
Convert to async MIB instrumentation API (#209)
MIB instrumentation API changed to allow for asynchronous
managed objects access. Although built-in SNMPv2-SMI objects
are still synchronous, the MIB instrumentation API is async
what allows users to replace default MIB instrumentation
with their own, potentially asynchronous.

CommandResponder refactored to facilitate asynchronous
MIB instrumentation routines. The `readVars`, `readNextVars`
and `writeVars` MIB controller methods return immediately and
deliver their results via a call back.

SMI/MIB managed objects API overhauled for simplicity and
flexibility breaking backward compatibility.
2018-10-13 20:21:31 +02:00
Ilya Etingof 12138b182c Fix Sphinx markup for USM crypto algorithm IDs 2018-10-06 20:15:39 +02:00
Ilya Etingof 593ff19283 Reformat `isAccessAllowed()` for clarity 2018-10-06 09:32:23 +02:00
Fabrizio Vanni 35e9c6f7a6 Avoid deprecation warnings for asyncio.async() in server mode (#202)
This is actually needed for Python 3.7 which introduces async and await
as  reserved keywords, see https://docs.python.org/3/whatsnew/3.7.html
2018-09-26 11:12:30 +02:00
Ilya Etingof 53e67f9533 Ensure distinct transports if timeout/retries differ
Fix hlapi/v3arch transport target caching to ensure transport targets
are different even if just timeout/retries options differ.
2018-09-20 10:45:38 +02:00
Ilya Etingof da7582db99 Register missing v1arch.asyncore.sync sub-package 2018-09-14 01:30:35 +02:00
Ilya Etingof b334f5cf63 Accommodate changed `.writeVars` signature 2018-09-14 00:53:45 +02:00
Ilya Etingof 6e30bc0457 Release 4.4.6 2018-09-13 23:53:35 +02:00
Ilya Etingof bdc0ac2977
Tolerate non-initialised entries in SNMP community table (#195)
It can happen that SNMP community table contains uninitialized entries.
These entries may stop internal SNMP community table indexing which
is done in rfc2576 to speed up SNMP engine operations when SNMPv1/v2c
is involved. Once a bad entry gets into SNMP community table, all
the rest queries would start failing.

This patch ignores incomplete SNMP community table entries in the
course of building indices.
2018-09-13 23:51:43 +02:00
Ilya Etingof 74434d710c Tolerate duplicate enumerations
Possible duplicate enumerations in `Bits` and `Integer` SMI types
causes pyasn1 exception. This fix reduces duplicates prior to
passing them to pyasn1.
2018-09-09 12:24:39 +02:00
Ilya Etingof b2b10e75c5 Add a CHANGELOG entry for previous fix 2018-09-09 09:40:04 +02:00
Ryan Van Gilder 7cd0b148b1 Fix lcd.unconfigure not removing cached addr value preventing the same target being re-configured (#194) 2018-09-09 09:29:32 +02:00
Ilya Etingof 1537699336 Simplify SNMPv3 TRAP receiver example 2018-09-02 08:45:31 +02:00
Ilya Etingof ac0b956d00
Add `hlapi.v1arch` API (#186)
* Add `hlapi.v1arch` API

Introduce new sub-package `pysnmp.hlapi.v1arch` which
wraps otherwise very detailed packet-level SNMP
messaging into a handful of convenience functions.

As a side effect, the `pysnmp.hlapi.*` sub-packages
moved under `pysnmp.hlapi.v3arch` though `pysnmp.hlapi`
still exposes `pysnmp.hlappi.v3arch.*` symbols to
retain some degree of backward compatibility.

The signature of the hlapi `.sendNotification()` call
has changed to accept `*varBinds` instead of a sequence
of `varBinds`. The rationale is to unify this method
call with similar methods of CommandGenerator.

* Add v1arch docs and reshuffle hlapi docs
2018-08-12 17:22:58 +02:00
Ilya Etingof 488ec26798 Recover missing LICENSE in tarball 2018-08-08 07:56:35 +02:00
Ilya Etingof 1b240862ed Improve long description in Trove 2018-08-06 23:38:15 +02:00
Ilya Etingof d662c557a7 Improve package build and dependency tracking 2018-08-06 23:37:07 +02:00
Ilya Etingof 861d28f200 enable py3.2 build in Travis 2018-08-06 16:56:55 +02:00
Ilya Etingof 9a81eaa1ee Rename LICENSE.txt -> LICENSE.rst 2018-08-06 09:23:25 +02:00
Ilya Etingof 6898b225d2 VACM contextName memory leak fix followup 2018-08-06 09:16:50 +02:00
Ilya Etingof a57dc32430 VACM contextName memory leak fix 2018-08-06 09:16:50 +02:00
Ilya Etingof 3b514f9aec Fix PySnmpError implementation
This is a follow up fix to make PySnmpError properly
overriding base Exception call signature
2018-08-06 09:16:50 +02:00
Ilya Etingof 853ba0bbf5 Add PySnmpError.cause attribute
To convey parent exception information on re-raise
2018-08-06 09:16:50 +02:00
Ilya Etingof 797b4fe627 Fix out-of-scope OID leak in hlapi table
Fixed out-of-scope OIDs possibly leaking at the end of
SNMP table at hlapi `nextCmd` and `bulkCmd` calls when
`lexicographicMode = False`.
2018-08-06 09:16:50 +02:00
Ilya Etingof 7b28a4822c Fix crash on wrong SNMPv3 security model
Fixed crash caused by incoming SNMPv3 message
requesting SNMPv1/v2c security model
2018-08-06 09:16:50 +02:00
Ilya Etingof 54ff456e9c VACM contextName memory leak fix followup 2018-08-06 00:17:24 +02:00
Ilya Etingof 8aa1636fa1 VACM contextName memory leak fix 2018-08-06 00:16:58 +02:00
Ilya Etingof 59281af344 Rename LICENSE.txt -> LICENSE.rst 2018-08-05 21:29:10 +02:00
Ilya Etingof 3bae7dcc6c Fix PySnmpError implementation
This is a follow up fix to make PySnmpError properly
overriding base Exception call signature
2018-08-05 10:25:12 +02:00
Ilya Etingof cf68c25ca8 Add PySnmpError.cause attribute
To convey parent exception information on re-raise
2018-08-05 09:56:11 +02:00
Ilya Etingof 6559ebe1ea Fix out-of-scope OID leak in hlapi table
Fixed out-of-scope OIDs possibly leaking at the end of
SNMP table at hlapi `nextCmd` and `bulkCmd` calls when
`lexicographicMode = False`.
2018-08-05 09:51:52 +02:00
Ilya Etingof 8d4b25841d Fix crash on wrong SNMPv3 security model
Fixed crash caused by incoming SNMPv3 message
requesting SNMPv1/v2c security model
2018-08-04 21:37:10 +02:00
Michal Arbet 0fba331b55 Fix py3.7 syntax error caused by async keyword (#180)
As async is the keyword since Python 3.7, let's use gettattr
built-in function to call async function from asyncio.
2018-07-31 14:48:23 +02:00
Vincent Bernat 2048a92303 Ensure tests run through tox are using the expected Python executable (#175)
Otherwise, they are likely to use the system python.
2018-07-31 08:41:55 +02:00
Ilya Etingof 3e8fd37ee1 Fix `Bits` initialization with `namedValues` 2018-07-20 09:57:16 +02:00
Ilya Etingof a93241007b
Remove `pysnmp.carrier.asynsock` sub-package (#166)
Legacy `pysnmp.carrier.asynsock` backward-compatible
wrapper over `pysnmp.carrier.asyncore` is gone
2018-07-08 12:59:49 +02:00
Ilya Etingof 5168479e42
Add extra-requirements.txt (#165)
* Add extra-requirements.txt

In grand schema of things we now have `requirements.txt`
that list mandatory dependencies, then we have
`extra-requirements.txt` for optional dependencies enabling
all pysnmp features and finally `devel-requirements.txt`
for things required solely for testing.

Strangely, Travis pulls pysnmpcrypto which then pulls
Cryptography while according to pysnmpcrypyo requirement
it should really pull pycryptodomex (which is does in its
own CI job)
2018-07-08 12:05:59 +02:00
Ilya Etingof 8dbc28d360 Fix BULKWALK examples
Avoid sending out extra GETBULK on EOM condition
2018-07-08 09:49:44 +02:00
Ilya Etingof 212e1b54c3 Revert "Fix var-bind initialization from ObjectIdentity at hlapi"
This reverts commit 23d1aa7bf5.
2018-07-05 13:40:32 +02:00
Ilya Etingof dc34f140e3 Fix typo in docstring 2018-07-05 10:42:21 +02:00
Ilya Etingof c950f407ea Fix var-bind initialization from ObjectIdentity at hlapi 2018-07-05 10:42:03 +02:00
Ilya Etingof 91fe21ab60 Fix scoping bug in asyncio wrapper
Probably introduced by commit 2b27b49db7
2018-07-04 09:31:03 +02:00
Ilya Etingof 3a8d4ec10b Merge branch 'master' of github.com:etingof/pysnmp 2018-07-03 08:19:28 +02:00
Eric Brown d5ab28820d Switch back to offical Python 3.7 build (#163)
It appears that Python 3.7 use in Travis-CI is finally fixed. However,
it requires use of xenial distribution and sudo: true.  Those have
now been added to the matrix.

Signed-off-by: Eric Brown <browne@vmware.com>
2018-07-03 08:18:56 +02:00
Ilya Etingof 7f65dde49a Fix typos 2018-07-03 08:05:23 +02:00
Ilya Etingof da4539e34c
Overhaul SMI/MIB instrumentation API (#161)
Overhaul SMI/MIB instrumentation API

SMI/MIB managed objects API overhauled for simplicity and
flexibility breaking backward compatibility.

This change would allow way more control over custom MIB
managed objects and also is the prerequisite for
asynchronous MIB instrumentation.
2018-06-30 20:14:57 +02:00
Ilya Etingof df6d6a6efd switch Travis back to 3.7-dev while 3.7 is not avail 2018-06-29 09:29:59 +02:00
Ilya Etingof f12389f1ae reduce tests output by tailing them 2018-06-29 09:29:46 +02:00
Eric Brown f14b61a7da Add Python 3.7 support (#162)
Python 3.7 was just released [1]. This is a small change to
enable support in pysnmp.

[1] https://docs.python.org/3.7/whatsnew/3.7.html

Signed-off-by: Eric Brown <browne@vmware.com>
2018-06-28 08:49:59 +02:00
Ilya Etingof 61f7a10adf pin twisted versions 2018-05-18 08:19:16 +02:00
Aaron Spike 38827dec2c Typo "preperly" -> "properly" (#156) 2018-05-18 07:47:35 +02:00
Ilya Etingof f1e9f13141 fix potential infinite loop in GETBULK response builder 2018-04-21 23:16:34 +02:00
Ilya Etingof 8935532ee7 Merge branch 'master' of github.com:etingof/pysnmp 2018-04-21 18:46:34 +02:00
Cameron 2b27b49db7 asyncio.async deprecated since 3.4.4 (#143)
* asyncio.async deprecated since 3.4.4
2018-04-21 18:43:45 +02:00
Ilya Etingof 2346e0a9af fixed zero boots/time values put into SNMPv3 TRAP 2018-04-21 17:46:28 +02:00
Ilya Etingof 04f1fa8476 better InetAddressType rendering fix 2018-04-21 17:46:09 +02:00
Ilya Etingof 80b09ebb90
Merge pull request #150 from ericwb/pypi
Migrate to new PyPI website
2018-04-19 08:45:51 +02:00
Eric Brown 961dacb689 Migrate to new PyPI website
According to [1], the PyPI website of pypi.python.org has changed
to https://pypi.org. This patch updates all references to the
legacy site.

[1] https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html

Signed-off-by: Eric Brown <browne@vmware.com>
2018-04-18 21:49:51 -07:00
Ilya Etingof 551e4c9a69 fix InetAddressType rendering 2018-04-19 01:13:55 +02:00
Ilya Etingof b3dc9a6699 use old Sphinx wuth old Python 2018-04-13 09:35:24 +02:00
Ilya Etingof 9bac440607 typo fix in RFC1158::snmpOutReadOnlys 2018-04-13 08:58:49 +02:00
Ilya Etingof 35a0bb9e79 Include LICENSE in wheel 2018-04-13 08:56:36 +02:00
Ilya Etingof 4d57bdbbfe fix to MibBuilder.version format 2018-02-25 22:54:16 +01:00
Ilya Etingof 7f7f202908
Merge pull request #139 from etingof/drop-legacy-code
Drop backward-compatibility aids
2018-02-25 11:25:00 +01:00
Ilya Etingof 0a29dd1f35 many backward-compatibility aids dropped 2018-02-25 00:08:01 +01:00
Ilya Etingof f38ae966c0
Merge pull request #135 from etingof/pysnmpcrypto-dependency
Strong crypto moved to pysnmpcrypto
2018-02-24 21:42:19 +01:00
Ilya Etingof 24a7988766 strong crypto moved to pysnmpcrypto 2018-02-19 00:41:28 +01:00
Ilya Etingof bc2654205b pysnmp-apps renamed into snmpclitools 2018-02-16 13:40:46 +01:00
Ilya Etingof cd5db32c6c
Merge pull request #133 from mattsb42-aws/hybrid-crypto
Move to a hybrid crypto backend, using pyca/cryptography when available but failing back to PyCryptodomex for Python versions that pyca/cryptography does not support
2018-02-16 08:33:28 +01:00
mattsb42-aws eed17d7cf8 reworking DES module to fit the same pattern a DES3 and AES modules 2018-02-14 11:19:29 -08:00
mattsb42-aws 5907ed57cc fixing copy-paste docstring typo in AES module 2018-02-14 11:18:54 -08:00
mattsb42-aws 36b2c64ba3 fixing typo in "crypto.CRYPTOGRAPHY" variable name 2018-02-12 13:34:13 -08:00
mattsb42-aws e40ffe79d2 adding py33 to the tox auto-run environments 2018-02-09 11:25:12 -08:00
mattsb42-aws 59fc4038ce ignore pyenv locals file 2018-02-09 11:24:54 -08:00
mattsb42-aws b0b141cf75 fixing Python 2.6 dependency issue 2018-02-09 11:18:01 -08:00
mattsb42-aws f31ff816e7 readme and changes updated to reflect crypto abstraction layer 2018-02-09 11:12:29 -08:00
mattsb42-aws a4442ba387 adding docstrings, cleaning up generic_*crypt missing backend handling, and fixing copy-pasted parameter names on decyrpt methods 2018-02-09 11:12:29 -08:00
mattsb42-aws ab945c536a streamlining version handling 2018-02-09 11:12:29 -08:00
mattsb42-aws 9306d4b040 initial migration to backend-selecting crypto 2018-02-09 11:12:29 -08:00
mattsb42-aws 1fba745773 bumping Travis CI max runtime from 10 minutes to 20 2018-02-09 11:12:29 -08:00
mattsb42-aws 7e32a15c47 adding a basic tox handle to simplify running tests 2018-02-09 11:12:29 -08:00
339 changed files with 7815 additions and 3243 deletions

6
.gitignore vendored
View File

@ -23,3 +23,9 @@ docs/source/.templates/layout.html
# Virtual envs
venv*
# Tox
.tox/
# Pyenv
.python-version

View File

@ -1,19 +1,41 @@
language: python
python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
- "nightly"
# - "pypy"
# - "pypy3"
cache: pip
matrix:
include:
- os: linux
dist: xenial
sudo: false
python: '2.7'
- os: linux
dist: xenial
sudo: false
python: '3.4'
- os: linux
dist: xenial
sudo: false
python: '3.5'
- os: linux
dist: xenial
sudo: false
python: '3.6'
- os: linux
dist: xenial
sudo: true
python: '3.7'
- os: linux
dist: xenial
sudo: false
python: 'nightly'
# - os: linux
# dist: xenial
# sudo: false
# python: 'pypy'
# - os: linux
# dist: xenial
# sudo: false
# python: 'pypy3'
install:
- pip install -r requirements.txt -r devel-requirements.txt
- pip install -r requirements.txt -r devel-requirements.txt -r extra-requirements.txt
- pip install -e .
- pip install pysnmp-mibs
script:
- sh runtests.sh
- travis_wait 20 sh runtests.sh

View File

@ -1,4 +1,104 @@
Revision 5.0.0, released 2018-10-??
-----------------------------------
- SNMPv3 crypto operations that require external dependencies
made dependent on the optional external
package -- pysnmpcrypto.
- By switching to pysnmpcrypto, pysnmp effectively migrates from
PyCryptodomex to pyca/cryptography whenever available on the
platform.
- Many really old backward-compatibility code snippets removed.
Most importantly:
* `pysnmp.entity.rfc3413.oneliner` and everything related
to the (non-standard) UNIX domain socket transport is gone
* `pysnmp.carrier.asynsock` backward-compatible wrapper over
`pysnmp.carrier.asyncore` is gone
- The MIB instrumentation API overhauled in backward incompatible
way:
* MIB instrumentation methods signatures simplified to accept
just var-binds (as var-arg), the rest of the parameters packed
into opaque kwargs
* The `readVars`, `readNextVars` and `writeVars` methods of MIB
instrumentation controller return immediately and deliver their
results via a call back.
* CommandResponder application passes `snmpEngine` and optionally
user-supplied `cbCtx` object throughout the MIB instrumentation
methods. The goal is to let MIB objects access/modify whatever
custom Python objects they need while being called back.
* CommandResponder refactored to facilitate asynchronous
MIB instrumentation routines.
- The high-level API (`hlapi`) extended to cover lightweight SNMP v1arch
in hope to ease the use of packet-level SNMP API.
By way of introducing v1arch hlapi, the sub-packages layout changed
so that `pysnmp.hlapi` is moved to `pysnmp.hlapi.v3arch` and the new
v1arch layer is introduced in `pysnmp.hlapi.v1arch`. This change does
not break backward compatibility as `pysnmp.hlapi` still defaults to
`pysnmp.hlapi.v3arch`.
The `pysnmp.hlapi.v1arch` is designed to be as much similar in use
to `pysnmp.hlapi.v3arch`, but with high-performance in mind. One of
the consequences of this higher performance focus is that various
automation around building well-formed SNMP messages is and mediating
differences between SNMP versions is not present in this new `v1arch`
layer.
- The signature of the hlapi `.sendNotification()` call has changed
to accept `*varBinds` instead of a sequence of `varBinds`. The rationale
is to unify this method call with similar methods of CommandGenerator.
This change should not compromise backward compatibility with pysnmp 4.
Revision 4.4.7, released 2018-11-XX
-----------------------------------
- Exposed ASN.1 `Null` type through `rfc1902` module for convenience.
- Use `compile()` before `exec`'ing MIB modules to attach filename to
the stack frames (ultimately shown in traceback/debugger)
- Fixed hlapi/v3arch transport target caching to ensure transport targets
are different even if just timeout/retries options differ
- Fixed hlapi LCD configurator to include `contextName`. Prior to this fix
sending SNMPv3 TRAP with non-default `contextName` would fail.
Revision 4.4.6, released 2018-09-13
-----------------------------------
- Improved package build and dependency tracking
- Fixed missing LICENSE from the tarball distribution
- Fixed `CommandGeneratorLcdConfigurator.unconfigure()` to fully clean up
internal caches, otherwise repetitive attempts to configure the target
would fail.
- Fix to tolerate possible duplicate enumerations in `Bits` and `Integer`
SMI types.
- Fix to tolerate non-initialised entries in SNMP community table. Once a
bad entry sneaked into the SNMP community table, all the subsequent
SNMP v1/v2c operations failed. The fix ignores incomplete SNMP community
table entries in the course of building indices.
Revision 4.4.5, released 2018-08-05
-----------------------------------
- Added PySnmpError.cause attribute holding parent exception tuple
- Fixed zero SNMPv3 boots/time values put in SNMPv3 TRAP messages
- Fixed broken InetAddressType rendering caused by a pyasn1 regression
- Fixed typo in RFC1158 module
- Fixed possible infinite loop in GETBULK response PDU builder
- Fixed memory leak in the `config.delContext()` VACM management harness
- Fixed `Bits` class initialization when enumeration values are given
- Fixed crash caused by incoming SNMPv3 message requesting SNMPv1/v2c
security model
- Fixed out-of-scope OIDs leaking at the end of SNMP table at hlapi
`nextCmd` and `bulkCmd` calls when `lexicographicMode = False`
Revision 4.4.4, released 2018-01-03
-----------------------------------
@ -557,7 +657,7 @@ Revision 4.2.4, released 2013-01-30
defaulted value changed from None to () meaning no var-binds.
- Attempt to convert Windows style EOL into UNIX ones in MIB source
modules appeared to be unnecessary and even destructive to modules
data in some cases. So the convertion code removed altogether.
data in some cases. So the conversion code removed altogether.
- Fix to isAccessAllowed() error handling at NotificationOriginator. System
used to crash on access denied condition.
- Fix to NotificationOriginator to make it use system uptime and trap OID
@ -818,7 +918,7 @@ Revision 4.1.16a, released 2011-03-17
configuration (LCD).
+ default debug.logger is now just a zero value instead of an object
what saves big on frequent calls
+ SNMPv2-SMI columnar indices <-> index values convertion code optimized.
+ SNMPv2-SMI columnar indices <-> index values conversion code optimized.
+ pre-compute and re-use some of ASN.1 structures.
+ avoid setting PDU defaults to save on unnecessary initialization.
+ skip ASN.1 types verification where possible.
@ -1008,7 +1108,7 @@ Revision 4.1.9a, released 2007-11-28
effects.
- Fix to rfc2576.v1ToV2c() PDU converter to perform noSuchName error code
translation.
- Fixes to Notification PDU convertion code at rfc2576 in part of
- Fixes to Notification PDU conversion code at rfc2576 in part of
snmpTrapOID handling.
- Fix to nonRepeaters object use as sequence slicer (must be int) at
cmdrsp.CommandResponderApplication
@ -1030,7 +1130,7 @@ Revision 4.1.8a, released 2007-08-14
------------------------------------
- UNSTABLE ALPHA RELEASE.
- SMI/dispatcher timeout convertion multiplier is actually 100 (1/100 sec)
- SMI/dispatcher timeout conversion multiplier is actually 100 (1/100 sec)
rather than 1/1000. This fix affects timeouts specified through SMI.
- __repr__() implemented for UdpTransportTarget, CommunityData, UsmUserData
in oneliner module.
@ -1081,7 +1181,7 @@ Revision 4.1.7a, released 2007-02-19
- Fix to MibViewController.getNodeName() to take MIB module name
into account (SF bug #1505847).
- Do explicit check for Counter32,Unsigned32,TimeTicks,Counter64 value types
in MibTableRow index convertion and in TextualConvention.prettyPrint()
in MibTableRow index conversion and in TextualConvention.prettyPrint()
methods (SF bug #1506341). Handle Bits in indices as RFC2578 suggests.
- Apply read-create column status to libsmi2pysnmp-generated code
whenever MIB text specifies that (SF bug #1508955).
@ -1105,7 +1205,7 @@ Revision 4.1.7a, released 2007-02-19
- LCD unconfiguration functions for oneliners implemented (SF bug #1635270).
- unloadModules() and unexportSymbols() implemented at MibBuilder
- Notification type PDU proxy code fixed to produce symmetrical
convertion.
conversion.
- Various SNMP engine-internal caches expiration implemented.
- SMI-level access control now takes effect only if AC object is
passed to MIB instrumentation API.

View File

@ -1,4 +1,4 @@
include *.txt *.md *.sh
include *.rst *.txt *.md *.sh
recursive-include examples *.py
recursive-include docs/source *.rst *.svg *.py
recursive-include docs/mibs *.txt

View File

@ -1,10 +1,10 @@
SNMP library for Python
-----------------------
[![PyPI](https://img.shields.io/pypi/v/pysnmp.svg?maxAge=2592000)](https://pypi.python.org/pypi/pysnmp)
[![Python Versions](https://img.shields.io/pypi/pyversions/pysnmp.svg)](https://pypi.python.org/pypi/pysnmp/)
[![PyPI](https://img.shields.io/pypi/v/pysnmp.svg?maxAge=2592000)](https://pypi.org/project/pysnmp/)
[![Python Versions](https://img.shields.io/pypi/pyversions/pysnmp.svg)](https://pypi.org/project/pysnmp/)
[![Build status](https://travis-ci.org/etingof/pysnmp.svg?branch=master)](https://secure.travis-ci.org/etingof/pysnmp)
[![GitHub license](https://img.shields.io/badge/license-BSD-blue.svg)](https://raw.githubusercontent.com/etingof/pysnmp/master/LICENSE.txt)
[![GitHub license](https://img.shields.io/badge/license-BSD-blue.svg)](https://raw.githubusercontent.com/etingof/pysnmp/master/LICENSE.rst)
This is a pure-Python, open source and free implementation of v1/v2c/v3
SNMP engine distributed under 2-clause [BSD license](http://snmplabs.com/pysnmp/license.html).
@ -27,7 +27,7 @@ Features
* [PySMI](http://snmplabs.com/pysmi/) integration for dynamic MIB compilation
* Built-in instrumentation exposing protocol engine operations
* Python eggs and py2exe friendly
* 100% Python, works with Python 2.4 though 3.6
* 100% Python, works with Python 2.4 though 3.7
* MT-safe (if SnmpEngine is thread-local)
Features, specific to SNMPv3 model include:
@ -44,7 +44,7 @@ Features, specific to SNMPv3 model include:
Download & Install
------------------
The PySNMP software is freely available for download from [PyPI](https://pypi.python.org/pypi/pysnmp)
The PySNMP software is freely available for download from [PyPI](https://pypi.org/project/pysnmp/)
and [GitHub](https://github.com/etingof/pysnmp.git).
Just run:
@ -56,14 +56,15 @@ $ pip install pysnmp
to download and install PySNMP along with its dependencies:
* [PyASN1](http://snmplabs.com/pyasn1/)
* [PyCryptodomex](https://pycryptodome.readthedocs.io) (required only if SNMPv3 encryption is in use)
* [PySMI](http://snmplabs.com/pysmi/) (required for MIB services only)
* Optional [pysnmpcrypto](https://github.com/etingof/pysnmpcrypto) package
whenever strong SNMPv3 encryption is desired
Besides the library, command-line [SNMP utilities](https://github.com/etingof/pysnmp-apps)
Besides the library, command-line [SNMP utilities](https://github.com/etingof/snmpclitools)
written in pure-Python could be installed via:
```bash
$ pip install pysnmp-apps
$ pip install snmpclitools
```
and used in the very similar manner as conventional Net-SNMP tools:

View File

@ -30,5 +30,6 @@ Laurelin of Middle Earth
Robert Reese
Olivier Verriest
Eugene M. Kim
Matt Bullock
Thanks to Python Software Foundation for granting financial support
for the project.

View File

@ -1,3 +1,2 @@
sphinx
twisted
trollius; python_version < '3.0'
Sphinx <= 1.6; python_version < '2.7'
Sphinx > 1.6; python_version >= '2.7'

View File

@ -17,14 +17,14 @@ multilingual capabilities, remote configuration and other features.
PySNMP implementation closely follows intricate system details and features
bringing most possible power and flexibility to its users.
Current PySNMP stable version is 4.4. It runs with Python 2.4 through 3.6
Current PySNMP stable version is 4.4. It runs with Python 2.4 through 3.7
and is recommended for new applications as well as for migration from
older, now obsolete, PySNMP releases. All site documentation and
examples are written for the 4.4 and later versions in mind.
Older materials are still available under the obsolete section.
Besides the libraries, a set of pure-Python
`command-line tools <https://pypi.python.org/pypi/pysnmp-apps/>`_
`command-line tools <https://pypi.org/project/snmpclitools/>`_
are shipped along with the system. Those tools mimic the interface
and behaviour of popular Net-SNMP snmpget/snmpset/snmpwalk utilities.
They may be useful in a cross-platform situations as well as a testing

View File

@ -93,7 +93,7 @@ sponsoring it. Please get back to us to discuss details.
Contributions to the PySNMP source code is greatly appreciated as well.
We require contributed code to run with Python 2.4 through the latest
Python version (which is 3.6 at the time of this writing). Contributed
Python version (which is 3.7 at the time of this writing). Contributed
code will be redistributed under the terms of the same
`license <http://snmplabs.com/pysnmp/>`_ as PySNMP is.

View File

@ -3,44 +3,40 @@ Library reference
=================
.. toctree::
:maxdepth: 2
:maxdepth: 3
Dealing with many SNMP features may quickly overwhelm developers who aim at a
quick and trivial task, PySNMP employs a layered architecture approach
where the topmost programming API tries to be as simple as possible
to allow immediate solutions for most common use cases.
It will let you perform SNMP GET/SET/WALK and TRAP/INFORM operations by
pasting code snippets from PySNMP documentation and example scripts
right into your Python interactive session.
Most of SNMP operations involve packet exchange over network. PySNMP
is shipped with a set of bindings to popular asynchronous Python I/O
frameworks that let you run PySNMP in parallel with other tasks your
application may perform.
Synchronous SNMP
----------------
High-level, v3arch, sync
------------------------
Most simple and strightforward way to use PySNMP is by employing its
Synchronous, blocking API. It's also the default API offered by
users on *pysnmp.hlapi* sub-package import.
The synchronous `hlapi.v3arch` API is the easiest to use and probably
the richest in features. However `hlapi.v1arch` API may be faster.
Command Generator
.. toctree::
:maxdepth: 2
/docs/hlapi/asyncore/sync/manager/cmdgen/getcmd
/docs/hlapi/asyncore/sync/manager/cmdgen/setcmd
/docs/hlapi/asyncore/sync/manager/cmdgen/nextcmd
/docs/hlapi/asyncore/sync/manager/cmdgen/bulkcmd
/docs/hlapi/v3arch/asyncore/sync/manager/cmdgen/getcmd
/docs/hlapi/v3arch/asyncore/sync/manager/cmdgen/setcmd
/docs/hlapi/v3arch/asyncore/sync/manager/cmdgen/nextcmd
/docs/hlapi/v3arch/asyncore/sync/manager/cmdgen/bulkcmd
Notification Originator
.. toctree::
:maxdepth: 2
/docs/hlapi/asyncore/sync/agent/ntforg/notification
/docs/hlapi/v3arch/asyncore/sync/agent/ntforg/notification
Transport configuration
+++++++++++++++++++++++
@ -53,14 +49,14 @@ saves its configuration for the lifetime of SNMP engine object.
.. toctree::
:maxdepth: 2
.. autoclass:: pysnmp.hlapi.UdpTransportTarget
.. autoclass:: pysnmp.hlapi.v3arch.UdpTransportTarget
:members: setLocalAddress
.. autoclass:: pysnmp.hlapi.Udp6TransportTarget
.. autoclass:: pysnmp.hlapi.v3arch.Udp6TransportTarget
:members: setLocalAddress
Asynchronous: asyncore
----------------------
High-level v3arch asyncore
--------------------------
The :mod:`asyncore` module is in Python standard library since ancient
times. Main loop is built around :mod:`select` dispatcher, user
@ -71,17 +67,17 @@ Command Generator
.. toctree::
:maxdepth: 2
/docs/hlapi/asyncore/manager/cmdgen/getcmd
/docs/hlapi/asyncore/manager/cmdgen/setcmd
/docs/hlapi/asyncore/manager/cmdgen/nextcmd
/docs/hlapi/asyncore/manager/cmdgen/bulkcmd
/docs/hlapi/v3arch/asyncore/manager/cmdgen/getcmd
/docs/hlapi/v3arch/asyncore/manager/cmdgen/setcmd
/docs/hlapi/v3arch/asyncore/manager/cmdgen/nextcmd
/docs/hlapi/v3arch/asyncore/manager/cmdgen/bulkcmd
Notification Originator
.. toctree::
:maxdepth: 2
/docs/hlapi/asyncore/agent/ntforg/notification
/docs/hlapi/v3arch/asyncore/agent/ntforg/notification
Transport configuration
+++++++++++++++++++++++
@ -89,14 +85,14 @@ Transport configuration
.. toctree::
:maxdepth: 2
.. autoclass:: pysnmp.hlapi.asyncore.UdpTransportTarget
.. autoclass:: pysnmp.hlapi.v3arch.asyncore.UdpTransportTarget
:members: setLocalAddress
.. autoclass:: pysnmp.hlapi.asyncore.Udp6TransportTarget
.. autoclass:: pysnmp.hlapi.v3arch.asyncore.Udp6TransportTarget
:members: setLocalAddress
Asynchronous: asyncio
---------------------
High-level v3arch asyncio
-------------------------
The :mod:`asyncio` module first appeared in standard library since
Python 3.3 (in provisional basis). Its main design feature is that
@ -108,17 +104,17 @@ Command Generator
.. toctree::
:maxdepth: 2
/docs/hlapi/asyncio/manager/cmdgen/getcmd
/docs/hlapi/asyncio/manager/cmdgen/setcmd
/docs/hlapi/asyncio/manager/cmdgen/nextcmd
/docs/hlapi/asyncio/manager/cmdgen/bulkcmd
/docs/hlapi/v3arch/asyncio/manager/cmdgen/getcmd
/docs/hlapi/v3arch/asyncio/manager/cmdgen/setcmd
/docs/hlapi/v3arch/asyncio/manager/cmdgen/nextcmd
/docs/hlapi/v3arch/asyncio/manager/cmdgen/bulkcmd
Notification Originator
.. toctree::
:maxdepth: 2
/docs/hlapi/asyncio/agent/ntforg/notification
/docs/hlapi/v3arch/asyncio/agent/ntforg/notification
Transport configuration
+++++++++++++++++++++++
@ -126,14 +122,14 @@ Transport configuration
.. toctree::
:maxdepth: 2
.. autoclass:: pysnmp.hlapi.asyncio.UdpTransportTarget
.. autoclass:: pysnmp.hlapi.v3arch.asyncio.UdpTransportTarget
:members: setLocalAddress
.. autoclass:: pysnmp.hlapi.asyncio.Udp6TransportTarget
.. autoclass:: pysnmp.hlapi.v3arch.asyncio.Udp6TransportTarget
:members: setLocalAddress
Asynchronous: trollius
----------------------
High-level v3arch trollius
--------------------------
An almost compatible alternative to *asyncio* for pre-3.3 Python
is `Trollius <http://trollius.readthedocs.org>`_ module. PySNMP's
@ -142,8 +138,8 @@ is `Trollius <http://trollius.readthedocs.org>`_ module. PySNMP's
Please refer to :doc:`Trollius examples </examples/contents>` for
more information.
Asynchronous: Twisted
---------------------
High-level v3arch twisted
-------------------------
`Twisted <http://twistedmatrix.org>`_ is one of the earliest and hugely
popular asynchronous I/O framework. It introduced a concept of
@ -156,17 +152,17 @@ Command Generator
.. toctree::
:maxdepth: 2
/docs/hlapi/twisted/manager/cmdgen/getcmd
/docs/hlapi/twisted/manager/cmdgen/setcmd
/docs/hlapi/twisted/manager/cmdgen/nextcmd
/docs/hlapi/twisted/manager/cmdgen/bulkcmd
/docs/hlapi/v3arch/twisted/manager/cmdgen/getcmd
/docs/hlapi/v3arch/twisted/manager/cmdgen/setcmd
/docs/hlapi/v3arch/twisted/manager/cmdgen/nextcmd
/docs/hlapi/v3arch/twisted/manager/cmdgen/bulkcmd
Notification Originator
.. toctree::
:maxdepth: 2
/docs/hlapi/twisted/agent/ntforg/notification
/docs/hlapi/v3arch/twisted/agent/ntforg/notification
Transport configuration
+++++++++++++++++++++++
@ -174,23 +170,23 @@ Transport configuration
.. toctree::
:maxdepth: 2
.. autoclass:: pysnmp.hlapi.twisted.UdpTransportTarget
.. autoclass:: pysnmp.hlapi.v3arch.twisted.UdpTransportTarget
:members: setLocalAddress
SNMP Engine
-----------
High-level v3arch SNMP Engine
-----------------------------
SNMP Engine is a central, stateful object used by all SNMP v3
substsems. Calls to high-level Applications API also consume SNMP
subsystems. Calls to high-level Applications API also consume SNMP
Engine object on input.
.. toctree::
:maxdepth: 2
.. autoclass:: pysnmp.hlapi.SnmpEngine(snmpEngineID=None)
.. autoclass:: pysnmp.hlapi.v3arch.SnmpEngine(snmpEngineID=None)
Security Parameters
-------------------
High-level v3arch auth
----------------------
Calls to high-level Applications API consume Security Parameters
configuration object on input. The shortcut classes described in
@ -203,47 +199,53 @@ Community-based
+++++++++++++++
Security Parameters object is Security Model specific. The
:py:class:`~pysnmp.hlapi.CommunityData`
:py:class:`~pysnmp.hlapi.v3arch.CommunityData`
class is used for configuring Community-Based Security Model of SNMPv1/SNMPv2c.
.. toctree::
:maxdepth: 2
.. autoclass:: pysnmp.hlapi.CommunityData(communityIndex, communityName=None, mpModel=1, contextEngineId=None, contextName='', tag='')
.. autoclass:: pysnmp.hlapi.v3arch.CommunityData(communityIndex, communityName=None, mpModel=1, contextEngineId=None, contextName='', tag='')
User-based
++++++++++
The :py:class:`~pysnmp.hlapi.UsmUserData` class provides SNMPv3 User-Based
The :py:class:`~pysnmp.hlapi.v3arch.UsmUserData` class provides SNMPv3 User-Based
Security Model configuration for SNMP v3 systems.
.. autoclass:: pysnmp.hlapi.UsmUserData(userName, authKey=None, privKey=None, authProtocol=usmNoAuthProtocol, privProtocol=usmNoPrivProtocol, securityEngineId=None)
.. autoclass:: pysnmp.hlapi.v3arch.UsmUserData(userName, authKey=None, privKey=None, authProtocol=usmNoAuthProtocol, privProtocol=usmNoPrivProtocol, securityEngineId=None)
Identification of Authentication and Privacy Protocols is done
via constant OIDs:
**Authentication protocol identifiers**
.. autodata:: pysnmp.hlapi.usmNoAuthProtocol
.. autodata:: pysnmp.hlapi.usmHMACMD5AuthProtocol
.. autodata:: pysnmp.hlapi.usmHMACSHAAuthProtocol
.. autodata:: pysnmp.hlapi.usmHMAC128SHA224AuthProtocol
.. autodata:: pysnmp.hlapi.usmHMAC192SHA256AuthProtocol
.. autodata:: pysnmp.hlapi.usmHMAC256SHA384AuthProtocol
.. autodata:: pysnmp.hlapi.usmHMAC384SHA512AuthProtocol
.. autodata:: pysnmp.hlapi.v3arch.usmNoAuthProtocol
.. autodata:: pysnmp.hlapi.v3arch.usmHMACMD5AuthProtocol
.. autodata:: pysnmp.hlapi.v3arch.usmHMACSHAAuthProtocol
.. autodata:: pysnmp.hlapi.v3arch.usmHMAC128SHA224AuthProtocol
.. autodata:: pysnmp.hlapi.v3arch.usmHMAC192SHA256AuthProtocol
.. autodata:: pysnmp.hlapi.v3arch.usmHMAC256SHA384AuthProtocol
.. autodata:: pysnmp.hlapi.v3arch.usmHMAC384SHA512AuthProtocol
.. autodata:: pysnmp.hlapi.usmNoPrivProtocol
.. autodata:: pysnmp.hlapi.usmDESPrivProtocol
.. autodata:: pysnmp.hlapi.usm3DESEDEPrivProtocol
.. autodata:: pysnmp.hlapi.usmAesCfb128Protocol
.. autodata:: pysnmp.hlapi.usmAesCfb192Protocol
.. autodata:: pysnmp.hlapi.usmAesCfb256Protocol
.. autodata:: pysnmp.hlapi.usmAesBlumenthalCfb192Protocol
.. autodata:: pysnmp.hlapi.usmAesBlumenthalCfb256Protocol
**Privacy (encryption) protocol identifiers**
.. autodata:: pysnmp.hlapi.v3arch.usmNoPrivProtocol
.. autodata:: pysnmp.hlapi.v3arch.usmDESPrivProtocol
.. autodata:: pysnmp.hlapi.v3arch.usm3DESEDEPrivProtocol
.. autodata:: pysnmp.hlapi.v3arch.usmAesCfb128Protocol
.. autodata:: pysnmp.hlapi.v3arch.usmAesCfb192Protocol
.. autodata:: pysnmp.hlapi.v3arch.usmAesCfb256Protocol
.. autodata:: pysnmp.hlapi.v3arch.usmAesBlumenthalCfb192Protocol
.. autodata:: pysnmp.hlapi.v3arch.usmAesBlumenthalCfb256Protocol
.. note::
SNMP authentication and encryption keys must be at least *eight*
octets long.
Transport configuration is I/O framework specific and is described in
respective sections.
SNMP Context
------------
High-level v3arch SNMP Context
------------------------------
SNMP engine may serve several instances of the same MIB within
possibly multiple SNMP entities. SNMP context is a tool for
@ -267,12 +269,117 @@ SNMP engine. See :RFC:`3411#section-3.3.1` for details.
The SNMP context information necessary for this mapping procedure
to operate is supplied through the
:py:class:`~pysnmp.hlapi.CommunityData` object.
:py:class:`~pysnmp.hlapi.v3arch.CommunityData` object.
.. toctree::
:maxdepth: 2
.. autoclass:: pysnmp.hlapi.ContextData
.. autoclass:: pysnmp.hlapi.v3arch.ContextData
High-level v1arch sync
----------------------
The synchronous `hlapi.v1arch` API is probably the easiest to use and fast to run,
however it does not support SNMPv3.
Command Generator
.. toctree::
:maxdepth: 2
/docs/hlapi/v1arch/asyncore/sync/manager/cmdgen/getcmd
/docs/hlapi/v1arch/asyncore/sync/manager/cmdgen/setcmd
/docs/hlapi/v1arch/asyncore/sync/manager/cmdgen/nextcmd
/docs/hlapi/v1arch/asyncore/sync/manager/cmdgen/bulkcmd
Notification Originator
.. toctree::
:maxdepth: 2
/docs/hlapi/v1arch/asyncore/sync/agent/ntforg/notification
Transport configuration
+++++++++++++++++++++++
The following shortcut classes convey configuration information to
SNMP engine's Local Configuration Datastore (:RFC:`2271#section-3.4.2`)
as well as to underlying socket API. Once committed to LCD, SNMP engine
saves its configuration for the lifetime of SNMP engine object.
.. toctree::
:maxdepth: 2
.. autoclass:: pysnmp.hlapi.v1arch.UdpTransportTarget
:members: setLocalAddress
.. autoclass:: pysnmp.hlapi.v1arch.Udp6TransportTarget
:members: setLocalAddress
High-level v1arch asyncore
--------------------------
The :mod:`asyncore` module is in Python standard library since ancient
times. Main loop is built around :mod:`select` dispatcher, user
code is invoked through callback callables.
Command Generator
.. toctree::
:maxdepth: 2
/docs/hlapi/v1arch/asyncore/manager/cmdgen/getcmd
/docs/hlapi/v1arch/asyncore/manager/cmdgen/setcmd
/docs/hlapi/v1arch/asyncore/manager/cmdgen/nextcmd
/docs/hlapi/v1arch/asyncore/manager/cmdgen/bulkcmd
Notification Originator
.. toctree::
:maxdepth: 2
/docs/hlapi/v1arch/asyncore/agent/ntforg/notification
Transport configuration
+++++++++++++++++++++++
.. toctree::
:maxdepth: 2
.. autoclass:: pysnmp.hlapi.v1arch.asyncore.UdpTransportTarget
:members: setLocalAddress
.. autoclass:: pysnmp.hlapi.v1arch.asyncore.Udp6TransportTarget
:members: setLocalAddress
High-level v1arch SNMP Dispatcher
---------------------------------
SNMP Dispatcher is a stateful object representing asynchronous
I/O event loop and also holding some caches. Calls to `v1arch`
always require consume SNMP Dispatcher object on input.
.. toctree::
:maxdepth: 2
.. autoclass:: pysnmp.hlapi.v1arch.SnmpDispatcher()
High-level v1arch auth
----------------------
Calls to `v1arch` API require SNMP authentication object on input.
Community-based
+++++++++++++++
Security Parameters object is Security Model specific. The
:py:class:`~pysnmp.hlapi.v1arch.CommunityData`
class is used for configuring Community-Based Security Model of SNMPv1/SNMPv2c.
.. toctree::
:maxdepth: 2
.. autoclass:: pysnmp.hlapi.v1arch.CommunityData(communityName, mpModel=1)
.. _mib-services:
@ -334,6 +441,20 @@ data description language. PySNMP types are derived from
.. toctree::
:maxdepth: 2
.. _null:
Null type
+++++++++
.. autoclass:: pysnmp.proto.rfc1902.Null(initializer)
:members:
.. note::
The `NULL` type actually belongs to the base ASN.1 types. It is not defined
in :RFC:`1902#section-2` as an SNMP type. The `Null` type is exposed through
`rfc1902` module just for convenience.
.. _integer32:
Integer32 type

View File

@ -0,0 +1,8 @@
TRAP/INFORM notification
========================
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.v1arch.asyncore.sendNotification

View File

@ -0,0 +1,8 @@
GETBULK command
===============
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.v1arch.asyncore.bulkCmd

View File

@ -0,0 +1,8 @@
GET command
===========
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.v1arch.asyncore.getCmd

View File

@ -0,0 +1,8 @@
GETNEXT command
===============
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.v1arch.asyncore.nextCmd

View File

@ -0,0 +1,8 @@
SET command
===========
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.v1arch.asyncore.setCmd

View File

@ -5,4 +5,4 @@ TRAP/INFORM notification
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.asyncio.sendNotification
.. autofunction:: pysnmp.hlapi.v1arch.sendNotification

View File

@ -5,4 +5,4 @@ GETBULK command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.twisted.bulkCmd
.. autofunction:: pysnmp.hlapi.v1arch.bulkCmd

View File

@ -5,4 +5,4 @@ GET command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.twisted.getCmd
.. autofunction:: pysnmp.hlapi.v1arch.getCmd

View File

@ -5,4 +5,4 @@ GETNEXT command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.asyncio.nextCmd
.. autofunction:: pysnmp.hlapi.v1arch.nextCmd

View File

@ -5,4 +5,4 @@ SET command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.twisted.setCmd
.. autofunction:: pysnmp.hlapi.v1arch.setCmd

View File

@ -5,4 +5,4 @@ TRAP/INFORM notification
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.asyncore.sendNotification
.. autofunction:: pysnmp.hlapi.v3arch.asyncio.sendNotification

View File

@ -5,4 +5,4 @@ GETBULK command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.asyncore.bulkCmd
.. autofunction:: pysnmp.hlapi.v3arch.asyncio.bulkCmd

View File

@ -5,4 +5,4 @@ GET command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.asyncore.getCmd
.. autofunction:: pysnmp.hlapi.v3arch.asyncio.getCmd

View File

@ -5,4 +5,4 @@ GETNEXT command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.twisted.nextCmd
.. autofunction:: pysnmp.hlapi.v3arch.asyncio.nextCmd

View File

@ -5,4 +5,4 @@ SET command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.asyncio.setCmd
.. autofunction:: pysnmp.hlapi.v3arch.asyncio.setCmd

View File

@ -0,0 +1,8 @@
TRAP/INFORM notification
========================
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.v3arch.asyncore.sendNotification

View File

@ -0,0 +1,8 @@
GETBULK command
===============
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.v3arch.asyncore.bulkCmd

View File

@ -0,0 +1,8 @@
GET command
===========
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.v3arch.asyncore.getCmd

View File

@ -0,0 +1,8 @@
GETNEXT command
===============
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.v3arch.asyncore.nextCmd

View File

@ -0,0 +1,8 @@
SET command
===========
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.v3arch.asyncore.setCmd

View File

@ -5,4 +5,4 @@ TRAP/INFORM notification
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.twisted.sendNotification
.. autofunction:: pysnmp.hlapi.v3arch.twisted.sendNotification

View File

@ -5,4 +5,4 @@ GETBULK command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.asyncio.bulkCmd
.. autofunction:: pysnmp.hlapi.v3arch.twisted.bulkCmd

View File

@ -5,4 +5,4 @@ GET command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.asyncio.getCmd
.. autofunction:: pysnmp.hlapi.v3arch.twisted.getCmd

View File

@ -5,4 +5,4 @@ GETNEXT command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.asyncore.nextCmd
.. autofunction:: pysnmp.hlapi.v3arch.twisted.nextCmd

View File

@ -5,4 +5,4 @@ SET command
.. toctree::
:maxdepth: 2
.. autofunction:: pysnmp.hlapi.asyncore.setCmd
.. autofunction:: pysnmp.hlapi.v3arch.twisted.setCmd

View File

@ -9,7 +9,7 @@ We can look at PySNMP's internal structure from the view point of
SNMP protocol evolution. SNMP was evolving for many years from
a relatively simple way to structure and retrieve data (SNMPv1/v2c)
all the way to extensible and modularized framework that supports
strong crypto out-of-the-box (SNMPv3).
strong SNMPv3 crypto (with optional pysnmpcrypto package).
In the order from most ancient SNMP services to the most current ones,
what follows are different layers of PySNMP APIs:

View File

@ -126,7 +126,7 @@ objects representing completely different instances of hardware
or software being managed. This is where SNMP context could
be used.
To indicate SNMP context at high-level API a preperly initialized
To indicate SNMP context at high-level API a properly initialized
:py:class:`~pysnmp.hlapi.ContextData` object should be used.
For this example we will use the 'empty' context (default).
@ -242,7 +242,7 @@ in `SNMPv2-MIB <http://mibs.snmplabs.com/asn1/SNMPv2-MIB>`_ module.
By default PySNMP will search your local filesystem for ASN.1 MIB files
you refer to. It can also be configured to automatically download
them from remote hosts, as
:doc:`shown </examples/hlapi/asyncore/sync/manager/cmdgen/mib-tweaks>`
:doc:`shown </examples/hlapi/v3arch/asyncore/sync/manager/cmdgen/mib-tweaks>`
in the examples. We maintain a
`collection <http://mibs.snmplabs.com/asn1/>`_ of ASN.1 MIB modules
that you can use in your SNMP projects.

View File

@ -227,7 +227,7 @@ engine loads those modules at runtime on demand. PySNMP MIB modules
are universal -- the same module can be consumed by both managed and
managing entities.
MIB convertion is performed automatically by PySNMP, but technically,
MIB conversion is performed automatically by PySNMP, but technically,
it is handled by PySNMP sister project called
`PySMI <http://snmplabs.com/pysmi/>`_. However you can also perform said
conversion by hand with PySMI's *mibdump.py* tool.

View File

@ -1,6 +1,6 @@
Documentation
=============
Overview
========
.. toctree::
:maxdepth: 2

View File

@ -6,7 +6,7 @@ Download PySNMP
The PySNMP software is provided under terms and conditions of BSD-style
license, and can be freely downloaded from
`PyPI <http://pypi.python.org/pypi/pysnmp/>`_ or
`PyPI <https://pypi.org/project/pysnmp/>`_ or
GitHub (`master branch <https://github.com/etingof/pysnmp/archive/master.zip>`_).
@ -30,7 +30,7 @@ or
In case you do not have the easy_install command on your system but still
would like to use the on-line package installation method, please install
`setuptools <http://pypi.python.org/pypi/setuptools>`_ package by
`setuptools <https://pypi.org/project/setuptools/>`_ package by
downloading and running `ez_setup.pz <https://bootstrap.pypa.io/ez_setup.py>`_ bootstrap:
.. code-block:: bash
@ -42,19 +42,17 @@ In case you are installing PySNMP on an off-line system, the following
packages need to be downloaded and installed for PySNMP to become
operational:
* `PyASN1 <https://pypi.python.org/pypi/pyasn1>`_,
used for handling ASN.1 objects
* `PySNMP <https://pypi.python.org/pypi/pysnmp/>`_,
* `pysnmp <https://pypi.org/project/pysnmp/>`_,
SNMP engine implementation
Optional, but recommended:
* `PyCryptodomex <https://pypi.python.org/pypi/pycryptodomex/>`_,
used by SNMPv3 crypto features
* `PySMI <https://pypi.python.org/pypi/pysmi/>`_ for automatic
* `pyasn1 <https://pypi.org/project/pyasn1/>`_,
used for handling ASN.1 objects
* `pysmi <https://pypi.org/project/pysmi/>`_ for automatic
MIB download and compilation. That helps visualizing more SNMP objects
* `Ply <https://pypi.python.org/pypi/ply/>`_, parser generator
required by PySMI
Optional:
* `pysnmpcrypto <https://pypi.org/project/pysnmpcrypto/>`_,
for strong SNMPv3 crypto support
The installation procedure for all the above packages is as follows
(on UNIX-based systems):

View File

@ -9,51 +9,82 @@ SNMP is not simple (PySNMP implementation takes over 15K lines of
Python code), but PySNMP tries to hide the complexities and let you
carry out typical SNMP operations in a quick and intuitive way.
PySNMP offers three groups of programming interfaces to deal with
SNMP protocol. In the order from most concise to most detailed those
APIs follow.
PySNMP offers high and low-level programming interfaces to deal with
SNMP protocol.
The other dimension of differences in the PySNMP APIs is that there are
two different SNMP implementations - the initial architecture
(`RFC1901 <https://tools.ietf.org/html/rfc1901>`_ ..
`RFC1905 <https://tools.ietf.org/html/rfc1905>`_) also known as SNMP v1 architecture
and the redesigned variant (`RFC3413 <https://tools.ietf.org/html/rfc3413>`_
and others) -- SNMPv3 architecture.
.. note::
The SNMP v1 architecture supports SNMP protocol versions 1 and 2c,
while SNMP v3 architecture supports versions 1, 2c and 3. Whatever
new amendments to the SNMP protocol may come up in the future, they
will be implemented within the v3 model.
High-level SNMP
---------------
The so called high-level API (hlapi) is designed to be simple, concise and
suitable for the most frequent operations. For that matter only
Command Generator and Notification Originator Applications are currently
The high-level API (`hlapi`) is designed to be simple, concise and
suitable for the most typical client-side operations. For that matter,
only Command Generator and Notification Originator Applications are
wrapped into a nearly one-line Python expression.
It comes in several flavours: one synchronous and a bunch of bindings to
popular asynchronous I/O frameworks. Those varieties of APIs bring
subtile differences, mostly to better match particular I/O framework
customs. Unless you have a very specific task, the high-level API might
solve your SNMP needs.
The `hlapi` interfaces come in several flavours: one synchronous
and a bunch of asynchronous, adapted to work withing the event loops
of popular asynchronous I/O frameworks.
The primary reason for maintaining high-level API over both `v1arch` and
`v3arch` is performance - `v3arch` machinery is much more functional and complicated
internally, that translates to being heavier on resources and therefore slower.
The v3 architecture
+++++++++++++++++++
.. toctree::
:maxdepth: 2
/examples/hlapi/asyncore/sync/contents
/examples/hlapi/v3arch/asyncore/sync/contents
.. toctree::
:maxdepth: 2
/examples/hlapi/asyncore/contents
/examples/hlapi/v3arch/asyncore/contents
.. toctree::
:maxdepth: 2
/examples/hlapi/asyncio/contents
/examples/hlapi/v3arch/asyncio/contents
.. toctree::
:maxdepth: 2
/examples/hlapi/trollius/contents
/examples/hlapi/v3arch/trollius/contents
.. toctree::
:maxdepth: 2
/examples/hlapi/twisted/contents
/examples/hlapi/v3arch/twisted/contents
Native SNMP API
---------------
The v1 architecture
+++++++++++++++++++
.. toctree::
:maxdepth: 2
/examples/hlapi/v1arch/asyncore/sync/contents
.. toctree::
:maxdepth: 2
/examples/hlapi/v1arch/asyncore/contents
Low-level v3 architecture
-------------------------
Complete implementation of all official Standard SNMP Applications. It
should let you implement any SNMP operation defined in the standard
@ -70,8 +101,8 @@ framework being used.
/examples/v3arch/trollius/contents
/examples/v3arch/twisted/contents
Packet-level SNMP
-----------------
Low-level v1 architecture
-------------------------
In cases where performance is your top priority and you only need to
work with SNMP v1 and v2c systems and you do not mind writing much
@ -116,15 +147,14 @@ Notification Receiver
/examples/v1arch/asyncore/manager/ntfrcv/transport-tweaks
Low-level MIB access
--------------------
Low-level SMI/MIB
-----------------
.. toctree::
/examples/smi/manager/browsing-mib-tree
/examples/smi/agent/implementing-mib-objects
Using these examples
--------------------

View File

@ -1,17 +0,0 @@
.. toctree::
:maxdepth: 2
Advanced Notification Originator
--------------------------------
.. include:: /../../examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncio/agent/ntforg/multiple-notifications-at-once.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,17 +0,0 @@
.. toctree::
:maxdepth: 2
Common notifications
--------------------
.. include:: /../../examples/hlapi/asyncio/agent/ntforg/default-v1-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncio/agent/ntforg/default-v1-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncio/agent/ntforg/default-v1-trap.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,29 +0,0 @@
.. toctree::
:maxdepth: 2
Advanced Command Generator
--------------------------
.. include:: /../../examples/hlapi/asyncio/manager/cmdgen/multiple-concurrent-queries-over-ipv4-and-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncio/manager/cmdgen/multiple-concurrent-queries-over-ipv4-and-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncio/manager/cmdgen/multiple-concurrent-queries-over-ipv4-and-ipv6.py>` script.
.. include:: /../../examples/hlapi/asyncio/manager/cmdgen/multiple-sequential-queries.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncio/manager/cmdgen/multiple-sequential-queries.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncio/manager/cmdgen/multiple-sequential-queries.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,29 +0,0 @@
.. toctree::
:maxdepth: 2
Various SNMP versions
----------------------
.. include:: /../../examples/hlapi/asyncio/manager/cmdgen/v1-get.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncio/manager/cmdgen/v1-get.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncio/manager/cmdgen/v1-get.py>` script.
.. include:: /../../examples/hlapi/asyncio/manager/cmdgen/getbulk-to-eom.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncio/manager/cmdgen/getbulk-to-eom.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncio/manager/cmdgen/getbulk-to-eom.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,17 +0,0 @@
.. toctree::
:maxdepth: 2
Walking operations
------------------
.. include:: /../../examples/hlapi/asyncio/manager/cmdgen/getbulk-to-eom.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncio/manager/cmdgen/getbulk-to-eom.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncio/manager/cmdgen/getbulk-to-eom.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,40 +0,0 @@
.. toctree::
:maxdepth: 2
Advanced Notification Originator
--------------------------------
.. include:: /../../examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py>` script.
.. include:: /../../examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py>` script.
.. include:: /../../examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,17 +0,0 @@
.. toctree::
:maxdepth: 2
Common notifications
--------------------
.. include:: /../../examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,40 +0,0 @@
.. toctree::
:maxdepth: 2
Advanced Command Generator
--------------------------
.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/pull-mibs-from-multiple-agents-at-once-over-ipv4-and-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/pull-mibs-from-multiple-agents-at-once-over-ipv4-and-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/pull-mibs-from-multiple-agents-at-once-over-ipv4-and-ipv6.py>` script.
.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/query-multiple-snmp-engines-over-ipv4-and-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/query-multiple-snmp-engines-over-ipv4-and-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/query-multiple-snmp-engines-over-ipv4-and-ipv6.py>` script.
.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-queries-over-ipv4-and-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-queries-over-ipv4-and-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-queries-over-ipv4-and-ipv6.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,29 +0,0 @@
.. toctree::
:maxdepth: 2
Various SNMP versions
----------------------
.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/v2c-get.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/v2c-get.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/v2c-get.py>` script.
.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/pull-whole-mib.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/pull-whole-mib.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/pull-whole-mib.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,18 +0,0 @@
.. toctree::
:maxdepth: 2
Walking operations
------------------
.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/pull-whole-mib.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/pull-whole-mib.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/pull-whole-mib.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,28 +0,0 @@
.. toctree::
:maxdepth: 2
Advanced Notification Originator
--------------------------------
.. include:: /../../examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,49 +0,0 @@
.. toctree::
:maxdepth: 2
Common notifications
--------------------
.. include:: /../../examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,29 +0,0 @@
.. toctree::
:maxdepth: 2
Evaluating NOTIFICATION-TYPE
----------------------------
.. include:: /../../examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,29 +0,0 @@
.. toctree::
:maxdepth: 2
SNMPv1 TRAP variants
--------------------
.. include:: /../../examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,84 +0,0 @@
.. toctree::
:maxdepth: 2
Advanced Command Generator
--------------------------
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/multiple-get-calls.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/multiple-get-calls.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/multiple-get-calls.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-v3-security-name.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-v3-security-name.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-v3-security-name.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/specific-v3-engine-id.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/specific-v3-engine-id.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/specific-v3-engine-id.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads-over-ipv4-and-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads-over-ipv4-and-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads-over-ipv4-and-ipv6.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,48 +0,0 @@
.. toctree::
:maxdepth: 2
MIB tweaks
----------
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/waive-mib-lookup.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/waive-mib-lookup.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/waive-mib-lookup.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,30 +0,0 @@
.. toctree::
:maxdepth: 2
Modifying variables
-------------------
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py>` script.
See also: :doc:`library-reference </docs/api-reference>`.

View File

@ -1,72 +0,0 @@
.. toctree::
:maxdepth: 2
SNMP versions
-------------
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/v1-get.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/v1-get.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/v1-get.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/v2c-get.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/v2c-get.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/v2c-get.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-des.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-des.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-des.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-none.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-none.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-none.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-none-none.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-none-none.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-none-none.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-sha-aes128.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-sha-aes128.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/usm-sha-aes128.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,29 +0,0 @@
.. toctree::
:maxdepth: 2
Transport tweaks
----------------
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py>` script.
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,18 +0,0 @@
.. toctree::
:maxdepth: 2
Walking operations
------------------
.. include:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/pull-whole-mib.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/asyncore/sync/manager/cmdgen/pull-whole-mib.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/asyncore/sync/manager/cmdgen/pull-whole-mib.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,17 +0,0 @@
.. toctree::
:maxdepth: 2
Common notifications
--------------------
.. include:: /../../examples/hlapi/trollius/agent/ntforg/default-v1-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/trollius/agent/ntforg/default-v1-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/trollius/agent/ntforg/default-v1-trap.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,29 +0,0 @@
.. toctree::
:maxdepth: 2
Various SNMP versions
----------------------
.. include:: /../../examples/hlapi/trollius/manager/cmdgen/v1-get.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/trollius/manager/cmdgen/v1-get.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/trollius/manager/cmdgen/v1-get.py>` script.
.. include:: /../../examples/hlapi/trollius/manager/cmdgen/getbulk-to-eom.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/trollius/manager/cmdgen/getbulk-to-eom.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/trollius/manager/cmdgen/getbulk-to-eom.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,17 +0,0 @@
.. toctree::
:maxdepth: 2
Walking operations
------------------
.. include:: /../../examples/hlapi/trollius/manager/cmdgen/getbulk-to-eom.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/trollius/manager/cmdgen/getbulk-to-eom.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/trollius/manager/cmdgen/getbulk-to-eom.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,17 +0,0 @@
.. toctree::
:maxdepth: 2
Advanced Notification Originator
--------------------------------
.. include:: /../../examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/twisted/agent/ntforg/multiple-notifications-at-once.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,27 +0,0 @@
.. toctree::
:maxdepth: 2
Common notifications
--------------------
.. include:: /../../examples/hlapi/twisted/agent/ntforg/default-v1-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/twisted/agent/ntforg/default-v1-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/twisted/agent/ntforg/default-v1-trap.py>` script.
.. include:: /../../examples/hlapi/twisted/agent/ntforg/v2c-trap-inline-callbacks.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/twisted/agent/ntforg/v2c-trap-inline-callbacks.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/twisted/agent/ntforg/v2c-trap-inline-callbacks.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,29 +0,0 @@
.. toctree::
:maxdepth: 2
Advanced Command Generator
--------------------------
.. include:: /../../examples/hlapi/twisted/manager/cmdgen/multiple-concurrent-queries.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/twisted/manager/cmdgen/multiple-concurrent-queries.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/twisted/manager/cmdgen/multiple-concurrent-queries.py>` script.
.. include:: /../../examples/hlapi/twisted/manager/cmdgen/pull-mibs-from-multiple-agents-at-once.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/twisted/manager/cmdgen/pull-mibs-from-multiple-agents-at-once.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/twisted/manager/cmdgen/pull-mibs-from-multiple-agents-at-once.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,29 +0,0 @@
.. toctree::
:maxdepth: 2
Various SNMP versions
----------------------
.. include:: /../../examples/hlapi/twisted/manager/cmdgen/v1-get.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/twisted/manager/cmdgen/v1-get.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/twisted/manager/cmdgen/v1-get.py>` script.
.. include:: /../../examples/hlapi/twisted/manager/cmdgen/getbulk-to-eom.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/twisted/manager/cmdgen/getbulk-to-eom.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/twisted/manager/cmdgen/getbulk-to-eom.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,17 +0,0 @@
.. toctree::
:maxdepth: 2
Transport tweaks
----------------
.. include:: /../../examples/hlapi/twisted/manager/cmdgen/custom-timeout-and-retries.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/twisted/manager/cmdgen/custom-timeout-and-retries.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/twisted/manager/cmdgen/custom-timeout-and-retries.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -1,27 +0,0 @@
.. toctree::
:maxdepth: 2
Walking operations
------------------
.. include:: /../../examples/hlapi/twisted/manager/cmdgen/getbulk-to-eom.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/twisted/manager/cmdgen/getbulk-to-eom.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/twisted/manager/cmdgen/getbulk-to-eom.py>` script.
.. include:: /../../examples/hlapi/twisted/manager/cmdgen/pull-whole-mib.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/twisted/manager/cmdgen/pull-whole-mib.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/twisted/manager/cmdgen/pull-whole-mib.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,7 @@
.. toctree::
:maxdepth: 2
Advanced Notification Originator
--------------------------------
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,49 @@
.. toctree::
:maxdepth: 2
Common notifications
--------------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-inform.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-inform.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-inform.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v1-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v1-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v1-trap.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v2c-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v2c-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v2c-trap.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,18 @@
.. toctree::
:maxdepth: 2
Evaluating NOTIFICATION-TYPE
----------------------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,60 @@
Asynchronous SNMP (asyncore, v1arch)
====================================
Applications build around :mod:`asyncore` get CPU time on :mod:`socket`
events being watched for by :mod:`select` dispatcher. User code
lives mostly in isolated functions (or any callable objects).
As it is with any asynchronous I/O system, `asyncore` lets you run
many SNMP queries in parallel and/or sequentially, interleave SNMP
queries with other I/O operations for as long as they are managed
within the same event loop.
The :mod:`pysnmp.hlapi.v1arch.asyncore` package implements `asyncore`
binding to pysnmp's `v1arch` services.
In most examples approximate analogues of well known Net-SNMP snmp* tools
command line options are shown. That may help those readers who, by chance
are familiar with Net-SNMP tools, better understanding what example code doe
Here's a quick example on a simple SNMP GET by high-level API:
.. include:: /../../examples/hlapi/v1arch/asyncore/manager/cmdgen/v2c-get.py
:start-after: options:
:end-before: Functionally
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/manager/cmdgen/v2c-get.py
:start-after: """#
:language: python
.. toctree::
/examples/hlapi/v1arch/asyncore/manager/cmdgen/snmp-versions
/examples/hlapi/v1arch/asyncore/manager/cmdgen/modifying-variables
/examples/hlapi/v1arch/asyncore/manager/cmdgen/walking-operations
/examples/hlapi/v1arch/asyncore/manager/cmdgen/table-operations
/examples/hlapi/v1arch/asyncore/manager/cmdgen/mib-tweaks
/examples/hlapi/v1arch/asyncore/manager/cmdgen/transport-tweaks
/examples/hlapi/v1arch/asyncore/manager/cmdgen/advanced-topics
The following code sends SNMP TRAP:
.. include:: /../../examples/hlapi/v1arch/asyncore/agent/ntforg/generic-v1-trap.py
:start-after: options:
:end-before: Functionally
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/agent/ntforg/generic-v1-trap.py
:start-after: """#
:language: python
More examples on Notification Originator API usage follow.
.. toctree::
/examples/hlapi/v1arch/asyncore/agent/ntforg/common-notifications
/examples/hlapi/v1arch/asyncore/agent/ntforg/evaluating-notification-type
/examples/hlapi/v1arch/asyncore/agent/ntforg/advanced-topics
More sophisticated SNMP operations can still be performed with
PySNMP via its Native API to Standard SNMP Applications.

View File

@ -0,0 +1,39 @@
.. toctree::
:maxdepth: 2
Advanced Command Generator
--------------------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/multiple-get-calls.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/multiple-get-calls.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/multiple-get-calls.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads-over-ipv4-and-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads-over-ipv4-and-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads-over-ipv4-and-ipv6.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,48 @@
.. toctree::
:maxdepth: 2
MIB tweaks
----------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/enable-mib-lookup.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/enable-mib-lookup.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/enable-mib-lookup.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,30 @@
.. toctree::
:maxdepth: 2
Modifying variables
-------------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py>` script.
See also: :doc:`library-reference </docs/api-reference>`.

View File

@ -0,0 +1,30 @@
.. toctree::
:maxdepth: 2
Various SNMP versions
----------------------
.. include:: /../../examples/hlapi/v1arch/asyncore/manager/cmdgen/v2c-get.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/manager/cmdgen/v2c-get.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/manager/cmdgen/v2c-get.py>` script.
.. comment
.. include:: /../../examples/hlapi/v1arch/asyncore/manager/cmdgen/pull-whole-mib.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/manager/cmdgen/pull-whole-mib.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/manager/cmdgen/pull-whole-mib.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,50 @@
.. toctree::
:maxdepth: 2
Table operations
----------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-index.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-index.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-index.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-multiple-indices.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-multiple-indices.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-multiple-indices.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-snmp-table.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-snmp-table.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-snmp-table.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,29 @@
.. toctree::
:maxdepth: 2
Transport tweaks
----------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,18 @@
.. toctree::
:maxdepth: 2
Walking operations
------------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,59 @@
.. toctree::
:maxdepth: 2
Common notifications
--------------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v1-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v1-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v1-trap.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v2c-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v2c-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v2c-trap.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-inform.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-inform.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-inform.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v1-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v1-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v1-trap.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,17 @@
.. toctree::
:maxdepth: 2
Evaluating NOTIFICATION-TYPE
----------------------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/v2c-trap-with-notification-objects.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,74 @@
Synchronous SNMP (v1arch)
=========================
This chapter illustrates various uses of the synchronous high-level
programming interface to client-side SNMP entities along the lines
of `RFC1905 <https://tools.ietf.org/html/rfc1905>`_.
.. note:: The following examples involve creating Python iterator,
the next() call is used to invoke iterator just once.
In most examples approximate analogues of well known Net-SNMP snmp* tools
command line options are shown. That may help those readers who, by chance
are familiar with Net-SNMP tools, better understanding what the example
code does.
Here's a quick example on a simple SNMP GET by high-level API:
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/v1-get.py
:start-after: options:
:end-before: Functionally
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/v1-get.py
:start-after: """#
:language: python
.. note::
If MIB lookup is required (e.g. when :py:class:`~pysnmp.smi.rfc1902.ObjectIdentity`,
:py:class:`~pysnmp.smi.rfc1902.ObjectType` or :py:class:`~pysnmp.smi.rfc1902.NotificationType`
objects being used), the `lookupMib=True` should also be passed.
The following code performs a series of SNMP GETNEXT operations
fetching a table of SNMP variables from SNMP Agent:
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py
:start-after: options:
:end-before: Functionally
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py
:start-after: """#
:language: python
More examples on Command Generator API usage follow.
.. toctree::
/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/snmp-versions
/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/modifying-variables
/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/walking-operations
/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/table-operations
/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/mib-tweaks
/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/transport-tweaks
/examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/advanced-topics
The following code sends SNMP TRAP:
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v2c-trap.py
:start-after: options:
:end-before: Functionally
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/agent/ntforg/generic-v2c-trap.py
:start-after: """#
:language: python
More examples on Notification Originator API usage follow.
.. toctree::
/examples/hlapi/v1arch/asyncore/sync/agent/ntforg/common-notifications
/examples/hlapi/v1arch/asyncore/sync/agent/ntforg/evaluating-notification-type
More specific SNMP operations can still be performed with PySNMP via
its Native API to Standard SNMP Applications.

View File

@ -0,0 +1,39 @@
.. toctree::
:maxdepth: 2
Advanced Command Generator
--------------------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/multiple-get-calls.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/multiple-get-calls.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/multiple-get-calls.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads-over-ipv4-and-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads-over-ipv4-and-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads-over-ipv4-and-ipv6.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,48 @@
.. toctree::
:maxdepth: 2
MIB tweaks
----------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/enable-mib-lookup.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/enable-mib-lookup.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/enable-mib-lookup.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,30 @@
.. toctree::
:maxdepth: 2
Modifying variables
-------------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py>` script.
See also: :doc:`library-reference </docs/api-reference>`.

View File

@ -0,0 +1,29 @@
.. toctree::
:maxdepth: 2
SNMP versions
-------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/v1-get.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/v1-get.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/v1-get.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/v2c-get.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/v2c-get.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/v2c-get.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,50 @@
.. toctree::
:maxdepth: 2
Table operations
----------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-index.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-index.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-index.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-multiple-indices.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-multiple-indices.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/get-table-object-by-multiple-indices.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables-over-ipv6.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-snmp-table.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-snmp-table.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-snmp-table.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,29 @@
.. toctree::
:maxdepth: 2
Transport tweaks
----------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py>` script.
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,18 @@
.. toctree::
:maxdepth: 2
Walking operations
------------------
.. include:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v1arch/asyncore/sync/manager/cmdgen/pull-whole-mib.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,17 @@
.. toctree::
:maxdepth: 2
Advanced Notification Originator
--------------------------------
.. include:: /../../examples/hlapi/v3arch/asyncio/agent/ntforg/multiple-notifications-at-once.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v3arch/asyncio/agent/ntforg/multiple-notifications-at-once.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v3arch/asyncio/agent/ntforg/multiple-notifications-at-once.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

View File

@ -0,0 +1,17 @@
.. toctree::
:maxdepth: 2
Common notifications
--------------------
.. include:: /../../examples/hlapi/v3arch/asyncio/agent/ntforg/default-v1-trap.py
:start-after: """
:end-before: """#
.. literalinclude:: /../../examples/hlapi/v3arch/asyncio/agent/ntforg/default-v1-trap.py
:start-after: """#
:language: python
:download:`Download</../../examples/hlapi/v3arch/asyncio/agent/ntforg/default-v1-trap.py>` script.
See also: :doc:`library reference </docs/api-reference>`.

Some files were not shown because too many files have changed in this diff Show More