blob: b73a03903ba42f70a7154dda71391606bfb47ae8 [file] [log] [blame]
Thomas Vachuska8ca75a22017-08-24 16:12:59 -07001module 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-extensions { prefix oc-ext; }
11
12
13 // meta
14 organization "OpenConfig working group";
15
16 contact
17 "OpenConfig working group
18 www.openconfig.net";
19
20 description
21 "This module defines data types (e.g., YANG identities)
22 to support the OpenConfig component inventory model.";
23
24 oc-ext:openconfig-version "0.6.0";
25
26 revision "2017-08-16" {
27 description
28 "Added power state enumerated type";
29 reference "0.6.0";
30 }
31
32 revision "2016-12-22" {
33 description
34 "Added temperature state variable to component";
35 reference "0.5.0";
36 }
37
38 // grouping statements
39
40 grouping avg-min-max-instant-stats-precision1-celsius {
41 description
42 "Common grouping for recording temperature values in
43 Celsius with 1 decimal precision. Values include the
44 instantaneous, average, minimum, and maximum statistics";
45
46 leaf instant {
47 type decimal64 {
48 fraction-digits 1;
49 }
50 units celsius;
51 description
52 "The instantaneous value of the statistic.";
53 }
54
55 leaf avg {
56 type decimal64 {
57 fraction-digits 1;
58 }
59 units celsius;
60 description
61 "The arithmetic mean value of the statistic over the
62 sampling period.";
63 }
64
65 leaf min {
66 type decimal64 {
67 fraction-digits 1;
68 }
69 units celsius;
70 description
71 "The minimum value of the statistic over the sampling
72 period";
73 }
74
75 leaf max {
76 type decimal64 {
77 fraction-digits 1;
78 }
79 units celsius;
80 description
81 "The maximum value of the statistic over the sampling
82 period";
83 }
84 }
85
86 // identity statements
87
88 identity OPENCONFIG_HARDWARE_COMPONENT {
89 description
90 "Base identity for hardware related components in a managed
91 device. Derived identities are partially based on contents
92 of the IANA Entity MIB.";
93 reference
94 "IANA Entity MIB and RFC 6933";
95 }
96
97
98 identity OPENCONFIG_SOFTWARE_COMPONENT {
99 description
100 "Base identity for software-related components in a managed
101 device";
102 }
103
104 // hardware types
105
106 identity CHASSIS {
107 base OPENCONFIG_HARDWARE_COMPONENT;
108 description
109 "Chassis component, typically with multiple slots / shelves";
110 }
111
112 identity BACKPLANE {
113 base OPENCONFIG_HARDWARE_COMPONENT;
114 description
115 "Backplane component for aggregating traffic, typically
116 contained in a chassis component";
117 }
118
119 identity POWER_SUPPLY {
120 base OPENCONFIG_HARDWARE_COMPONENT;
121 description
122 "Component that is supplying power to the device";
123 }
124
125 identity FAN {
126 base OPENCONFIG_HARDWARE_COMPONENT;
127 description
128 "Cooling fan, or could be some other heat-reduction component";
129 }
130
131 identity SENSOR {
132 base OPENCONFIG_HARDWARE_COMPONENT;
133 description
134 "Physical sensor, e.g., a temperature sensor in a chassis";
135 }
136
137 identity MODULE {
138 base OPENCONFIG_HARDWARE_COMPONENT;
139 description
140 "Replaceable hardware module, e.g., a daughtercard";
141 }
142
143 identity LINECARD {
144 base OPENCONFIG_HARDWARE_COMPONENT;
145 description
146 "Linecard component, typically inserted into a chassis slot";
147 }
148
149 identity PORT {
150 base OPENCONFIG_HARDWARE_COMPONENT;
151 description
152 "Physical port, e.g., for attaching pluggables and networking
153 cables";
154 }
155
156 identity TRANSCEIVER {
157 base OPENCONFIG_HARDWARE_COMPONENT;
158 description
159 "Pluggable module present in a port";
160 }
161
162 identity CPU {
163 base OPENCONFIG_HARDWARE_COMPONENT;
164 description
165 "Processing unit, e.g., a management processor";
166 }
167
168 identity OPERATING_SYSTEM {
169 base OPENCONFIG_SOFTWARE_COMPONENT;
170 description
171 "Operating system running on a component";
172 }
173
174 // typedef statements
175
176 typedef component-power-type {
177 type enumeration {
178 enum POWER_ENABLED {
179 description
180 "Enable power on the component";
181 }
182 enum POWER_DISABLED {
183 description
184 "Disable power on the component";
185 }
186 }
187 description
188 "A generic type reflecting whether a hardware component
189 is powered on or off";
190 }
191
192}