summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorelie <elie>2013-03-15 15:22:19 +0000
committerelie <elie>2013-03-15 15:22:19 +0000
commitedaa6fbdaa529b81f7c33d180cf29d4e1f65fe41 (patch)
tree7038263d4955187852cbde6d67403449c4e5d0a2 /examples
parent41d44fc0e78358feaeb012a667dd5e32584bcda6 (diff)
downloadpysnmp-edaa6fbdaa529b81f7c33d180cf29d4e1f65fe41.tar.gz
cosmetic changes to Native API's GET/SET example scripts
Diffstat (limited to 'examples')
-rw-r--r--examples/v3arch/manager/cmdgen/get-v1.py6
-rw-r--r--examples/v3arch/manager/cmdgen/get-v2c-custom-timeout.py6
-rw-r--r--examples/v3arch/manager/cmdgen/get-v3-custom-context.py6
-rw-r--r--examples/v3arch/manager/cmdgen/get-v3.py6
-rw-r--r--examples/v3arch/manager/cmdgen/set-v1.py6
-rw-r--r--examples/v3arch/manager/cmdgen/set-v2c.py6
-rw-r--r--examples/v3arch/manager/cmdgen/set-v3.py6
7 files changed, 21 insertions, 21 deletions
diff --git a/examples/v3arch/manager/cmdgen/get-v1.py b/examples/v3arch/manager/cmdgen/get-v1.py
index fbe6bc6..cea8a7c 100644
--- a/examples/v3arch/manager/cmdgen/get-v1.py
+++ b/examples/v3arch/manager/cmdgen/get-v1.py
@@ -48,7 +48,7 @@ config.addTargetAddr(
# Error/response reciever
def cbFun(sendRequestHandle,
errorIndication, errorStatus, errorIndex,
- varBindTable, cbCtx):
+ varBinds, cbCtx):
if errorIndication:
print(errorIndication)
# SNMPv1 response may contain noSuchName error *and* SNMPv2c exception,
@@ -56,11 +56,11 @@ def cbFun(sendRequestHandle,
elif errorStatus and errorStatus != 2:
print('%s at %s' % (
errorStatus.prettyPrint(),
- errorIndex and varBindTable[-1][int(errorIndex)-1] or '?'
+ errorIndex and varBinds[-1][int(errorIndex)-1] or '?'
)
)
else:
- for oid, val in varBindTable:
+ for oid, val in varBinds:
print('%s = %s' % (oid.prettyPrint(), val.prettyPrint()))
# Prepare and send a request message
diff --git a/examples/v3arch/manager/cmdgen/get-v2c-custom-timeout.py b/examples/v3arch/manager/cmdgen/get-v2c-custom-timeout.py
index 3ca7e59..1aac2e4 100644
--- a/examples/v3arch/manager/cmdgen/get-v2c-custom-timeout.py
+++ b/examples/v3arch/manager/cmdgen/get-v2c-custom-timeout.py
@@ -51,7 +51,7 @@ config.addTargetAddr(
# Error/response reciever
def cbFun(sendRequestHandle,
errorIndication, errorStatus, errorIndex,
- varBindTable, cbCtx):
+ varBinds, cbCtx):
if errorIndication:
print(errorIndication)
# SNMPv1 response may contain noSuchName error *and* SNMPv2c exception,
@@ -59,11 +59,11 @@ def cbFun(sendRequestHandle,
elif errorStatus and errorStatus != 2:
print('%s at %s' % (
errorStatus.prettyPrint(),
- errorIndex and varBindTable[-1][int(errorIndex)-1] or '?'
+ errorIndex and varBinds[-1][int(errorIndex)-1] or '?'
)
)
else:
- for oid, val in varBindTable:
+ for oid, val in varBinds:
print('%s = %s' % (oid.prettyPrint(), val.prettyPrint()))
# Prepare and send a request message
diff --git a/examples/v3arch/manager/cmdgen/get-v3-custom-context.py b/examples/v3arch/manager/cmdgen/get-v3-custom-context.py
index d6861ca..98e9a89 100644
--- a/examples/v3arch/manager/cmdgen/get-v3-custom-context.py
+++ b/examples/v3arch/manager/cmdgen/get-v3-custom-context.py
@@ -52,17 +52,17 @@ config.addTargetAddr(
# Error/response reciever
def cbFun(sendRequestHandle,
errorIndication, errorStatus, errorIndex,
- varBindTable, cbCtx):
+ varBinds, cbCtx):
if errorIndication:
print(errorIndication)
elif errorStatus:
print('%s at %s' % (
errorStatus.prettyPrint(),
- errorIndex and varBindTable[-1][int(errorIndex)-1] or '?'
+ errorIndex and varBinds[-1][int(errorIndex)-1] or '?'
)
)
else:
- for oid, val in varBindTable:
+ for oid, val in varBinds:
print('%s = %s' % (oid.prettyPrint(), val.prettyPrint()))
# Prepare and send a request message, pass custom ContextEngineId & ContextName
diff --git a/examples/v3arch/manager/cmdgen/get-v3.py b/examples/v3arch/manager/cmdgen/get-v3.py
index bc38748..f251c3d 100644
--- a/examples/v3arch/manager/cmdgen/get-v3.py
+++ b/examples/v3arch/manager/cmdgen/get-v3.py
@@ -50,17 +50,17 @@ config.addTargetAddr(
# Error/response reciever
def cbFun(sendRequestHandle,
errorIndication, errorStatus, errorIndex,
- varBindTable, cbCtx):
+ varBinds, cbCtx):
if errorIndication:
print(errorIndication)
elif errorStatus:
print('%s at %s' % (
errorStatus.prettyPrint(),
- errorIndex and varBindTable[-1][int(errorIndex)-1] or '?'
+ errorIndex and varBinds[-1][int(errorIndex)-1] or '?'
)
)
else:
- for oid, val in varBindTable:
+ for oid, val in varBinds:
print('%s = %s' % (oid.prettyPrint(), val.prettyPrint()))
# Prepare and send a request message
diff --git a/examples/v3arch/manager/cmdgen/set-v1.py b/examples/v3arch/manager/cmdgen/set-v1.py
index 923befc..695d993 100644
--- a/examples/v3arch/manager/cmdgen/set-v1.py
+++ b/examples/v3arch/manager/cmdgen/set-v1.py
@@ -49,7 +49,7 @@ config.addTargetAddr(
# Error/response reciever
def cbFun(sendRequestHandle,
errorIndication, errorStatus, errorIndex,
- varBindTable, cbCtx):
+ varBinds, cbCtx):
if errorIndication:
print(errorIndication)
# SNMPv1 response may contain noSuchName error *and* SNMPv2c exception,
@@ -57,11 +57,11 @@ def cbFun(sendRequestHandle,
elif errorStatus and errorStatus != 2:
print('%s at %s' % (
errorStatus.prettyPrint(),
- errorIndex and varBindTable[-1][int(errorIndex)-1] or '?'
+ errorIndex and varBinds[-1][int(errorIndex)-1] or '?'
)
)
else:
- for oid, val in varBindTable:
+ for oid, val in varBinds:
print('%s = %s' % (oid.prettyPrint(), val.prettyPrint()))
# Prepare and send a request message
diff --git a/examples/v3arch/manager/cmdgen/set-v2c.py b/examples/v3arch/manager/cmdgen/set-v2c.py
index cd3b5d0..5b71c4b 100644
--- a/examples/v3arch/manager/cmdgen/set-v2c.py
+++ b/examples/v3arch/manager/cmdgen/set-v2c.py
@@ -49,17 +49,17 @@ config.addTargetAddr(
# Error/response reciever
def cbFun(sendRequestHandle,
errorIndication, errorStatus, errorIndex,
- varBindTable, cbCtx):
+ varBinds, cbCtx):
if errorIndication:
print(errorIndication)
elif errorStatus:
print('%s at %s' % (
errorStatus.prettyPrint(),
- errorIndex and varBindTable[-1][int(errorIndex)-1] or '?'
+ errorIndex and varBinds[-1][int(errorIndex)-1] or '?'
)
)
else:
- for oid, val in varBindTable:
+ for oid, val in varBinds:
print('%s = %s' % (oid.prettyPrint(), val.prettyPrint()))
# Prepare and send a request message
diff --git a/examples/v3arch/manager/cmdgen/set-v3.py b/examples/v3arch/manager/cmdgen/set-v3.py
index de25b30..1148f1e 100644
--- a/examples/v3arch/manager/cmdgen/set-v3.py
+++ b/examples/v3arch/manager/cmdgen/set-v3.py
@@ -50,17 +50,17 @@ config.addTargetAddr(
# Error/response reciever
def cbFun(sendRequestHandle,
errorIndication, errorStatus, errorIndex,
- varBindTable, cbCtx):
+ varBinds, cbCtx):
if errorIndication:
print(errorIndication)
elif errorStatus:
print('%s at %s' % (
errorStatus.prettyPrint(),
- errorIndex and varBindTable[-1][int(errorIndex)-1] or '?'
+ errorIndex and varBinds[-1][int(errorIndex)-1] or '?'
)
)
else:
- for oid, val in varBindTable:
+ for oid, val in varBinds:
print('%s = %s' % (oid.prettyPrint(), val.prettyPrint()))
# Prepare and send a request message