1 module openconfig-platform {
6 namespace "http://openconfig.net/yang/platform";
10 import openconfig-platform-types { prefix oc-platform-types; }
11 import openconfig-extensions { prefix oc-ext; }
12 import openconfig-alarm-types { prefix oc-alarm-types; }
16 organization "OpenConfig working group";
19 "OpenConfig working group
23 "This module defines a data model for representing a system
24 component inventory, which can include hardware or software
25 elements arranged in an arbitrary structure. The primary
26 relationship supported by the model is containment, e.g.,
27 components containing subcomponents.
29 It is expected that this model reflects every field replacable
30 unit on the device at a minimum (i.e., additional information
31 may be supplied about non-replacable components).
33 Every element in the inventory is termed a 'component' with each
34 component expected to have a unique name and type, and optionally
35 a unique system-assigned identifier and FRU number. The
36 uniqueness is guaranteed by the system within the device.
38 Components may have properties defined by the system that are
39 modeled as a list of key-value pairs. These may or may not be
40 user-configurable. The model provides a flag for the system
41 to optionally indicate which properties are user configurable.
43 Each component also has a list of 'subcomponents' which are
44 references to other components. Appearance in a list of
45 subcomponents indicates a containment relationship as described
46 above. For example, a linecard component may have a list of
47 references to port components that reside on the linecard.
49 This schema is generic to allow devices to express their own
50 platform-specific structure. It may be augmented by additional
51 component type-specific schemas that provide a common structure
52 for well-known component types. In these cases, the system is
53 expected to populate the common component schema, and may
54 optionally also represent the component and its properties in the
57 The properties for each component may include dynamic values,
58 e.g., in the 'state' part of the schema. For example, a CPU
59 component may report its utilization, temperature, or other
60 physical properties. The intent is to capture all platform-
61 specific physical data in one location, including inventory
62 (presence or absence of a component) and state (physical
63 attributes or status).";
65 oc-ext:openconfig-version "0.9.0";
67 revision "2018-01-30" {
69 "Amended approach for modelling CPU - rather than having
70 a local CPU utilisation state variable, a component with
71 a CPU should create a subcomponent of type CPU to report
76 revision "2018-01-16" {
78 "Added new per-component common data; add temp alarm;
79 moved hardware-port reference to port model";
83 revision "2017-12-14" {
85 "Added anchor containers for component data, added new
90 revision "2017-08-16" {
92 "Added power state enumerated type";
96 revision "2016-12-22" {
98 "Added temperature state variable to component";
102 // grouping statements
105 grouping platform-component-properties-config {
107 "System-defined configuration data for component properties";
112 "System-supplied name of the property -- this is typically
127 "Property values can take on a variety of types. Signed and
128 unsigned integer types may be provided in smaller sizes,
129 e.g., int8, uint16, etc.";
133 grouping platform-component-properties-state {
135 "Operational state data for component properties";
140 "Indication whether the property is user-configurable";
144 grouping platform-component-properties-top {
146 "Top-level grouping ";
148 container properties {
150 "Enclosing container ";
155 "List of system properties for the component";
159 path "../config/name";
162 "Reference to the property name.";
167 "Configuration data for each property";
169 uses platform-component-properties-config;
177 "Operational state data for each property";
179 uses platform-component-properties-config;
180 uses platform-component-properties-state;
186 grouping platform-subcomponent-ref-config {
188 "Configuration data for subcomponent references";
193 // path "../../config/name";
196 "Reference to the name of the subcomponent";
200 grouping platform-subcomponent-ref-state {
202 "Operational state data for subcomponent references";
206 grouping platform-subcomponent-ref-top {
208 "Top-level grouping for list of subcomponent references";
210 container subcomponents {
212 "Enclosing container for subcomponent references";
217 "List of subcomponent references";
221 path "../config/name";
224 "Reference to the name list key";
229 "Configuration data for the subcomponent";
231 uses platform-subcomponent-ref-config;
239 "Operational state data for the subcomponent";
241 uses platform-subcomponent-ref-config;
242 uses platform-subcomponent-ref-state;
248 grouping platform-component-config {
250 "Configuration data for components";
255 "Device name for the component -- this will not be a
256 configurable parameter on many implementations";
260 grouping platform-component-state {
262 "Operational state data for device components.";
267 base oc-platform-types:OPENCONFIG_HARDWARE_COMPONENT;
270 base oc-platform-types:OPENCONFIG_SOFTWARE_COMPONENT;
274 "Type of component as identified by the system";
280 "Unique identifier assigned by the system for the
287 "System-supplied description of the component";
293 "System-supplied identifier for the manufacturer of the
294 component. This data is particularly useful when a
295 component manufacturer is different than the overall
299 leaf hardware-version {
302 "For hardware components, this is the hardware revision of
306 leaf firmware-version {
309 "For hardware components, this is the version of associated
310 firmware that is running on the component, if applicable.";
313 leaf software-version {
316 "For software components such as operating system or other
317 software module, this is the version of the currently
324 "System-assigned serial number of the component.";
330 "System-assigned part number for the component. This should
331 be present in particular if the component is also an FRU
332 (field replacable unit)";
337 base oc-platform-types:COMPONENT_OPER_STATUS;
340 "If applicable, this reports the current operational status
345 grouping platform-component-temp-alarm-state {
347 "Temperature alarm data for platform components";
349 // TODO(aashaikh): consider if these leaves could be in a
350 // reusable grouping (not temperature-specific); threshold
351 // may always need to be units specific.
356 "A value of true indicates the alarm has been raised or
357 asserted. The value should be false when the alarm is
361 leaf alarm-threshold {
364 "The threshold value that was crossed for this alarm.";
367 leaf alarm-severity {
369 base oc-alarm-types:OPENCONFIG_ALARM_SEVERITY;
372 "The severity of the current alarm.";
376 grouping platform-component-power-state {
378 "Power-related operational state for device components.";
380 leaf allocated-power {
384 "Power allocated by the system for the component.";
391 "Actual power used by the component.";
395 grouping platform-component-temp-state {
397 "Temperature state data for device components";
399 container temperature {
401 "Temperature in degrees Celsius of the component. Values include
402 the instantaneous, average, minimum, and maximum statistics. If
403 avg/min/max statistics are not supported, the target is expected
404 to just supply the instant value";
406 uses oc-platform-types:avg-min-max-instant-stats-precision1-celsius;
407 uses platform-component-temp-alarm-state;
411 grouping platform-component-memory-state {
413 "Per-component memory statistics";
417 "For components that have associated memory, these values
418 report information about available and utilized memory.";
424 "The available memory physically installed, or logically
425 allocated to the component.";
428 // TODO(aashaikh): consider if this needs to be a
429 // min/max/avg statistic
434 "The memory currently in use by processes running on
435 the component, not considering reserved memory that is
436 not available for use.";
441 grouping platform-anchors-top {
443 "This grouping is used to add containers for components that
444 are common across systems, but do not have a defined schema
445 within the openconfig-platform module. Containers should be
446 added to this grouping for components that are expected to
447 exist in multiple systems, with corresponding modules
448 augmenting the config/state containers directly.";
452 "Data for chassis components";
456 "Configuration data for chassis components";
462 "Operational state data for chassis components";
466 // TODO(aashaikh): linecard container is already defined in
467 // openconfig-platform-linecard; will move to this module
472 "Data for linecard components";
476 "Configuration data for linecard components";
482 "Operational state data for linecard components";
489 "Data for physical port components";
493 "Configuration data for physical port components";
499 "Operational state data for physical port components";
503 // TODO(aashaikh): transceiver container is already defined in
504 // openconfig-platform-transceiver; will move to this module
507 container transceiver {
509 "Data for transceiver components";
513 "Configuration data for transceiver components";
519 "Operational state data for transceiver components";
524 container power-supply {
526 "Data for power supply components";
530 "Configuration data for power supply components";
536 "Operational state data for power supply components";
542 "Data for fan components";
546 "Configuration data for fan components";
552 "Operational state data for fan components";
558 "Data for fabric components";
562 "Configuration data for fabric components";
568 "Operational state data for fabric components";
574 "Data for storage components";
578 "Configuration data for storage components";
584 "Operational state data for storage components";
590 "Data for cpu components";
594 "Configuration data for cpu components";
600 "Operational state data for cpu components";
604 container integrated-circuit {
606 "Data for chip components, such as ASIC, NPUs, etc.";
610 "Configuration data for chip components";
616 "Operational state data for chip components";
620 container backplane {
622 "Data for backplane components";
626 "Configuration data for backplane components";
632 "Operational state data for backplane components";
637 grouping platform-component-top {
639 "Top-level grouping for components in the device inventory";
641 container components {
643 "Enclosing container for the components in the system.";
648 "List of components, keyed by component name.";
652 path "../config/name";
655 "References the component name";
660 "Configuration data for each component";
662 uses platform-component-config;
670 "Operational state data for each component";
672 uses platform-component-config;
673 uses platform-component-state;
674 uses platform-component-temp-state;
675 uses platform-component-memory-state;
676 uses platform-component-power-state;
679 uses platform-component-properties-top;
680 uses platform-subcomponent-ref-top;
681 uses platform-anchors-top;
687 // data definition statements
689 uses platform-component-top;