Skip to content

Commit

Permalink
Centralized the remaining links.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Feb 20, 2024
1 parent 8c71b86 commit 0058a14
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 64 deletions.
20 changes: 10 additions & 10 deletions docs/source/development.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.. include:: /includes/_links.rst

Further development
-------------------
Expand All @@ -21,7 +22,7 @@ PySNMP library
be to write another MIB parser and code generator which would produce
PySNMP compliant Python code right from MIB text files all by itself.

**Done:** see `PySMI project <https://www.pysnmp.com/pysmi/>`_ in conjunction with the latest PySNMP codebase.
**Done:** see `PySMI`_` project in conjunction with the latest PySNMP codebase.

#. Reverse MIB index. The variable-bindings received by the system whilst
in Manager role could be post-processed using the information kept in
Expand Down Expand Up @@ -60,10 +61,10 @@ Stand-alone PySNMP-based tools
#. SNMP Proxy Forwarder. That would be a stand-alone, application-level
proxy service supporting all SNMP versions, multiple network transports,
Command and Notification SNMP message types. Its anticipated features
include extensive configuration facilities, fine-graned access
include extensive configuration facilities, fine-grained access
control and logging.

**Done:** see `SNMP Proxy Forwarder <https://www.pysnmp.com/snmpfwd/>`_.
**Done:** see `SNMP Proxy Forwarder`_.

#. SNMP Trap Receiver. We see this application as a simple yet flexible
SNMP TRAP collector. It would listen on network sockets of different
Expand All @@ -81,18 +82,17 @@ Stand-alone PySNMP-based tools
a relational database application. So we are planning to put some more
efforts into the Simulator project as time permits.

**Done:** since `snmpsim-0.2.4 <https://www.pysnmp.com/snmpsim/>`_
**Done:** since `snmpsim`_ 0.2.4.

If you need some particular feature - please,
`open a feature request <https://github.com/lextudio/pysnmp/issues/new>`_ . Once we
open a feature request via a `GitHub issue`_ . Once we
see a greater demand in particular area, we would re-arrange our
development resources to meet it sooner.

You could greater speed up the development of particular feature by
sponsoring it. Please get back to us to discuss details.
sponsoring it. Please contact `LeXtudio Inc.`_ to discuss details.

Contributions to the PySNMP source code is greatly appreciated as well.
We require contributed code to run with Python 3.7 through the latest
Python version (which is 3.11 at the time of this writing). Contributed
code will be redistributed under the terms of the same
`license <https://www.pysnmp.com/pysnmp/>`_ as PySNMP is.
We require contributed code to run with Python 3.8 through the latest
Python version (which is 3.12 at the time of this writing). Contributed
code will be redistributed under the terms of the same license as PySNMP is.
5 changes: 3 additions & 2 deletions docs/source/docs/api-reference.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.. include:: /includes/_links.rst

API References
==============
Expand Down Expand Up @@ -223,9 +224,9 @@ SNMP Base Types
SNMP represents real-world objects it serves along with their
states in form of values. Those values each belong to one
of SNMP types (:RFC:`1902#section-2`) which, in turn, are based
on `ASN.1 <https://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One>`_
on `ASN.1`_
data description language. PySNMP types are derived from
`Python ASN.1 types <https://pyasn1.readthedocs.io/>`_ implementation.
`PyASN1`_ implementation.

.. toctree::
:maxdepth: 2
Expand Down
7 changes: 3 additions & 4 deletions docs/source/docs/pysnmp-hlapi-tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ For scalar MIB objects index is '0' by convention. The
(1, 3, 6, 1, 2, 1, 1, 1, 0)
We will be reading *sysDescr* scalar MIB object instance as defined
in `SNMPv2-MIB <https://mibs.pysnmp.com/asn1/SNMPv2-MIB>`_ module.
in `RFC3418`_ ``SNMPv2-MIB`` module.
.. code-block:: python
Expand All @@ -240,9 +240,8 @@ in `SNMPv2-MIB <https://mibs.pysnmp.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. We maintain a
`collection <https://github.com/lextudio/mibs.snmplabs.com/tree/master/asn1>`_ of ASN.1 MIB modules
that you can use in your SNMP projects.
them from remote hosts. We maintain a collection of ASN.1 MIB modules on
`mibs.pysnmp.com`_ that you can use in your SNMP projects.
.. note::
Expand Down
14 changes: 7 additions & 7 deletions docs/source/docs/snmp-design.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.. include:: /includes/_links.rst

.. toctree::
:maxdepth: 2
Expand Down Expand Up @@ -98,7 +99,7 @@ SNMP-specific subtypes of those base ASN.1 types are:
In addition to these scalar types, SNMP defines a way to collect them
into ordered arrays. From these arrays 2-d tables could be built.

PySNMP relies on the `PyASN1 <https://pyasn1.readthedocs.io/>`_ package for
PySNMP relies on the `PyASN1`_ package for
modeling all SNMP types. With PyASN1, instances of ASN.1 types are
represented by Python objects that look like either a string or an
integer.
Expand Down Expand Up @@ -218,9 +219,8 @@ Both SNMP managed and managing entities could consume MIB information.
+ Implements MIB objects in code

From human perspective, MIB is a text file written in a subset of
ASN.1 language. We maintain `a collection
<https://github.com/lextudio/mibs.snmplabs.com/tree/master/asn1>`_ of 9000+ MIB modules that you can
use for your projects.
ASN.1 language. We maintain a collection of 9000+ MIB modules on
`mibs.pysnmp.com`_ that you can use for your projects.

PySNMP converts ASN.1 MIB files into Python modules, then SNMP
engine loads those modules at runtime on demand. PySNMP MIB modules
Expand All @@ -229,8 +229,8 @@ managing entities.

MIB conversion is performed automatically by PySNMP, but technically,
it is handled by PySNMP sister project called
`PySMI <https://www.pysnmp.com/pysmi/>`_. However you can also perform said
conversion by hand with PySMI's *mibdump.py* tool.
`PySMI`_. However you can also perform said
conversion by hand with PySMI's ``mibdump`` tool.

Protocol Operations
-------------------
Expand All @@ -254,7 +254,7 @@ Protocol carries SNMP messages. Besides header information used for
protocol operations, management information is transferred in
so-called Protocol Data Units (PDU). Seven PDU types are defined in
SNMP addressing conceptually different operations to be performed by
either managing or managed entities (Manager or Agent repectively).
either managing or managed entities (Manager or Agent respectively).

* Manager-to-agent

Expand Down
2 changes: 1 addition & 1 deletion docs/source/download.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The PySNMP software is provided under terms and conditions of BSD-style
license, and can be freely downloaded from `PyPI package`_.

Besides official releases, if you want to try the cutting-edge development
code then it could be taken from PySNMP `source code repository`_. It may
code then it could be taken from PySNMP `GitHub repository`_. It may
be less stable in regards to general operation and changes to public
interfaces, but it's first to contain fixes to recently discovered bugs.

Expand Down
9 changes: 5 additions & 4 deletions docs/source/examples/hlapi/asyncio/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ makes asynchronous code looking like synchronous one thus eliminating

With `asyncio` built-in facilities, you could run many SNMP queries
in parallel and/or sequentially, interleave SNMP queries with I/O
operations with other systems. See `asyncio resources <http://asyncio.org>`_
repository for other `asyncio`-compatible modules.
operations with other systems. Other `asyncio`-compatible Python modules
can be easily found as it is a popular programming paradigm.

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
are familiar with Net-SNMP tools, better understanding what example code
does.

Here's a quick example on a simple SNMP GET by high-level API:

Expand Down Expand Up @@ -64,5 +65,5 @@ More examples on Notification Originator API usage follow.
/examples/hlapi/asyncio/agent/ntforg/common-notifications
/examples/hlapi/asyncio/agent/ntforg/advanced-topics

More sophisticated or less popular SNMP operations can still be performed
More sophisticated or less popular SNMP operations can still be performed
with PySNMP through its Native API to Standard SNMP Applications.
19 changes: 10 additions & 9 deletions docs/source/examples/v3arch/asyncio/index.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
.. include:: /includes/_links.rst

Asynchronous: asyncio
=====================

Python 3.4 introduced a new module - `asyncio <https://docs.python.org/3/library/asyncio.html>`_ (former Tulip,
Python 3.4 introduced a new module - `asyncio` (former Tulip,
PEP 3156) featuring infrastructure for writing single-threaded concurrent
code using coroutines, multiplexing I/O access over sockets and other
resources.

PySNMP library was originally built on top of Python's asynchronous I/O
library called asyncio. The asyncio module offers similar functionality
but uses much more modern and powerful language facilities. Functionally,
asyncio can replace asyncio in PySNMP however its use requires understanding
PySNMP library was originally built on top of Python's asynchronous I/O
library called asyncio. The asyncio module offers similar functionality
but uses much more modern and powerful language facilities. Functionally,
asyncio can replace asyncio in PySNMP however its use requires understanding
the concepts such as coroutines and generators. If your task is to embed SNMP
stack into an existing asyncio-based app, using PySNMP's asyncio interfaces
stack into an existing asyncio-based app, using PySNMP's asyncio interfaces
greatly simplifies the task.

All SNMP-related functionality of Native PySNMP API to Standard SNMP
Applications (`RFC3413 <https://tools.ietf.org/html/rfc3413>`_)
All SNMP-related functionality of Native PySNMP API to Standard SNMP
Applications (`RFC3413`_)
remains available to asyncio-backed applications.

We do not provide Command Generator and Notification Originator examples,
Expand All @@ -37,5 +38,5 @@ Notification Receiver Applications

/examples/v3arch/asyncio/manager/ntfrcv/transport-tweaks

For more details on PySNMP programming model and interfaces, please
For more details on PySNMP programming model and interfaces, please
refer to the documentation
4 changes: 2 additions & 2 deletions docs/source/faq.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
.. include:: /includes/_links.rst

FAQ
===

Here we have an ever-growing list of frequently asked questions regarding
PySNMP usage issues. If you got an issue that you think is worth noting
here, please open a `GitHub issue <https://github.com/lextudio/pysnmp/issues>`_.
here, please open a `GitHub issue`_.

Keep in mind that some the answers below may not be universally applicable
to any PySNMP revision.
Expand All @@ -14,4 +15,3 @@ to any PySNMP revision.
:glob:

/faq/*

17 changes: 8 additions & 9 deletions docs/source/faq/non-printable-snmp-values-apps.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.. include:: /includes/_links.rst

Garbaged SNMP values (apps)
---------------------------
Garbled SNMP values (apps)
--------------------------

Q. When my PySNMP application prints out fetched values, some of them
come out as a garbage on my screan. Here's my code:
Q. When my PySNMP application prints out fetched values, some of them
come out as a garbage on my screen. Here's my code:

.. code-block:: python
Expand All @@ -19,8 +20,8 @@ Q. When my PySNMP application prints out fetched values, some of them
The IpAddress type seems to be the only one with this problem.
A. Always use prettyPrint() method for all pyasn1-based objects -- it
automatically converts ASN1 types to human-friendly form.
A. Always use prettyPrint() method for all PyASN1-based objects -- it
automatically converts ASN.1 types to human-friendly form.
.. code-block:: python
Expand All @@ -35,6 +36,4 @@ A. Always use prettyPrint() method for all pyasn1-based objects -- it
> > > rfc1902.IpAddress.prettyPrint(a)
'1.2.3.4'
See `pyasn1 docs <https://pyasn1.readthedocs.io/>`_ for more information
on pyasn1 data model.
See `PyASN1`_ docs for more information on PyASN1 data model.
13 changes: 5 additions & 8 deletions docs/source/faq/pass-custom-mib-to-manager.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.. include:: /includes/_links.rst

How to pass MIB to the Manager
------------------------------
Expand All @@ -6,24 +7,22 @@ Q. How to make use of random MIBs at my Manager application?

A. Starting from PySNMP 4.3.x, plain-text (ASN.1) MIBs can be
automatically parsed into PySNMP form by the
`PySMI <https://www.pysnmp.com/pysmi/>`_ tool. PySNMP will call PySMI
`PySMI`_ tool. PySNMP will call PySMI
automatically, parsed PySNMP MIB will be cached in
$HOME/.pysnmp/mibs/ (default location).

MIB compiler could be configured to search for plain-text
MIBs at multiple local and remote locations. As for remote
MIB repos, you are welcome to use our collection of ASN.1
MIB files at
`https://github.com/lextudio/mibs.snmplabs.com/tree/master/asn1 <https://github.com/lextudio/mibs.snmplabs.com/tree/master/asn1>`_
as shown below.
MIB files at `mibs.pysnmp.com`_ as shown below.

.. literalinclude:: /../../examples/hlapi/asyncio/manager/cmdgen/custom-asn1-mib-search-path.py
:start-after: """#
:language: python

.. code:
:language: python
# Configure the SNMP engine with access to the
# common Linux ASN.1 (Textual) MIB directories...
from pysnmp import hlapi
Expand All @@ -38,8 +37,7 @@ A. Starting from PySNMP 4.3.x, plain-text (ASN.1) MIBs can be
:download:`Download</../../examples/hlapi/asyncio/manager/cmdgen/custom-asn1-mib-search-path.py>` script.

Alternatively, you can invoke the
`mibdump.py <https://www.pysnmp.com/pysmi/mibdump.html>`_
Alternatively, you can invoke the `mibdump`_ command
(shipped with PySMI) by hand and this way compile plain-text MIB
into PySNMP format. Once the compiled MIBs are stored in a directory,
add the directory to your MibBuilder's MibSources.
Expand All @@ -52,4 +50,3 @@ add the directory to your MibBuilder's MibSources.
builder.addMibSources(builder_module.DirMibSource(
os.path.join( HERE, 'mibs')
))
14 changes: 13 additions & 1 deletion docs/source/includes/_links.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@

.. _LeXtudio Inc.: https://www.lextudio.com
.. _PyPI package: http://pypi.python.org/pypi/pysnmp-lextudio
.. _source code repository: https://github.com/lextudio/pysnmp
.. _GitHub repository: https://github.com/lextudio/pysnmp
.. _GitHub issue: https://github.com/lextudio/pysnmp/issues/new
.. _Stack Overflow: http://stackoverflow.com/questions/tagged/pysnmp
.. _demo.pysnmp.com: https://www.pysnmp.com/snmp-simulation-service#
.. _mibs.pysnmp.com: https://github.com/lextudio/mibs.snmplabs.com/tree/master/asn1
.. _PySMI: https://www.pysnmp.com/pysmi/
.. _SNMP Proxy Forwarder: https://www.pysnmp.com/snmpfwd/
.. _snmpsim: https://www.pysnmp.com/snmpsim/
.. _PyASN1: https://pyasn1.readthedocs.io/
.. _mibdump: https://www.pysnmp.com/pysmi/mibdump
.. _command line tools: https://www.pysnmp.com/snmpclitools/
.. _Python: https://www.python.org/
.. _SNMP: https://en.wikipedia.org/wiki/Simple_Network_Management_Protocol
.. _PSF: https://www.python.org/psf/
.. _ASN.1: https://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One
.. _RFC3413: https://www.ietf.org/rfc/rfc3413.txt
.. _RFC3418: https://www.ietf.org/rfc/rfc3418.txt
.. _pyenv: https://github.com/pyenv/pyenv
.. _pyenv-win: https://github.com/pyenv-win/pyenv-win
.. _Wireshark: https://www.wireshark.org/
Expand Down
12 changes: 5 additions & 7 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ SNMP Library for Python
.. toctree::
:maxdepth: 2

PySNMP is a cross-platform, pure-`Python <http://www.python.org/>`_
`SNMP <http://en.wikipedia.org/wiki/Simple_Network_Management_Protocol>`_
PySNMP is a cross-platform, pure-`Python`_ `SNMP`_
engine implementation. It features fully-functional SNMP engine capable
to act in Agent/Manager/Proxy roles, talking SNMP v1/v2c/v3 protocol
versions over IPv4/IPv6 and other network transports.
Expand All @@ -24,21 +23,20 @@ older, now obsolete, PySNMP releases. All site documentation and
examples are written for the 5.0 and later versions in mind.
Older materials have been removed.

Besides the libraries, a set of pure-Python
`command-line tools <https://pypi.python.org/pypi/snmpclitools/>`_
Besides the libraries, a set of pure-Python `command line tools`_
are shipped along with the system. Those tools mimic the interface
and behavior of popular Net-SNMP snmpget/snmpset/snmpwalk utilities.
They may be useful in a cross-platform situations as well as a testing
and prototyping instrument for pysnmp users.

PySNMP software is free and open-source. Source code is hosted in
a `Github repo <https://github.com/lextudio/pysnmp>`_.
a `Github repository`_.
The library is being distributed under 2-clause BSD-style license.

PySNMP library development has been initially sponsored
by a `PSF <http://www.python.org/psf/>`_ grant.
by a `PSF`_ grant.

Quick start
Quick Start
-----------

You already know something about SNMP and have no courage to dive into
Expand Down

0 comments on commit 0058a14

Please sign in to comment.