File: RFC1155-SMI.py

package info (click to toggle)
python-pysnmp4 4.1.9a-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,068 kB
  • ctags: 1,969
  • sloc: python: 10,608; sh: 44; makefile: 10
file content (63 lines) | stat: -rw-r--r-- 1,912 bytes parent folder | download | duplicates (2)
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
62
63
# PySNMP SMI module. Autogenerated from smidump -f python RFC1155-SMI
# by libsmi2pysnmp-0.0.7-alpha at Thu Nov 16 19:01:40 2006,
# Python version (2, 4, 3, '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)
    fixedLength = 4
    pass

class NetworkAddress(IpAddress):
    pass

class ObjectName(ObjectIdentifier):
    pass

class Opaque(OctetString):
    pass

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


# Objects

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", internet=internet, directory=directory, mgmt=mgmt, experimental=experimental, private=private, enterprises=enterprises)