diff options
author | elie <elie> | 2015-09-21 06:32:31 +0000 |
---|---|---|
committer | elie <elie> | 2015-09-21 06:32:31 +0000 |
commit | a0d0d36ca6a0f0852cea4242de559f957f5c0e35 (patch) | |
tree | be8ea1450aca797606b955bdc38397f835f3dd87 | |
parent | c8b8797cacf4a1e0756f04f9c2eedeff59f42a72 (diff) | |
download | pysnmp-git-a0d0d36ca6a0f0852cea4242de559f957f5c0e35.tar.gz |
more adjustments followed layout changes
67 files changed, 167 insertions, 168 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 83a88f63..0c990ca6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,12 @@ Revision 4.3.0, work in progress * Promote the use of dedicated classes for dealing with OID-value pairs. Instances of those classes resemble OBJECT-IDENTITY, OBJECT-TYPE and NOTIFICATION-TYPE MIB structures. + * Oneliner API reworked to become more generic: its LCD configuration + shortcuts and and var-bindings processing code split off SNMP apps + classes to stand-alone objects. The whole API also moved up in package + naming hierarchy and becomes 'pysnmp.hlapi.asyncore' (hlapi is + apparently an African fish). Old oneliner API remains fully operational + at its original location. * Synchronous oneliner apps redesigned to offer Python generator-based API along with a more comprehensive set of accepted parameters. * keep backward compatibility for all existing major/documented interfaces diff --git a/docs/source/docs/contents.rst b/docs/source/docs/contents.rst index ddde9cf4..1e6dc2f9 100644 --- a/docs/source/docs/contents.rst +++ b/docs/source/docs/contents.rst @@ -13,7 +13,7 @@ it will let you perform SNMP GET/SET/WALK operations by pasting code snippets from this web-site right into your Python interactive session. .. toctree:: - /docs/v3arch/asyncore/oneliner/contents + /docs/hlapi/contents At the basic level, PySNMP offers a complete set of Standard SNMP Applications to give you maximum flexibility with integration of SNMP @@ -29,18 +29,6 @@ PySNMP offers native bindings to some of these framework. .. /docs/v3arch/trollius/contents .. /docs/v3arch/twisted/contents -All programming interfaces mentioned above revolve around the notion -of SNMP Engine: - -.. toctree:: - /docs/v3arch/snmp-engine - -SNMP represents the information is manages in form of values belonging to -a set of types. - -.. toctree:: - /docs/snmp-data-types - At the other end of the complexity spectrum, PySNMP offers packet-level ASN.1 data structures that let you build, parse and analyze SNMP messages travelling over network. This extremely low-level programming interface is diff --git a/docs/source/docs/hlapi/asyncore/manager/cmdgen/getcmd.rst b/docs/source/docs/hlapi/asyncore/manager/cmdgen/getcmd.rst index 80bf1363..f8584a7d 100644 --- a/docs/source/docs/hlapi/asyncore/manager/cmdgen/getcmd.rst +++ b/docs/source/docs/hlapi/asyncore/manager/cmdgen/getcmd.rst @@ -5,5 +5,5 @@ Asynchronous Command Generator .. toctree:: :maxdepth: 2 -.. autoclass:: pysnmp.entity.rfc3413.oneliner.cmdgen.AsyncCommandGenerator +.. autoclass:: pysnmp.hlapi.asyncore.AsyncCommandGenerator :members: diff --git a/docs/source/docs/hlapi/asyncore/sync/agent/ntforg/notification.rst b/docs/source/docs/hlapi/asyncore/sync/agent/ntforg/notification.rst index 8de1e3b9..e9d55cfd 100644 --- a/docs/source/docs/hlapi/asyncore/sync/agent/ntforg/notification.rst +++ b/docs/source/docs/hlapi/asyncore/sync/agent/ntforg/notification.rst @@ -5,4 +5,4 @@ TRAP/INFORM notification .. toctree:: :maxdepth: 2 -.. autofunction:: pysnmp.entity.rfc3413.oneliner.ntforg.sendNotification +.. autofunction:: pysnmp.hlapi.asyncore.sendNotification diff --git a/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/bulkcmd.rst b/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/bulkcmd.rst index 6c7d16f3..59bee11f 100644 --- a/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/bulkcmd.rst +++ b/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/bulkcmd.rst @@ -5,4 +5,4 @@ GETBULK command .. toctree:: :maxdepth: 2 -.. autofunction:: pysnmp.entity.rfc3413.oneliner.cmdgen.bulkCmd +.. autofunction:: pysnmp.hlapi.asyncore.bulkCmd diff --git a/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/getcmd.rst b/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/getcmd.rst index 6aed48d9..c2244913 100644 --- a/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/getcmd.rst +++ b/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/getcmd.rst @@ -5,4 +5,4 @@ GET command .. toctree:: :maxdepth: 2 -.. autofunction:: pysnmp.entity.rfc3413.oneliner.cmdgen.getCmd +.. autofunction:: pysnmp.hlapi.asyncore.getCmd diff --git a/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/nextcmd.rst b/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/nextcmd.rst index 63b7f79a..1a8856a7 100644 --- a/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/nextcmd.rst +++ b/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/nextcmd.rst @@ -5,4 +5,4 @@ GETNEXT command .. toctree:: :maxdepth: 2 -.. autofunction:: pysnmp.entity.rfc3413.oneliner.cmdgen.nextCmd +.. autofunction:: pysnmp.hlapi.asyncore.nextCmd diff --git a/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/setcmd.rst b/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/setcmd.rst index 3dc68a0f..92f6c912 100644 --- a/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/setcmd.rst +++ b/docs/source/docs/hlapi/asyncore/sync/manager/cmdgen/setcmd.rst @@ -5,4 +5,4 @@ SET command .. toctree:: :maxdepth: 2 -.. autofunction:: pysnmp.entity.rfc3413.oneliner.cmdgen.setCmd +.. autofunction:: pysnmp.hlapi.asyncore.setCmd diff --git a/docs/source/examples/contents.rst b/docs/source/examples/contents.rst index eabdafee..a93af0f5 100644 --- a/docs/source/examples/contents.rst +++ b/docs/source/examples/contents.rst @@ -18,7 +18,7 @@ APIs are: .. toctree:: :maxdepth: 2 - /examples/v3arch/asyncore/oneliner/contents + /examples/hlapi/asyncore/contents #. Complete implementation of all official Standard SNMP Applications. It should let you implement any SNMP operation defined in the standard. diff --git a/docs/source/examples/hlapi/asyncore/agent/ntforg/advanced-topics.rst b/docs/source/examples/hlapi/asyncore/agent/ntforg/advanced-topics.rst index 93fa2dca..06eb06bd 100644 --- a/docs/source/examples/hlapi/asyncore/agent/ntforg/advanced-topics.rst +++ b/docs/source/examples/hlapi/asyncore/agent/ntforg/advanced-topics.rst @@ -4,25 +4,25 @@ Advanced topic -------------- -.. include:: /../../examples/v3arch/asyncore/oneliner/agent/ntforg/custom-contextname.py +.. include:: /../../examples/hlapi/asyncore/agent/ntforg/custom-contextname.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/agent/ntforg/custom-contextname.py +.. literalinclude:: /../../examples/hlapi/asyncore/agent/ntforg/custom-contextname.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/agent/ntforg/custom-contextname.py>` script. +:download:`Download</../../examples/hlapi/asyncore/agent/ntforg/custom-contextname.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/agent/ntforg/custom-contextengineid.py +.. include:: /../../examples/hlapi/asyncore/agent/ntforg/custom-contextengineid.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/agent/ntforg/custom-contextengineid.py +.. literalinclude:: /../../examples/hlapi/asyncore/agent/ntforg/custom-contextengineid.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/agent/ntforg/custom-contextengineid.py>` script. +:download:`Download</../../examples/hlapi/asyncore/agent/ntforg/custom-contextengineid.py>` script. See also: :doc:`library reference </docs/contents>`. diff --git a/docs/source/examples/hlapi/asyncore/agent/ntforg/common-notifications.rst b/docs/source/examples/hlapi/asyncore/agent/ntforg/common-notifications.rst index 9042e835..b8048e17 100644 --- a/docs/source/examples/hlapi/asyncore/agent/ntforg/common-notifications.rst +++ b/docs/source/examples/hlapi/asyncore/agent/ntforg/common-notifications.rst @@ -4,25 +4,25 @@ Common notifications -------------------- -.. include:: /../../examples/v3arch/asyncore/oneliner/agent/ntforg/v2c-trap-via-notification-type.py +.. include:: /../../examples/hlapi/asyncore/agent/ntforg/v2c-trap-via-notification-type.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/agent/ntforg/v2c-trap-via-notification-type.py +.. literalinclude:: /../../examples/hlapi/asyncore/agent/ntforg/v2c-trap-via-notification-type.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/agent/ntforg/v2c-trap-via-notification-type.py>` script. +:download:`Download</../../examples/hlapi/asyncore/agent/ntforg/v2c-trap-via-notification-type.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/agent/ntforg/v3-inform.py +.. include:: /../../examples/hlapi/asyncore/agent/ntforg/v3-inform.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/agent/ntforg/v3-inform.py +.. literalinclude:: /../../examples/hlapi/asyncore/agent/ntforg/v3-inform.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/agent/ntforg/v3-inform.py>` script. +:download:`Download</../../examples/hlapi/asyncore/agent/ntforg/v3-inform.py>` script. See also: :doc:`library reference </docs/contents>`. diff --git a/docs/source/examples/hlapi/asyncore/contents.rst b/docs/source/examples/hlapi/asyncore/contents.rst index f0e75af5..d5105514 100644 --- a/docs/source/examples/hlapi/asyncore/contents.rst +++ b/docs/source/examples/hlapi/asyncore/contents.rst @@ -5,7 +5,7 @@ High-level SNMP This chapter illustrates various uses of the high-level programming interfaces to some of Standard SNMP Applicaitons, as defined in `RFC3413 <https://tools.ietf.org/html/rfc3413>`_. -The so called "oneliner" API is designed to be simple, concise and +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 wrapped into a nearly one-line Python expression. @@ -20,13 +20,13 @@ are familiar with Net-SNMP tools, better understanding what example code doe Command Generator Applications ------------------------------ -Here's a quick example on a simple SNMP GET by oneliner API: +Here's a quick example on a simple SNMP GET by high-level API: -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/v1-get.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/v1-get.py :start-after: options: :end-before: Functionally -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/v1-get.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/v1-get.py :start-after: """# :language: python @@ -34,11 +34,11 @@ To make use of SNMPv3 and USM, the following code performs a series of SNMP GETNEXT operations effectively fetching a table of SNMP variables from SNMP Agent: -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/pull-whole-mib.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/pull-whole-mib.py :start-after: options: :end-before: Functionally -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/pull-whole-mib.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/pull-whole-mib.py :start-after: """# :language: python @@ -46,26 +46,26 @@ More examples on Command Generator API usage follow. .. toctree:: - /examples/v3arch/asyncore/oneliner/manager/cmdgen/snmp-versions - /examples/v3arch/asyncore/oneliner/manager/cmdgen/modifying-variables - /examples/v3arch/asyncore/oneliner/manager/cmdgen/walking-operations - /examples/v3arch/asyncore/oneliner/manager/cmdgen/table-operations - /examples/v3arch/asyncore/oneliner/manager/cmdgen/mib-tweaks - /examples/v3arch/asyncore/oneliner/manager/cmdgen/transport-tweaks - /examples/v3arch/asyncore/oneliner/manager/cmdgen/asynchronous-operations - /examples/v3arch/asyncore/oneliner/manager/cmdgen/advanced-topics + /examples/hlapi/asyncore/manager/cmdgen/snmp-versions + /examples/hlapi/asyncore/manager/cmdgen/modifying-variables + /examples/hlapi/asyncore/manager/cmdgen/walking-operations + /examples/hlapi/asyncore/manager/cmdgen/table-operations + /examples/hlapi/asyncore/manager/cmdgen/mib-tweaks + /examples/hlapi/asyncore/manager/cmdgen/transport-tweaks + /examples/hlapi/asyncore/manager/cmdgen/asynchronous-operations + /examples/hlapi/asyncore/manager/cmdgen/advanced-topics Notification Originator Application ----------------------------------- -Sending SNMP TRAP's and INFORM's is as easy with PySNMP's oneliner -library. The following code sends SNMP TRAP: +Sending SNMP TRAP's and INFORM's is as easy with PySNMP library. +The following code sends SNMP TRAP: -.. include:: /../../examples/v3arch/asyncore/oneliner/agent/ntforg/default-v1-trap.py +.. include:: /../../examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py :start-after: options: :end-before: Functionally -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/agent/ntforg/default-v1-trap.py +.. literalinclude:: /../../examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py :start-after: """# :language: python @@ -73,12 +73,12 @@ More examples on Notification Originator API usage follow. .. toctree:: - /examples/v3arch/asyncore/oneliner/agent/ntforg/snmp-versions - /examples/v3arch/asyncore/oneliner/agent/ntforg/common-notifications - /examples/v3arch/asyncore/oneliner/agent/ntforg/snmp-v1-trap-variants - /examples/v3arch/asyncore/oneliner/agent/ntforg/evaluating-notification-type - /examples/v3arch/asyncore/oneliner/agent/ntforg/asynchronous-operations - /examples/v3arch/asyncore/oneliner/agent/ntforg/advanced-topics + /examples/hlapi/asyncore/agent/ntforg/snmp-versions + /examples/hlapi/asyncore/agent/ntforg/common-notifications + /examples/hlapi/asyncore/agent/ntforg/snmp-v1-trap-variants + /examples/hlapi/asyncore/agent/ntforg/evaluating-notification-type + /examples/hlapi/asyncore/agent/ntforg/asynchronous-operations + /examples/hlapi/asyncore/agent/ntforg/advanced-topics More sophisticated or less popular SNMP operations can still be performed with PySNMP through its Native API to Standard SNMP Applications. diff --git a/docs/source/examples/hlapi/asyncore/manager/cmdgen/advanced-topics.rst b/docs/source/examples/hlapi/asyncore/manager/cmdgen/advanced-topics.rst index 3aef044f..969d6ed6 100644 --- a/docs/source/examples/hlapi/asyncore/manager/cmdgen/advanced-topics.rst +++ b/docs/source/examples/hlapi/asyncore/manager/cmdgen/advanced-topics.rst @@ -4,81 +4,81 @@ Advanced topics --------------- -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getbulk-limit-number-of-packets.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/getbulk-limit-number-of-packets.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getbulk-limit-number-of-packets.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/getbulk-limit-number-of-packets.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getbulk-limit-number-of-packets.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/getbulk-limit-number-of-packets.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/multiple-get-calls.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/multiple-get-calls.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/multiple-get-calls.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/multiple-get-calls.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/multiple-get-calls.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/multiple-get-calls.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/custom-contextengineid.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/custom-contextengineid.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/custom-contextengineid.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/custom-contextengineid.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/custom-contextengineid.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/custom-contextengineid.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/custom-contextengineid-and-contextname.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/custom-contextengineid-and-contextname.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/custom-contextengineid-and-contextname.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/custom-contextengineid-and-contextname.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/custom-contextengineid-and-contextname.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/custom-contextengineid-and-contextname.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/custom-v3-security-name.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/custom-v3-security-name.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/custom-v3-security-name.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/custom-v3-security-name.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/custom-v3-security-name.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/custom-v3-security-name.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/specific-v3-engine-id.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/specific-v3-engine-id.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/specific-v3-engine-id.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/specific-v3-engine-id.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/specific-v3-engine-id.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/specific-v3-engine-id.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/query-agents-from-multuple-threads.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/query-agents-from-multuple-threads.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/query-agents-from-multuple-threads.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/query-agents-from-multuple-threads.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/query-agents-from-multuple-threads.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/query-agents-from-multuple-threads.py>` script. See also: :doc:`library reference </docs/contents>`. diff --git a/docs/source/examples/hlapi/asyncore/manager/cmdgen/snmp-versions.rst b/docs/source/examples/hlapi/asyncore/manager/cmdgen/snmp-versions.rst index 787c66ea..ad786db3 100644 --- a/docs/source/examples/hlapi/asyncore/manager/cmdgen/snmp-versions.rst +++ b/docs/source/examples/hlapi/asyncore/manager/cmdgen/snmp-versions.rst @@ -4,69 +4,69 @@ Various SNMP versions ---------------------- -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/v1-get.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/v1-get.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/v1-get.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/v1-get.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/v1-get.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/v1-get.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/v2c-get.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/v2c-get.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/v2c-get.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/v2c-get.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/v2c-get.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/v2c-get.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-md5-des.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/usm-md5-des.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-md5-des.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/usm-md5-des.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-md5-des.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/usm-md5-des.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-md5-none.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/usm-md5-none.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-md5-none.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/usm-md5-none.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-md5-none.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/usm-md5-none.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-none-none.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/usm-none-none.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-none-none.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/usm-none-none.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-none-none.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/usm-none-none.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-sha-aes128.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/usm-sha-aes128.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-sha-aes128.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/usm-sha-aes128.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/usm-sha-aes128.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/usm-sha-aes128.py>` script. See also: :doc:`library reference </docs/contents>`. diff --git a/docs/source/examples/hlapi/asyncore/manager/cmdgen/walking-operations.rst b/docs/source/examples/hlapi/asyncore/manager/cmdgen/walking-operations.rst index f5aa3f1f..1d5b3159 100644 --- a/docs/source/examples/hlapi/asyncore/manager/cmdgen/walking-operations.rst +++ b/docs/source/examples/hlapi/asyncore/manager/cmdgen/walking-operations.rst @@ -4,48 +4,48 @@ Walking operations ------------------ -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getnext-multiple-oids-to-eom.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getnext-multiple-oids-to-eom.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getnext-multiple-oids-to-eom.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/pull-whole-mib.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/pull-whole-mib.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/pull-whole-mib.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/pull-whole-mib.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/pull-whole-mib.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/pull-whole-mib.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getbulk-limit-number-of-variables.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/getbulk-limit-number-of-variables.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getbulk-limit-number-of-variables.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/getbulk-limit-number-of-variables.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getbulk-limit-number-of-variables.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/getbulk-limit-number-of-variables.py>` script. -.. include:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getnext-limit-number-of-variables.py +.. include:: /../../examples/hlapi/asyncore/manager/cmdgen/getnext-limit-number-of-variables.py :start-after: """ :end-before: """# -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getnext-limit-number-of-variables.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/getnext-limit-number-of-variables.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/getnext-limit-number-of-variables.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/getnext-limit-number-of-variables.py>` script. See also: :doc:`library reference </docs/contents>`. diff --git a/docs/source/examples/v3arch/asyncore/contents.rst b/docs/source/examples/v3arch/asyncore/contents.rst index 3b1295bf..d5cdc9b0 100644 --- a/docs/source/examples/v3arch/asyncore/contents.rst +++ b/docs/source/examples/v3arch/asyncore/contents.rst @@ -3,7 +3,7 @@ SNMP with Asyncore ================== If you find yourself unable to use particular SNMP feature with the -high-level, "oneliner" API, your next step would be to use SNMPv3 +high-level (hlapi) API, your next step would be to use SNMPv3 engine services through one of the Standard SNMP Applications (`RFC3413 <https://tools.ietf.org/html/rfc3413>`_). diff --git a/docs/source/quick-start.rst b/docs/source/quick-start.rst index b0e5b4ec..9e14c03f 100644 --- a/docs/source/quick-start.rst +++ b/docs/source/quick-start.rst @@ -17,11 +17,11 @@ So just cut&paste the following code right into your Python prompt. The code will performs SNMP GET operation for a sysDescr.0 object at a publically available SNMP Agent at **demo.snmplabs.com**: -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/manager/cmdgen/v1-get.py +.. literalinclude:: /../../examples/hlapi/asyncore/manager/cmdgen/v1-get.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/manager/cmdgen/v1-get.py>` script. +:download:`Download</../../examples/hlapi/asyncore/manager/cmdgen/v1-get.py>` script. If everything works as it should you will get: @@ -39,11 +39,11 @@ Send SNMP TRAP To send a trivial TRAP message to your local Notification Receiver just cut&paste the following code into your interactive Python session: -.. literalinclude:: /../../examples/v3arch/asyncore/oneliner/agent/ntforg/default-v1-trap.py +.. literalinclude:: /../../examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py :start-after: """# :language: python -:download:`Download</../../examples/v3arch/asyncore/oneliner/agent/ntforg/default-v1-trap.py>` script. +:download:`Download</../../examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py>` script. For more sophisticated examples and use cases please refer to :doc:`examples <examples/contents>` and :doc:`library reference <docs/contents>` diff --git a/docs/source/snmp-overview.rst b/docs/source/snmp-overview.rst index b532f666..985cd799 100644 --- a/docs/source/snmp-overview.rst +++ b/docs/source/snmp-overview.rst @@ -306,7 +306,7 @@ linked objects at runtime. So here are the main components: kept in LCD. LCD Configurator is a wrapper aimed at simplifying LCD operations. -In most cases user is expected to only deal with the high-level, oneliner +In most cases user is expected to only deal with the high-level API to all these PySNMP components. However implementing SNMP Agents, Proxies and some other fine features of Managers require using the Standard Applications API. In those cases general understanding of SNMP operations diff --git a/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py b/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py index cfa2acdc..d14380b6 100644 --- a/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py +++ b/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py @@ -13,7 +13,7 @@ Send multiple SNMP notifications at once using the following options: * include managed object information specified as var-bind objects pair """# -from pysnmp.entity.rfc3413.oneliner.ntforg import * +from pysnmp.hlapi.asyncore import * # List of targets in the followin format: # ( ( authData, transportTarget ), ... ) diff --git a/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py b/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py index 60c557a4..3d4d4b6c 100644 --- a/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py +++ b/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py @@ -14,7 +14,7 @@ wait for responses asynchronously: * include managed object information specified as var-bind objects pair """# -from pysnmp.entity.rfc3413.oneliner.ntforg import * +from pysnmp.hlapi.asyncore import * # List of targets in the followin format: # ( ( authData, transportTarget ), ... ) diff --git a/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py b/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py index aa96c1e8..7028d840 100644 --- a/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py +++ b/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py @@ -26,7 +26,7 @@ employ here is based on peer's UDP port number. Other selection criterias are also possible. """# -from pysnmp.entity.rfc3413.oneliner.ntforg import * +from pysnmp.hlapi.asyncore import * from pysnmp.carrier.asyncore.dispatch import AsyncoreDispatcher # List of targets in the following format: diff --git a/examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-queries.py b/examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-queries.py index f5c05690..0c6e9bf6 100644 --- a/examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-queries.py +++ b/examples/hlapi/asyncore/manager/cmdgen/multiple-concurrent-queries.py @@ -16,7 +16,7 @@ wait for responses asynchronously: SNMPv2-MIB::sysLocation.0 MIB objects """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * # List of targets in the followin format: # ( ( authData, transportTarget, varNames ), ... ) diff --git a/examples/hlapi/asyncore/manager/cmdgen/pull-mibs-from-multiple-agents-at-once.py b/examples/hlapi/asyncore/manager/cmdgen/pull-mibs-from-multiple-agents-at-once.py index a77dc49e..ecb35ee0 100644 --- a/examples/hlapi/asyncore/manager/cmdgen/pull-mibs-from-multiple-agents-at-once.py +++ b/examples/hlapi/asyncore/manager/cmdgen/pull-mibs-from-multiple-agents-at-once.py @@ -15,7 +15,7 @@ following options: * for multiple MIB subtrees and tables """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * # List of targets in the followin format: # ( ( authData, transportTarget, varNames ), ... ) diff --git a/examples/hlapi/asyncore/manager/cmdgen/query-multiple-snmp-engines.py b/examples/hlapi/asyncore/manager/cmdgen/query-multiple-snmp-engines.py index 96ce80f3..1ce32ae0 100644 --- a/examples/hlapi/asyncore/manager/cmdgen/query-multiple-snmp-engines.py +++ b/examples/hlapi/asyncore/manager/cmdgen/query-multiple-snmp-engines.py @@ -28,7 +28,7 @@ employ here is based on peer's UDP port number. Other selection criterias are also possible. """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * from pysnmp.carrier.asyncore.dispatch import AsyncoreDispatcher # List of targets in the following format: diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py b/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py index 0c75c212..1a65a610 100644 --- a/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py +++ b/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextengineid.py @@ -24,7 +24,7 @@ Functionally similar to: | 1.3.6.1.6.3.1.1.5.2 """# -from pysnmp.entity.rfc3413.oneliner.ntforg import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( sendNotification(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py b/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py index 1b3e1f8e..c322d557 100644 --- a/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py +++ b/examples/hlapi/asyncore/sync/agent/ntforg/custom-contextname.py @@ -24,7 +24,7 @@ Functionally similar to: | 1.3.6.1.6.3.1.1.5.2 """# -from pysnmp.entity.rfc3413.oneliner.ntforg import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( sendNotification(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py b/examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py index 85e130b9..51bf05af 100644 --- a/examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py +++ b/examples/hlapi/asyncore/sync/agent/ntforg/custom-v1-trap.py @@ -28,7 +28,7 @@ Functionally similar to: | '1.3.6.1.2.1.1.1.0' s 'my system' """# -from pysnmp.entity.rfc3413.oneliner.ntforg import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( sendNotification(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py b/examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py index 5ad5ef7b..75542ba2 100644 --- a/examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py +++ b/examples/hlapi/asyncore/sync/agent/ntforg/default-v1-trap.py @@ -26,7 +26,7 @@ Functionally similar to: | '1.3.6.1.2.1.1.1.0' s 'my system' """# -from pysnmp.entity.rfc3413.oneliner.ntforg import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( sendNotification(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py b/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py index 4d99a126..096eb345 100644 --- a/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py +++ b/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py @@ -20,7 +20,7 @@ Functionally similar to: | 1.3.6.1.2.1.1.1.0 s 'my system' """# -from pysnmp.entity.rfc3413.oneliner.ntforg import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( sendNotification(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-via-notification-type.py b/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-via-notification-type.py index a328a2ce..296aebc0 100644 --- a/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-via-notification-type.py +++ b/examples/hlapi/asyncore/sync/agent/ntforg/v2c-trap-via-notification-type.py @@ -19,7 +19,7 @@ Functionally similar to: | 1.3.6.1.4.1.20408.4.1.1.2 \ """# -from pysnmp.entity.rfc3413.oneliner.ntforg import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( sendNotification(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py b/examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py index 161427a3..ebf2fdfc 100644 --- a/examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py +++ b/examples/hlapi/asyncore/sync/agent/ntforg/v3-inform.py @@ -20,7 +20,7 @@ Functionally similar to: | '1.3.6.1.2.1.1.1.0' s 'my system' """# -from pysnmp.entity.rfc3413.oneliner.ntforg import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( sendNotification(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py b/examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py index f03948f2..27d081d1 100644 --- a/examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py +++ b/examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py @@ -26,7 +26,7 @@ Functionally similar to: | '1.3.6.1.2.1.1.1.0' s 'my system' """# -from pysnmp.entity.rfc3413.oneliner.ntforg import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( sendNotification(SnmpEngine(OctetString(hexValue='8000000001020304')), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py b/examples/hlapi/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py index 62f7595c..bbcac86a 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/coerce-set-value-to-mib-spec.py @@ -15,7 +15,7 @@ Functionally similar to: | = "new system name" """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( setCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py index e994dbac..445d665a 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-asn1-mib-search-path.py @@ -16,7 +16,7 @@ Functionally similar to: | IF-MIB::ifInOctets.1 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py index f0178823..2e84bba4 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py @@ -20,7 +20,7 @@ Functionally similar to: | SNMPv2-MIB::sysORDescr.1 = "new system name" """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( setCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py index 46ef2759..d8e19abf 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py @@ -18,7 +18,7 @@ Functionally similar to: | SNMPv2-MIB::sysORDescr.1 = "new system name" """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( setCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py index 9c974656..e49ef4b2 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py @@ -18,7 +18,7 @@ Functionally similar to: | demo.snmplabs.com TCP-MIB::tcpConnTable """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * for errorIndication, \ errorStatus, errorIndex, \ diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py index 1439aeb3..a6965fe6 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-timeout-and-retries.py @@ -28,7 +28,7 @@ Functionally similar to: | $ snmpget -v1 -c public demo.snmplabs.com 1.3.6.1.2.1.1.1.0 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-v3-security-name.py b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-v3-security-name.py index ae5e6569..77c4cf63 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-v3-security-name.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-v3-security-name.py @@ -15,7 +15,7 @@ allows you to address a USM Table row just as userName does. However securityName can be made human-readable, also it is not an index in usmUserTable, thus duplicate securityName parameters are possible. """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py b/examples/hlapi/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py index 9499a385..3967ab68 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/fetch-variables-over-ipv6.py @@ -17,7 +17,7 @@ Functionally similar to: | 1.3.6.1.2.1.1.2.0 \ | 1.3.6.1.2.1.1.3.0 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/get-table-object-by-index.py b/examples/hlapi/asyncore/sync/manager/cmdgen/get-table-object-by-index.py index 84b91056..6b382ea2 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/get-table-object-by-index.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/get-table-object-by-index.py @@ -17,7 +17,7 @@ Functionally similar to: | IF-MIB::ifInOctets.1 IF-MIB::ifOutOctets.1 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/get-table-object-by-multiple-indices.py b/examples/hlapi/asyncore/sync/manager/cmdgen/get-table-object-by-multiple-indices.py index ebc2b0cb..e344dc05 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/get-table-object-by-multiple-indices.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/get-table-object-by-multiple-indices.py @@ -17,7 +17,7 @@ Functionally similar to: | TCP-MIB::tcpConnLocalAddress."0.0.0.0".22."0.0.0.0".0 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py b/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py index 6a09a13e..f30ae1e4 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py @@ -13,14 +13,14 @@ Send a series of SNMP GETBULK requests using the following options: Functionally similar to: -| $ snmpbulkwalk -v3 -lauthPriv -u usr-md5-none -A authkey1 -X privkey1 \ +| $ snmpbulkwalk -v3 -lauthPriv -u usr-md5-des -A authkey1 -X privkey1 \ | -Cn1, -Cr25 \ | demo.snmplabs.com \ | IP-MIB::ipAdEntAddr \ | IP-MIB::ipAddrEntry """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * for errorIndication, \ errorStatus, errorIndex, \ diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py b/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py index 4cb303e9..0cf9e0f8 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-packets.py @@ -17,7 +17,7 @@ Functionally similar to: | demo.snmplabs.com SNMPv2-MIB::system """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * for errorIndication, \ errorStatus, errorIndex, \ diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-variables.py b/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-variables.py index ac4887a0..ec2abdd4 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-variables.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/getbulk-limit-number-of-variables.py @@ -19,7 +19,7 @@ Functionally similar to: | 1.3.6.1.2.1.2.2 1.3.6.1.2.1.2.3 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * for errorIndication, \ errorStatus, errorIndex, \ diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/getnext-limit-number-of-variables.py b/examples/hlapi/asyncore/sync/manager/cmdgen/getnext-limit-number-of-variables.py index 19d79500..2844bfaa 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/getnext-limit-number-of-variables.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/getnext-limit-number-of-variables.py @@ -18,7 +18,7 @@ Functionally similar to: | SNMPv2-MIB::system """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * for errorIndication, \ errorStatus, errorIndex, \ diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/getnext-multiple-oids-to-eom.py b/examples/hlapi/asyncore/sync/manager/cmdgen/getnext-multiple-oids-to-eom.py index 514a6ce7..ac663882 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/getnext-multiple-oids-to-eom.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/getnext-multiple-oids-to-eom.py @@ -16,7 +16,7 @@ Functionally similar to: | 1.3.6.1.2.1.2.2.1.2 1.3.6.1.2.1.2.2.1.3 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * for errorIndication, \ errorStatus, errorIndex, \ diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/multiple-get-calls.py b/examples/hlapi/asyncore/sync/manager/cmdgen/multiple-get-calls.py index 116d99ff..b17da654 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/multiple-get-calls.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/multiple-get-calls.py @@ -20,7 +20,7 @@ Functionally similar to: | IF-MIB::ifInOctets.1 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * queue = [ [ ObjectType(ObjectIdentity('IF-MIB', 'ifInOctets', 1)) ], [ ObjectType(ObjectIdentity('IF-MIB', 'ifOutOctets', 1)) ] ] diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py b/examples/hlapi/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py index 4a0877d0..080b5d1a 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/preload-pysnmp-mibs.py @@ -18,7 +18,7 @@ Functionally similar to: | 1.3.6 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * for errorIndication, \ errorStatus, errorIndex, \ diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/pull-whole-mib.py b/examples/hlapi/asyncore/sync/manager/cmdgen/pull-whole-mib.py index 4c0568a0..479c5045 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/pull-whole-mib.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/pull-whole-mib.py @@ -16,7 +16,7 @@ Functionally similar to: | demo.snmplabs.com IF-MIB:: """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * for errorIndication, \ errorStatus, errorIndex, \ diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/pull-whole-snmp-table.py b/examples/hlapi/asyncore/sync/manager/cmdgen/pull-whole-snmp-table.py index 7530a391..3c3f40bf 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/pull-whole-snmp-table.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/pull-whole-snmp-table.py @@ -21,7 +21,7 @@ Functionally similar to: | IF-MIB::ifType \ """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * for errorIndication, \ errorStatus, \ diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads.py b/examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads.py index 47630ea5..442855a8 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/query-agents-from-multuple-threads.py @@ -22,7 +22,7 @@ if version_info[0] == 2: else: from queue import Queue from threading import Thread -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * # List of targets in the followin format: # ( ( authData, transportTarget, varNames ), ... ) diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py b/examples/hlapi/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py index 9b9fae71..b2b67ebf 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/set-multiple-scalar-values.py @@ -21,7 +21,7 @@ Functionally similar to: | 1.3.6.1.2.1.1.9.1.3.1 s "new system name" """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( setCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/specific-v3-engine-id.py b/examples/hlapi/asyncore/sync/manager/cmdgen/specific-v3-engine-id.py index 18b3a47a..f7db38f9 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/specific-v3-engine-id.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/specific-v3-engine-id.py @@ -18,7 +18,7 @@ Send SNMP GET request using the following scenario and options: * for an OID in text form """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * snmpEngine = SnmpEngine() diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-des.py b/examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-des.py index 2c53b290..cdd6ce31 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-des.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-des.py @@ -16,7 +16,7 @@ Functionally similar to: | IF-MIB::ifInOctets.1 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-none.py b/examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-none.py index 6e0d1c51..363bddbc 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-none.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/usm-md5-none.py @@ -15,7 +15,7 @@ Functionally similar to: | IF-MIB::ifInOctets.1 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/usm-none-none.py b/examples/hlapi/asyncore/sync/manager/cmdgen/usm-none-none.py index 976e0f4d..5049a7cf 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/usm-none-none.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/usm-none-none.py @@ -16,7 +16,7 @@ Functionally similar to: | IF-MIB::ifInOctets.1 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/usm-sha-aes128.py b/examples/hlapi/asyncore/sync/manager/cmdgen/usm-sha-aes128.py index 85a0399e..1a1c0cb9 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/usm-sha-aes128.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/usm-sha-aes128.py @@ -32,7 +32,7 @@ Functionally similar to: | SNMPv2-MIB::sysDescr.0 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/v1-get.py b/examples/hlapi/asyncore/sync/manager/cmdgen/v1-get.py index 2e9c298c..7d417efe 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/v1-get.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/v1-get.py @@ -14,7 +14,7 @@ Functionally similar to: | $ snmpget -v1 -c public demo.snmplabs.com SNMPv2-MIB::sysDescr.0 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/v2c-get.py b/examples/hlapi/asyncore/sync/manager/cmdgen/v2c-get.py index dcc4ccf8..a11c48ca 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/v2c-get.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/v2c-get.py @@ -15,7 +15,7 @@ Functionally similar to: | 1.3.6.1.2.1.1.6.0 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/v2c-getbulk.py b/examples/hlapi/asyncore/sync/manager/cmdgen/v2c-getbulk.py index bf167e45..ff820172 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/v2c-getbulk.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/v2c-getbulk.py @@ -18,7 +18,7 @@ Functionally similar to: | 1.3.6.1.2.1.2.2 1.3.6.1.2.1.2.3 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * for errorIndication, \ errorStatus, errorIndex, \ diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/waive-mib-lookup.py b/examples/hlapi/asyncore/sync/manager/cmdgen/waive-mib-lookup.py index 427c964e..595d7add 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/waive-mib-lookup.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/waive-mib-lookup.py @@ -19,7 +19,7 @@ Functionally similar to: | $ snmpwalk -v2c -c public -ObentU demo.snmplabs.com 1.3.6.1.2.1 """# -from pysnmp.entity.rfc3413.oneliner.cmdgen import * +from pysnmp.hlapi.asyncore import * for errorIndication, \ errorStatus, errorIndex, \ diff --git a/pysnmp/entity/engine.py b/pysnmp/entity/engine.py index 97844bff..6a454743 100644 --- a/pysnmp/entity/engine.py +++ b/pysnmp/entity/engine.py @@ -14,6 +14,8 @@ from pysnmp.entity import observer from pysnmp import debug from pysnmp import error +__all__ = ['SnmpEngine'] + class SnmpEngine: """Creates SNMP engine object. @@ -39,7 +41,6 @@ class SnmpEngine: Examples -------- - >>> from pysnmp.entity.engine import SnmpEngine >>> SnmpEngine() SnmpEngine(snmpEngineID=OctetString(hexValue='0x80004fb80567726f6d6d69742')) >>> diff --git a/pysnmp/hlapi/__init__.py b/pysnmp/hlapi/__init__.py index 8c3066b2..07adb5a3 100644 --- a/pysnmp/hlapi/__init__.py +++ b/pysnmp/hlapi/__init__.py @@ -1 +1,5 @@ -# This file is necessary to make this directory a package. +from pysnmp.proto.rfc1902 import * +from pysnmp.smi.rfc1902 import * +from pysnmp.hlapi.auth import * +from pysnmp.hlapi.context import * +from pysnmp.entity.engine import SnmpEngine diff --git a/pysnmp/hlapi/asyncore/__init__.py b/pysnmp/hlapi/asyncore/__init__.py index 2f815b68..9753462c 100644 --- a/pysnmp/hlapi/asyncore/__init__.py +++ b/pysnmp/hlapi/asyncore/__init__.py @@ -1,4 +1,3 @@ -# This file is necessary to make this directory a package. from pysnmp.proto.rfc1902 import * from pysnmp.smi.rfc1902 import * from pysnmp.hlapi.auth import * diff --git a/pysnmp/hlapi/asyncore/sync/cmdgen.py b/pysnmp/hlapi/asyncore/sync/cmdgen.py index 357cc527..5cdb2900 100644 --- a/pysnmp/hlapi/asyncore/sync/cmdgen.py +++ b/pysnmp/hlapi/asyncore/sync/cmdgen.py @@ -428,9 +428,9 @@ def bulkCmd(snmpEngine, authData, transportTarget, contextData, maxRepetitions : int `maxRepetitions` MIB variables are requested in response for each - of the remaining MIB variables in the request (e.g. excluding - `nonRepeaters`). Remote SNMP engine may choose lesser value than - requested. + of the remaining MIB variables in the request (e.g. excluding + `nonRepeaters`). Remote SNMP engine may choose lesser value than + requested. \*varBinds : :py:class:`~pysnmp.smi.rfc1902.ObjectType` One or more class instances representing MIB variables to place @@ -462,7 +462,7 @@ def bulkCmd(snmpEngine, authData, transportTarget, contextData, errorStatus : str True value indicates SNMP PDU error. errorIndex : int - Non-zero value refers to *varBinds[errorIndex-1] + Non-zero value refers to \*varBinds[errorIndex-1] varBinds : tuple A sequence of :py:class:`~pysnmp.smi.rfc1902.ObjectType` class instances representing MIB variables returned in SNMP response. @@ -104,11 +104,12 @@ params.update( { 'pysnmp.carrier.asyncio.dgram', 'pysnmp.entity', 'pysnmp.entity.rfc3413', - 'pysnmp.entity.rfc3413.oneliner', - 'pysnmp.entity.rfc3413.oneliner.sync', - 'pysnmp.entity.rfc3413.oneliner.sync.compat', 'pysnmp.entity.rfc3413.twisted', 'pysnmp.entity.rfc3413.asyncio', + 'pysnmp.hlapi', + 'pysnmp.hlapi.asyncore', + 'pysnmp.hlapi.asyncore._sync', + 'pysnmp.hlapi.asyncore._sync.compat', 'pysnmp.proto', 'pysnmp.proto.mpmod', 'pysnmp.proto.secmod', |