aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-platform-types.yang
blob: a9974396449d304bf859f138b56635c914649984 (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
module openconfig-platform-types {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/platform-types";

  prefix "oc-platform-types";

  import openconfig-types { prefix oc-types; }
  import openconfig-extensions { prefix oc-ext; }


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net";

  description
    "This module defines data types (e.g., YANG identities)
    to support the OpenConfig component inventory model.";

  oc-ext:openconfig-version "0.9.0";

  revision "2018-05-05" {
    description
      "Added min-max-time to
      avg-min-max-instant-stats-precision1-celsius,
      added new CONTROLLER_CARD identity";
    reference "0.9.0";
  }

  revision "2018-01-16" {
    description
      "Added new per-component common data; add temp alarm";
    reference "0.8.0";
  }

  revision "2017-12-14" {
    description
      "Added anchor containers for component data, added new
      component types";
    reference "0.7.0";
  }

  revision "2017-08-16" {
    description
      "Added power state enumerated type";
    reference "0.6.0";
  }

  revision "2016-12-22" {
    description
      "Added temperature state variable to component";
    reference "0.5.0";
  }

  // grouping statements


  grouping avg-min-max-instant-stats-precision1-celsius {
    description
      "Common grouping for recording temperature values in
      Celsius with 1 decimal precision. Values include the
      instantaneous, average, minimum, and maximum statistics";

    leaf instant {
      type decimal64 {
        fraction-digits 1;
      }
      units celsius;
      description
        "The instantaneous value of the statistic.";
    }

    leaf avg {
      type decimal64 {
        fraction-digits 1;
      }
      units celsius;
      description
        "The arithmetic mean value of the statistic over the
        sampling period.";
    }

    leaf min {
      type decimal64 {
        fraction-digits 1;
      }
      units celsius;
      description
        "The minimum value of the statistic over the sampling
        period";
    }

    leaf max {
      type decimal64 {
        fraction-digits 1;
      }
      units celsius;
      description
        "The maximum value of the statistic over the sampling
        period";
    }

    uses oc-types:stat-interval-state;
    uses oc-types:min-max-time;
  }

  // identity statements

  identity OPENCONFIG_HARDWARE_COMPONENT {
    description
      "Base identity for hardware related components in a managed
      device.  Derived identities are partially based on contents
      of the IANA Entity MIB.";
    reference
      "IANA Entity MIB and RFC 6933";
  }


  identity OPENCONFIG_SOFTWARE_COMPONENT {
    description
      "Base identity for software-related components in a managed
      device";
  }

  // hardware types

  identity CHASSIS {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "Chassis component, typically with multiple slots / shelves";
  }

  identity BACKPLANE {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "Backplane component for aggregating traffic, typically
      contained in a chassis component";
  }

  identity FABRIC {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "Interconnect between ingress and egress ports on the
      device (e.g., a crossbar switch).";
  }

  identity POWER_SUPPLY {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "Component that is supplying power to the device";
  }

  identity FAN {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "Cooling fan, or could be some other heat-reduction component";
  }

  identity SENSOR {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "Physical sensor, e.g., a temperature sensor in a chassis";
  }

  identity FRU {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "Replaceable hardware component that does not have a more
      specific defined schema.";
  }

  identity LINECARD {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "Linecard component, typically inserted into a chassis slot";
  }

  identity CONTROLLER_CARD {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "A type of linecard whose primary role is management or control
       rather than data forwarding.";
  }

  identity PORT {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "Physical port, e.g., for attaching pluggables and networking
      cables";
  }

  identity TRANSCEIVER {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "Pluggable module present in a port";
  }

  identity CPU {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "Processing unit, e.g., a management processor";
  }

  identity STORAGE {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "A storage subsystem on the device (disk, SSD, etc.)";
  }

  identity INTEGRATED_CIRCUIT {
    base OPENCONFIG_HARDWARE_COMPONENT;
    description
      "A special purpose processing unit, typically for traffic
      switching/forwarding (e.g., switching ASIC, NPU, forwarding
      chip, etc.)";
  }

  identity OPERATING_SYSTEM {
    base OPENCONFIG_SOFTWARE_COMPONENT;
    description
      "Operating system running on a component";
  }


  identity COMPONENT_OPER_STATUS {
    description
      "Current operational status of a platform component";
  }

  identity ACTIVE {
    base COMPONENT_OPER_STATUS;
    description
      "Component is enabled and active (i.e., up)";
  }

  identity INACTIVE {
    base COMPONENT_OPER_STATUS;
    description
      "Component is enabled but inactive (i.e., down)";
  }

  identity DISABLED {
    base COMPONENT_OPER_STATUS;
    description
      "Component is administratively disabled.";
  }

  // typedef statements

  typedef component-power-type {
    type enumeration {
      enum POWER_ENABLED {
        description
          "Enable power on the component";
      }
      enum POWER_DISABLED {
        description
          "Disable power on the component";
      }
    }
    description
      "A generic type reflecting whether a hardware component
      is powered on or off";
  }

}