Debian Codegraph @

test/mibs/LIBSMI-TEST-008-MIB

raw
1 LIBSMI-TEST-008-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 libsmiTest008Mib MODULE-IDENTITY
14 LAST-UPDATED "200005291500Z"
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: [email protected]
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 sub-typing by
36 checking the rules in RFC 2578 Appendix A and 'oral rules'
37 that are not specified in the SMIv2.
38
39 The libsmi parser is expected to report:
40 LIBSMI-TEST-008-MIB:86: warning: named numbers not in ascending order
41 LIBSMI-TEST-008-MIB:94: warning: named numbers not in ascending order
42 LIBSMI-TEST-008-MIB:133: warning: first bit (bit zero) has no name assigned
43 LIBSMI-TEST-008-MIB:139: warning: first bit (bit zero) has no name assigned
44 LIBSMI-TEST-008-MIB:144: warning: first bit (bit zero) has no name assigned
45 LIBSMI-TEST-008-MIB:144: warning: named numbers not in ascending order
46 LIBSMI-TEST-008-MIB:152: warning: first bit (bit zero) has no name assigned
47 LIBSMI-TEST-008-MIB:152: warning: named numbers not in ascending order
48 LIBSMI-TEST-008-MIB:160: warning: first bit (bit zero) has no name assigned
49 LIBSMI-TEST-008-MIB:168: warning: first bit (bit zero) has no name assigned
50 LIBSMI-TEST-008-MIB:176: warning: first bit (bit zero) has no name assigned
51 LIBSMI-TEST-008-MIB:77: warning: current type `Red' is not referenced in this module
52 LIBSMI-TEST-008-MIB:77: textual convention `Red' can not be derived from the textual convention `Color'
53 LIBSMI-TEST-008-MIB:102: named number `yellow(4)' illegal in sub-type of `Color'
54 LIBSMI-TEST-008-MIB:110: named number `red(2)' illegal in sub-type of `Color'
55 LIBSMI-TEST-008-MIB:118: named number `rot(1)' illegal in sub-type of `Color'
56 LIBSMI-TEST-008-MIB:135: warning: current type `FileAccess' is not referenced in this module
57 LIBSMI-TEST-008-MIB:135: textual convention `FileAccess' can not be derived from the textual convention `Access'
58 LIBSMI-TEST-008-MIB:160: named number `create' illegal in sub-type of `Access'
59 LIBSMI-TEST-008-MIB:168: named number `read' illegal in sub-type of `Access'
60 LIBSMI-TEST-008-MIB:176: named number `lesen' illegal in sub-type of `Access'
61 "
62 REVISION "200005291500Z"
63 DESCRIPTION
64 "Initial Revision."
65 ::= { testMib 8 }
66
67 --
68 -- Test cases for enumeration sub-typing:
69 --
70
71 Color ::= TEXTUAL-CONVENTION
72 STATUS current
73 DESCRIPTION
74 "."
75 SYNTAX INTEGER { red(1), green(2), blue(3) }
76
77 Red ::= TEXTUAL-CONVENTION
78 STATUS current
79 DESCRIPTION
80 "."
81 SYNTAX Color { red(1) }
82
83 enumTests OBJECT IDENTIFIER ::= { libsmiTest008Mib 1 }
84
85 enumTest1 OBJECT-TYPE
86 SYNTAX Color { blue(3), red(1) }
87 MAX-ACCESS read-only
88 STATUS current
89 DESCRIPTION
90 "Valid sub-typing with different order."
91 ::= { enumTests 1 }
92
93 enumTest2 OBJECT-TYPE
94 SYNTAX Color { red(1), blue(3), green(2) }
95 MAX-ACCESS read-only
96 STATUS current
97 DESCRIPTION
98 "Valid, although equivalent to the original type."
99 ::= { enumTests 2 }
100
101 enumTest3 OBJECT-TYPE
102 SYNTAX Color { red(1), yellow(4) }
103 MAX-ACCESS read-only
104 STATUS current
105 DESCRIPTION
106 "Invalid, since yellow(4) is not defined in the base type."
107 ::= { enumTests 3 }
108
109 enumTest4 OBJECT-TYPE
110 SYNTAX Color { red(2) }
111 MAX-ACCESS read-only
112 STATUS current
113 DESCRIPTION
114 "Invalid, since red is defined as 1 and not 2."
115 ::= { enumTests 4 }
116
117 enumTest5 OBJECT-TYPE
118 SYNTAX Color { rot(1) }
119 MAX-ACCESS read-only
120 STATUS current
121 DESCRIPTION
122 "Invalid, since rot is defined as red(1)."
123 ::= { enumTests 5 }
124
125 --
126 -- Test cases for bits sub-typing:
127 --
128
129 Access ::= TEXTUAL-CONVENTION
130 STATUS current
131 DESCRIPTION
132 "junk"
133 SYNTAX BITS { read(1), write(2), execute(3) }
134
135 FileAccess ::= TEXTUAL-CONVENTION
136 STATUS current
137 DESCRIPTION
138 "junk"
139 SYNTAX Access { read(1), write(2) }
140
141 bitsTests OBJECT IDENTIFIER ::= { libsmiTest008Mib 2 }
142
143 bitsTest1 OBJECT-TYPE
144 SYNTAX Access { write(2), read(1) }
145 MAX-ACCESS read-only
146 STATUS current
147 DESCRIPTION
148 "Valid sub-typing with different order."
149 ::= { bitsTests 1 }
150
151 bitsTest2 OBJECT-TYPE
152 SYNTAX Access { write(2), execute(3), read(1) }
153 MAX-ACCESS read-only
154 STATUS current
155 DESCRIPTION
156 "Valid, although equivalent to the original type."
157 ::= { bitsTests 2 }
158
159 bitsTest3 OBJECT-TYPE
160 SYNTAX Access { read(1), create(4) }
161 MAX-ACCESS read-only
162 STATUS current
163 DESCRIPTION
164 "Invalid, since create(4) is not defined in the base type."
165 ::= { bitsTests 3 }
166
167 bitsTest4 OBJECT-TYPE
168 SYNTAX Access { read(2) }
169 MAX-ACCESS read-only
170 STATUS current
171 DESCRIPTION
172 "Invalid, since read is defined as 1 and not 2."
173 ::= { bitsTests 4 }
174
175 bitsTest5 OBJECT-TYPE
176 SYNTAX Access { lesen(1) }
177 MAX-ACCESS read-only
178 STATUS current
179 DESCRIPTION
180 "Invalid, since lesen is defined as red(1)."
181 ::= { bitsTests 5 }
182
183 --
184 -- Conformance statements.
185 --
186
187 libsmiTest008Group OBJECT-GROUP
188 OBJECTS
189 { enumTest1, enumTest2, enumTest3, enumTest4, enumTest5,
190 bitsTest1, bitsTest2, bitsTest3, bitsTest4, bitsTest5 }
191 STATUS current
192 DESCRIPTION
193 "All object types."
194 ::= { libsmiTest008Mib 3 }
195
196 libsmiTest008Compliance MODULE-COMPLIANCE
197 STATUS current
198 DESCRIPTION
199 "All object types."
200 MODULE -- this module
201 MANDATORY-GROUPS { libsmiTest008Group }
202 ::= { libsmiTest008Mib 4 }
203
204 END