summaryrefslogtreecommitdiff
path: root/examples/v3arch/asyncio/manager/cmdgen/set-v2c.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/v3arch/asyncio/manager/cmdgen/set-v2c.py')
-rw-r--r--examples/v3arch/asyncio/manager/cmdgen/set-v2c.py36
1 files changed, 19 insertions, 17 deletions
diff --git a/examples/v3arch/asyncio/manager/cmdgen/set-v2c.py b/examples/v3arch/asyncio/manager/cmdgen/set-v2c.py
index 1e512f2..381f11a 100644
--- a/examples/v3arch/asyncio/manager/cmdgen/set-v2c.py
+++ b/examples/v3arch/asyncio/manager/cmdgen/set-v2c.py
@@ -1,20 +1,22 @@
-#
-# Command Generator
-#
-# Send SNMP SET request using the following options:
-#
-# * with SNMPv1, community 'public'
-# * using Asyncio framework for network transport
-# * over IPv4/UDP
-# * to an Agent at 195.218.195.228:161
-# * for OIDs in tuple form and an integer and string-typed values
-#
-# This script performs similar to the following Net-SNMP command:
-#
-# $ snmpset -v1 -c private -ObentU 195.218.195.228:161 1.3.6.1.2.1.1.9.1.3.1 s 'my value' 1.3.6.1.2.1.1.9.1.4.1 t 123
-#
-# Requires Python 3.4 and later!
-#
+"""
+SET string and integer scalars
+++++++++++++++++++++++++++++++
+
+Send SNMP SET request using the following options:
+
+* with SNMPv1, community 'public'
+* using Asyncio framework for network transport
+* over IPv4/UDP
+* to an Agent at 195.218.195.228:161
+* for OIDs in tuple form and an integer and string-typed values
+
+This script performs similar to the following Net-SNMP command:
+
+| $ snmpset -v1 -c private -ObentU 195.218.195.228:161 1.3.6.1.2.1.1.9.1.3.1 s 'my value' 1.3.6.1.2.1.1.9.1.4.1 t 123
+
+Requires Python 3.4 and later!
+
+"""#
from pysnmp.carrier.asyncio.dgram import udp
from pysnmp.entity.rfc3413.asyncio import cmdgen
from pysnmp.entity import engine, config