summaryrefslogtreecommitdiff
path: root/examples/v3arch/asyncio/manager/cmdgen/get-v2c-over-ipv6.py
diff options
context:
space:
mode:
authorelie <elie>2015-09-14 05:20:24 +0000
committerelie <elie>2015-09-14 05:20:24 +0000
commit2f24177c361ba4d9deba2d7378f84aa96111db80 (patch)
tree383c282bfe661bef3eaf16077946124c0039d9ab /examples/v3arch/asyncio/manager/cmdgen/get-v2c-over-ipv6.py
parent4397ac4bd10b626aa9355cf04ee0cdb410fe6030 (diff)
downloadpysnmp-2f24177c361ba4d9deba2d7378f84aa96111db80.tar.gz
* synchronous oneliner apps redesigned to offer Python generator-based
API along with a more comprehensive set of accepted parameters. * massively documented (in Sphinx, NumPy style)
Diffstat (limited to 'examples/v3arch/asyncio/manager/cmdgen/get-v2c-over-ipv6.py')
-rw-r--r--examples/v3arch/asyncio/manager/cmdgen/get-v2c-over-ipv6.py35
1 files changed, 19 insertions, 16 deletions
diff --git a/examples/v3arch/asyncio/manager/cmdgen/get-v2c-over-ipv6.py b/examples/v3arch/asyncio/manager/cmdgen/get-v2c-over-ipv6.py
index e1b3171..da3a0d0 100644
--- a/examples/v3arch/asyncio/manager/cmdgen/get-v2c-over-ipv6.py
+++ b/examples/v3arch/asyncio/manager/cmdgen/get-v2c-over-ipv6.py
@@ -1,19 +1,22 @@
-#
-# GET Command Generator
-#
-# Send a SNMP GET request
-# with SNMPv2c, community 'public'
-# using Asyncio framework for network transport
-# over IPv6/UDP
-# to an Agent at [::]:161
-# for an OID in string form
-#
-# This script performs similar to the following Net-SNMP command:
-#
-# $ snmpget -v2c -c public -ObentU udp6:[::1]:161 1.3.6.1.2.1.1.1.0
-#
-# Requires Python 3.4 and later!
-#
+"""
+Fetch scalar value over IPv6
+++++++++++++++++++++++++++++
+
+Send SNMP GET request with the following options:
+
+* with SNMPv2c, community 'public'
+* using Asyncio framework for network transport
+* over IPv6/UDP
+* to an Agent at [::]:161
+* for an OID in string form
+
+This script performs similar to the following Net-SNMP command:
+
+| $ snmpget -v2c -c public -ObentU udp6:[::1]:161 1.3.6.1.2.1.1.1.0
+
+Requires Python 3.4 and later!
+
+"""#
from pysnmp.carrier.asyncio.dgram import udp6
from pysnmp.entity.rfc3413.asyncio import cmdgen
from pysnmp.entity import engine, config