blob: a9974396449d304bf859f138b56635c914649984 [file] [log] [blame]
hiroki096259b2018-12-07 09:33:24 -08001module openconfig-platform-types {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/platform-types";
7
8 prefix "oc-platform-types";
9
10 import openconfig-types { prefix oc-types; }
11 import openconfig-extensions { prefix oc-ext; }
12
13
14 // meta
15 organization "OpenConfig working group";
16
17 contact
18 "OpenConfig working group
19 www.openconfig.net";
20
21 description
22 "This module defines data types (e.g., YANG identities)
23 to support the OpenConfig component inventory model.";
24
25 oc-ext:openconfig-version "0.9.0";
26
27 revision "2018-05-05" {
28 description
29 "Added min-max-time to
30 avg-min-max-instant-stats-precision1-celsius,
31 added new CONTROLLER_CARD identity";
32 reference "0.9.0";
33 }
34
35 revision "2018-01-16" {
36 description
37 "Added new per-component common data; add temp alarm";
38 reference "0.8.0";
39 }
40
41 revision "2017-12-14" {
42 description
43 "Added anchor containers for component data, added new
44 component types";
45 reference "0.7.0";
46 }
47
48 revision "2017-08-16" {
49 description
50 "Added power state enumerated type";
51 reference "0.6.0";
52 }
53
54 revision "2016-12-22" {
55 description
56 "Added temperature state variable to component";
57 reference "0.5.0";
58 }
59
60 // grouping statements
61
62
63 grouping avg-min-max-instant-stats-precision1-celsius {
64 description
65 "Common grouping for recording temperature values in
66 Celsius with 1 decimal precision. Values include the
67 instantaneous, average, minimum, and maximum statistics";
68
69 leaf instant {
70 type decimal64 {
71 fraction-digits 1;
72 }
73 units celsius;
74 description
75 "The instantaneous value of the statistic.";
76 }
77
78 leaf avg {
79 type decimal64 {
80 fraction-digits 1;
81 }
82 units celsius;
83 description
84 "The arithmetic mean value of the statistic over the
85 sampling period.";
86 }
87
88 leaf min {
89 type decimal64 {
90 fraction-digits 1;
91 }
92 units celsius;
93 description
94 "The minimum value of the statistic over the sampling
95 period";
96 }
97
98 leaf max {
99 type decimal64 {
100 fraction-digits 1;
101 }
102 units celsius;
103 description
104 "The maximum value of the statistic over the sampling
105 period";
106 }
107
108 uses oc-types:stat-interval-state;
109 uses oc-types:min-max-time;
110 }
111
112 // identity statements
113
114 identity OPENCONFIG_HARDWARE_COMPONENT {
115 description
116 "Base identity for hardware related components in a managed
117 device. Derived identities are partially based on contents
118 of the IANA Entity MIB.";
119 reference
120 "IANA Entity MIB and RFC 6933";
121 }
122
123
124 identity OPENCONFIG_SOFTWARE_COMPONENT {
125 description
126 "Base identity for software-related components in a managed
127 device";
128 }
129
130 // hardware types
131
132 identity CHASSIS {
133 base OPENCONFIG_HARDWARE_COMPONENT;
134 description
135 "Chassis component, typically with multiple slots / shelves";
136 }
137
138 identity BACKPLANE {
139 base OPENCONFIG_HARDWARE_COMPONENT;
140 description
141 "Backplane component for aggregating traffic, typically
142 contained in a chassis component";
143 }
144
145 identity FABRIC {
146 base OPENCONFIG_HARDWARE_COMPONENT;
147 description
148 "Interconnect between ingress and egress ports on the
149 device (e.g., a crossbar switch).";
150 }
151
152 identity POWER_SUPPLY {
153 base OPENCONFIG_HARDWARE_COMPONENT;
154 description
155 "Component that is supplying power to the device";
156 }
157
158 identity FAN {
159 base OPENCONFIG_HARDWARE_COMPONENT;
160 description
161 "Cooling fan, or could be some other heat-reduction component";
162 }
163
164 identity SENSOR {
165 base OPENCONFIG_HARDWARE_COMPONENT;
166 description
167 "Physical sensor, e.g., a temperature sensor in a chassis";
168 }
169
170 identity FRU {
171 base OPENCONFIG_HARDWARE_COMPONENT;
172 description
173 "Replaceable hardware component that does not have a more
174 specific defined schema.";
175 }
176
177 identity LINECARD {
178 base OPENCONFIG_HARDWARE_COMPONENT;
179 description
180 "Linecard component, typically inserted into a chassis slot";
181 }
182
183 identity CONTROLLER_CARD {
184 base OPENCONFIG_HARDWARE_COMPONENT;
185 description
186 "A type of linecard whose primary role is management or control
187 rather than data forwarding.";
188 }
189
190 identity PORT {
191 base OPENCONFIG_HARDWARE_COMPONENT;
192 description
193 "Physical port, e.g., for attaching pluggables and networking
194 cables";
195 }
196
197 identity TRANSCEIVER {
198 base OPENCONFIG_HARDWARE_COMPONENT;
199 description
200 "Pluggable module present in a port";
201 }
202
203 identity CPU {
204 base OPENCONFIG_HARDWARE_COMPONENT;
205 description
206 "Processing unit, e.g., a management processor";
207 }
208
209 identity STORAGE {
210 base OPENCONFIG_HARDWARE_COMPONENT;
211 description
212 "A storage subsystem on the device (disk, SSD, etc.)";
213 }
214
215 identity INTEGRATED_CIRCUIT {
216 base OPENCONFIG_HARDWARE_COMPONENT;
217 description
218 "A special purpose processing unit, typically for traffic
219 switching/forwarding (e.g., switching ASIC, NPU, forwarding
220 chip, etc.)";
221 }
222
223 identity OPERATING_SYSTEM {
224 base OPENCONFIG_SOFTWARE_COMPONENT;
225 description
226 "Operating system running on a component";
227 }
228
229
230 identity COMPONENT_OPER_STATUS {
231 description
232 "Current operational status of a platform component";
233 }
234
235 identity ACTIVE {
236 base COMPONENT_OPER_STATUS;
237 description
238 "Component is enabled and active (i.e., up)";
239 }
240
241 identity INACTIVE {
242 base COMPONENT_OPER_STATUS;
243 description
244 "Component is enabled but inactive (i.e., down)";
245 }
246
247 identity DISABLED {
248 base COMPONENT_OPER_STATUS;
249 description
250 "Component is administratively disabled.";
251 }
252
253 // typedef statements
254
255 typedef component-power-type {
256 type enumeration {
257 enum POWER_ENABLED {
258 description
259 "Enable power on the component";
260 }
261 enum POWER_DISABLED {
262 description
263 "Disable power on the component";
264 }
265 }
266 description
267 "A generic type reflecting whether a hardware component
268 is powered on or off";
269 }
270
271}