summaryrefslogtreecommitdiff
path: root/pysnmp/smi/mibs/SNMPv2-SMI.py
diff options
context:
space:
mode:
Diffstat (limited to 'pysnmp/smi/mibs/SNMPv2-SMI.py')
-rw-r--r--pysnmp/smi/mibs/SNMPv2-SMI.py99
1 files changed, 74 insertions, 25 deletions
diff --git a/pysnmp/smi/mibs/SNMPv2-SMI.py b/pysnmp/smi/mibs/SNMPv2-SMI.py
index ae48cc3c..40ac6198 100644
--- a/pysnmp/smi/mibs/SNMPv2-SMI.py
+++ b/pysnmp/smi/mibs/SNMPv2-SMI.py
@@ -4,6 +4,11 @@
# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pysnmp/license.html
#
+# ASN.1 source http://mibs.snmplabs.com:80/asn1/SNMPv2-SMI
+# Produced by pysmi-0.4.0 at Sun Feb 17 08:56:38 2019
+#
+# Parts of otherwise autogenerated MIB has been updated manually.
+#
import sys
import traceback
@@ -17,17 +22,37 @@ from pysnmp.smi import error
from pysnmp.smi import exval
from pysnmp.smi.indices import OidOrderedDict
-Integer, ObjectIdentifier = mibBuilder.importSymbols(
- "ASN1", "Integer", "ObjectIdentifier"
-)
+if 'mibBuilder' not in globals():
+ import sys
-(ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint,
- ValueRangeConstraint, ValueSizeConstraint) = mibBuilder.importSymbols(
- "ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion",
- "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint"
-)
+ sys.stderr.write(__doc__)
+ sys.exit(1)
+
+# ASN.1 types
+
+(Integer,
+ OctetString,
+ ObjectIdentifier) = mibBuilder.importSymbols(
+ "ASN1",
+ "Integer",
+ "OctetString",
+ "ObjectIdentifier")
+
+# ASN.1 harness
+
+(ConstraintsIntersection,
+ SingleValueConstraint,
+ ValueRangeConstraint,
+ ValueSizeConstraint,
+ ConstraintsUnion) = mibBuilder.importSymbols(
+ "ASN1-REFINEMENT",
+ "ConstraintsIntersection",
+ "SingleValueConstraint",
+ "ValueRangeConstraint",
+ "ValueSizeConstraint",
+ "ConstraintsUnion")
-# syntax of objects
+# SNMP types
OctetString = rfc1902.OctetString
Bits = rfc1902.Bits
@@ -3362,22 +3387,46 @@ snmpProxys = MibIdentifier(snmpV2.name + (2,))
snmpModules = MibIdentifier(snmpV2.name + (3,))
mibBuilder.exportSymbols(
- 'SNMPv2-SMI', MibNode=MibNode,
- Integer32=Integer32, Bits=Bits, IpAddress=IpAddress,
- Counter32=Counter32, Gauge32=Gauge32, Unsigned32=Unsigned32,
- TimeTicks=TimeTicks, Opaque=Opaque, Counter64=Counter64,
- ExtUTCTime=ExtUTCTime,
- ModuleIdentity=ModuleIdentity, ObjectIdentity=ObjectIdentity,
- NotificationType=NotificationType, MibScalar=MibScalar,
- MibScalarInstance=MibScalarInstance,
- MibIdentifier=MibIdentifier, MibTree=MibTree,
- MibTableColumn=MibTableColumn, MibTableRow=MibTableRow,
- MibTable=MibTable, zeroDotZero=zeroDotZero,
- itu_t=itu_t, iso=iso, org=org, dod=dod,
- internet=internet, directory=directory, mgmt=mgmt, mib_2=mib_2,
- transmission=transmission, experimental=experimental, private=private,
- enterprises=enterprises, security=security, snmpV2=snmpV2,
- snmpDomains=snmpDomains, snmpProxys=snmpProxys, snmpModules=snmpModules
+ "SNMPv2-SMI",
+ **{"MibNode": MibNode,
+ "Integer32": Integer32,
+ "Bits": Bits,
+ "IpAddress": IpAddress,
+ "Counter32": Counter32,
+ "Gauge32": Gauge32,
+ "Unsigned32": Unsigned32,
+ "TimeTicks": TimeTicks,
+ "Opaque": Opaque,
+ "Counter64": Counter64,
+ "ExtUTCTime": ExtUTCTime,
+ "ModuleIdentity": ModuleIdentity,
+ "ObjectIdentity": ObjectIdentity,
+ "NotificationType": NotificationType,
+ "MibScalar": MibScalar,
+ "MibScalarInstance": MibScalarInstance,
+ "MibIdentifier": MibIdentifier,
+ "MibTree": MibTree,
+ "MibTableColumn": MibTableColumn,
+ "MibTableRow": MibTableRow,
+ "MibTable": MibTable,
+ "zeroDotZero": zeroDotZero,
+ "itu_t": itu_t,
+ "iso": iso,
+ "org": org,
+ "dod": dod,
+ "internet": internet,
+ "directory": directory,
+ "mgmt": mgmt,
+ "mib-2": mib_2,
+ "transmission": transmission,
+ "experimental": experimental,
+ "private": private,
+ "enterprises": enterprises,
+ "security": security,
+ "snmpV2": snmpV2,
+ "snmpDomains": snmpDomains,
+ "snmpProxys": snmpProxys,
+ "snmpModules": snmpModules}
)
# XXX