Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / test / mibs / LIBSMI-TEST-010-MIB
1 LIBSMI-TEST-010-MIB DEFINITIONS ::= BEGIN
2
3 IMPORTS
4     MODULE-IDENTITY, OBJECT-TYPE
5         FROM SNMPv2-SMI
6     TEXTUAL-CONVENTION
7         FROM SNMPv2-TC
8     OBJECT-GROUP, MODULE-COMPLIANCE
9         FROM SNMPv2-CONF
10     testMib
11         FROM LIBSMI-TEST-MIB;
12
13 libsmiTest010Mib MODULE-IDENTITY
14     LAST-UPDATED    "200011081000Z"
15     ORGANIZATION    
16             "TU Braunschweig"
17     CONTACT-INFO    
18             "        Frank Strauss
19              
20              Postal: TU Braunschweig
21                      Bueltenweg 74/75
22                      38106 Braunschweig
23                      Germany
24              
25               Phone: +49 531 391-3283
26               EMail: strauss@ibr.cs.tu-bs.de
27                http://www.ibr.cs.tu-bs.de/~strauss/"
28     DESCRIPTION     
29             "This MIB module contains one or more intentional errors,
30              and/or unusual contents. Its only purpose is to check
31              the abilities of MIB parsers to detect these circumstances.
32              
33              This MIB module is orginally written in SMIv2 format.
34              
35              The MIB parser should complain about improper subtyping.
36
37              The libsmi parser is expected to report:
38 LIBSMI-TEST-010-MIB:68: warning: first bit (bit zero) has no name assigned
39 LIBSMI-TEST-010-MIB:81: illegal size restriction for non-octet-string parent type `EnumTcTest1'
40 LIBSMI-TEST-010-MIB:89: illegal range restriction for non-numerical parent type `EnumTcTest1'
41 LIBSMI-TEST-010-MIB:97: illegal size restriction for non-octet-string parent type `BitsTcTest1'
42 LIBSMI-TEST-010-MIB:105: illegal range restriction for non-numerical parent type `BitsTcTest1'
43 LIBSMI-TEST-010-MIB:113: illegal enumeration or bits restriction for non-enumeration-or-bits parent type `OctetsStringTcTest1'
44 LIBSMI-TEST-010-MIB:58: warning: current type `EnumTcTest1' is not referenced in this module
45 LIBSMI-TEST-010-MIB:64: warning: current type `BitsTcTest1' is not referenced in this module
46 LIBSMI-TEST-010-MIB:70: warning: current type `OctetsStringTcTest1' is not referenced in this module
47 LIBSMI-TEST-010-MIB:70: warning: type `OctetsStringTcTest1' has no format specification
48             "
49     REVISION        "200011081000Z"
50     DESCRIPTION     
51             "Initial Revision."
52     ::= { testMib 10 }
53
54 --
55 -- Some valid TC definitions:
56 --
57
58 EnumTcTest1 ::= TEXTUAL-CONVENTION
59     STATUS      current
60     DESCRIPTION
61         "Valid enumeration."
62     SYNTAX INTEGER { red(1), green(2), blue(3) }
63
64 BitsTcTest1 ::= TEXTUAL-CONVENTION
65     STATUS      current
66     DESCRIPTION
67         "Valid bits enumeration."
68     SYNTAX BITS { red(1), green(2), blue(3) }
69
70 OctetsStringTcTest1 ::= TEXTUAL-CONVENTION
71     STATUS      current
72     DESCRIPTION
73         "Valid octet string size restriction."
74     SYNTAX OCTET STRING (SIZE (16))
75
76 --
77 -- Test cases for improper subtyping of TCs:
78 --
79
80 test1 OBJECT-TYPE
81     SYNTAX      EnumTcTest1 (SIZE (15))
82     MAX-ACCESS  read-only
83     STATUS      current
84     DESCRIPTION
85         "Invalid size restriction on an enumeration."
86     ::= { libsmiTest010Mib 1 }
87
88 test2 OBJECT-TYPE
89     SYNTAX      EnumTcTest1 (0..31)
90     MAX-ACCESS  read-only
91     STATUS      current
92     DESCRIPTION
93         "Invalid size restriction on an enumeration."
94     ::= { libsmiTest010Mib 2 }
95
96 test3 OBJECT-TYPE
97     SYNTAX      BitsTcTest1 (SIZE (15))
98     MAX-ACCESS  read-only
99     STATUS      current
100     DESCRIPTION
101         "Invalid size restriction on a bits enumeration."
102     ::= { libsmiTest010Mib 3 }
103
104 test4 OBJECT-TYPE
105     SYNTAX      BitsTcTest1 (0..31)
106     MAX-ACCESS  read-only
107     STATUS      current
108     DESCRIPTION
109         "Invalid size restriction on a bits enumeration."
110     ::= { libsmiTest010Mib 4 }
111
112 test5 OBJECT-TYPE
113     SYNTAX      OctetsStringTcTest1 { red(1) }
114     MAX-ACCESS  read-only
115     STATUS      current
116     DESCRIPTION
117         "Invalid enumeration restriction on an octet string."
118     ::= { libsmiTest010Mib 5 }
119
120 --
121 -- Conformance statements.
122 --
123
124 libsmiTest010Group OBJECT-GROUP
125     OBJECTS
126         { test1, test2, test3, test4, test5 }
127     STATUS      current
128     DESCRIPTION
129         "All object types."
130     ::= { libsmiTest010Mib 6 }
131
132 libsmiTest010Compliance MODULE-COMPLIANCE
133     STATUS      current
134     DESCRIPTION
135         "All object types."
136     MODULE      -- this module
137         MANDATORY-GROUPS { libsmiTest010Group }
138     ::= { libsmiTest010Mib 7 }
139
140 END