summaryrefslogtreecommitdiff
path: root/pysnmp
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2019-08-05 10:24:57 +0200
committerIlya Etingof <etingof@gmail.com>2019-08-05 10:24:57 +0200
commit7fdb4132b5996b02509ed0f1f66de7aeb57ad05a (patch)
tree72f0ae05cb1625cf9b32bc89f995bdc3b399fd24 /pysnmp
parent17a63974eb7df7eb47f822f32a05afd1081b8c06 (diff)
downloadpysnmp-git-7fdb4132b5996b02509ed0f1f66de7aeb57ad05a.tar.gz
Fix malformed OBJECT-TYPE MAX-ACCESS constants
Diffstat (limited to 'pysnmp')
-rw-r--r--pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.py2
-rw-r--r--pysnmp/smi/mibs/SNMPv2-SMI.py12
2 files changed, 7 insertions, 7 deletions
diff --git a/pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.py b/pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.py
index 6deba234..4cf64858 100644
--- a/pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.py
+++ b/pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.py
@@ -210,7 +210,7 @@ vacmContextStatus = _VacmContextStatus_Object(
(1, 3, 6, 1, 6, 3, 16, 1, 1, 1, 2),
_VacmContextStatus_Type()
)
-vacmContextStatus.setMaxAccess("readcreate")
+vacmContextStatus.setMaxAccess("read-create")
if mibBuilder.loadTexts:
vacmContextStatus.setStatus('current')
if mibBuilder.loadTexts:
diff --git a/pysnmp/smi/mibs/SNMPv2-SMI.py b/pysnmp/smi/mibs/SNMPv2-SMI.py
index 35e24635..a328ad12 100644
--- a/pysnmp/smi/mibs/SNMPv2-SMI.py
+++ b/pysnmp/smi/mibs/SNMPv2-SMI.py
@@ -1096,7 +1096,7 @@ class MibScalar(ManagedMibObject):
|
+-----MibScalarInstance
"""
- maxAccess = 'readonly'
+ maxAccess = 'read-only'
_suffix = (0,)
@@ -1195,7 +1195,7 @@ class MibScalar(ManagedMibObject):
acFun = context.get('acFun')
if acFun:
- if (self.maxAccess not in ('readonly', 'readwrite', 'readcreate') or
+ if (self.maxAccess not in ('read-only', 'read-write', 'read-create') or
acFun('read', (name, self.syntax), **context)):
cbFun((name, exval.noSuchInstance), **context)
return
@@ -1259,7 +1259,7 @@ class MibScalar(ManagedMibObject):
acFun = context.get('acFun')
if acFun:
- if (self.maxAccess not in ('readonly', 'readwrite', 'readcreate') or
+ if (self.maxAccess not in ('read-only', 'read-write', 'read-create') or
acFun('read', (name, self.syntax), **context)):
nextName = context.get('nextName')
if nextName:
@@ -1328,7 +1328,7 @@ class MibScalar(ManagedMibObject):
acFun = context.get('acFun')
if acFun:
- if (self.maxAccess not in ('readwrite', 'readcreate') or
+ if (self.maxAccess not in ('read-write', 'read-create') or
acFun('write', (name, self.syntax), **context)):
exc = error.NotWritableError(name=name, idx=context.get('idx'))
cbFun = context['cbFun']
@@ -1397,7 +1397,7 @@ class MibScalar(ManagedMibObject):
acFun = context.get('acFun')
if acFun:
- if self.maxAccess != 'readcreate' or acFun('write', varBind, **context):
+ if self.maxAccess != 'read-create' or acFun('write', varBind, **context):
debug.logger & debug.FLAG_ACL and debug.logger(
'createTest: %s=%r %s at %s' % (name, val, self.maxAccess, self.name))
exc = error.NoCreationError(name=name, idx=context.get('idx'))
@@ -2245,7 +2245,7 @@ class MibTableColumn(MibScalar, ObjectType):
acFun = context.get('acFun')
if acFun:
- if self.maxAccess != 'readcreate' or acFun('write', varBind, **context):
+ if self.maxAccess != 'read-create' or acFun('write', varBind, **context):
debug.logger & debug.FLAG_ACL and debug.logger(
'destroyTest: %s=%r %s at %s' % (name, val, self.maxAccess, self.name))
exc = error.NotWritableError(name=name, idx=context.get('idx'))