File: RFC1155-SMI.py

package info (click to toggle)
python-pysnmp4 4.1.6a-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,016 kB
  • ctags: 1,826
  • sloc: python: 9,809; sh: 60; makefile: 11
file content (61 lines) | stat: -rw-r--r-- 1,926 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# PySNMP SMI module. Autogenerated from smidump -f python RFC1155-SMI
# by libsmi2pysnmp-0.0.4-alpha at Tue Jun 28 11:51:33 2005,
# Python version (2, 4, 0, 'final', 0)

# Imported just in case new ASN.1 types would be created
from pyasn1.type import constraint, namedval

# Manually added
from pysnmp.proto.rfc1155 import NetworkAddress

# Imports

( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
( Bits, Integer32, MibIdentifier, TimeTicks, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "MibIdentifier", "TimeTicks")

# Types

class Counter(Integer32):
    subtypeSpec = Integer32.subtypeSpec+constraint.ValueRangeConstraint(0,4294967295L)
    pass

class Gauge(Integer32):
    subtypeSpec = Integer32.subtypeSpec+constraint.ValueRangeConstraint(0,4294967295L)
    pass

class IpAddress(OctetString):
    subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(4,4)
    pass

class ObjectName(ObjectIdentifier):
    pass

class Opaque(OctetString):
    pass

class TimeTicks(Integer32):
    subtypeSpec = Integer32.subtypeSpec+constraint.ValueRangeConstraint(0,4294967295L)
    pass


# Objects

org = MibIdentifier((1, 3))
dod = MibIdentifier((1, 3, 6))
internet = MibIdentifier((1, 3, 6, 1))
directory = MibIdentifier((1, 3, 6, 1, 1))
mgmt = MibIdentifier((1, 3, 6, 1, 2))
experimental = MibIdentifier((1, 3, 6, 1, 3))
private = MibIdentifier((1, 3, 6, 1, 4))
enterprises = MibIdentifier((1, 3, 6, 1, 4, 1))

# Augmentions

# Exports

# Types
mibBuilder.exportSymbols("RFC1155-SMI", Counter=Counter, Gauge=Gauge, IpAddress=IpAddress, NetworkAddress=NetworkAddress, ObjectName=ObjectName, Opaque=Opaque, TimeTicks=TimeTicks)

# Objects
mibBuilder.exportSymbols("RFC1155-SMI", org=org, dod=dod, internet=internet, directory=directory, mgmt=mgmt, experimental=experimental, private=private, enterprises=enterprises)