3 namespace "urn:ietf:params:xml:ns:yang:ietf-hardware";
6 import ietf-inet-types {
9 import ietf-yang-types {
12 import iana-hardware {
17 "IETF NETMOD (Network Modeling) Working Group";
20 "WG Web: <https://datatracker.ietf.org/wg/netmod/>
21 WG List: <mailto:netmod@ietf.org>
24 <mailto:andy@yumaworks.com>
26 Editor: Martin Bjorklund
27 <mailto:mbj@tail-f.com>
30 <mailto:jie.dong@huawei.com>
33 <mailto:dromasca@gmail.com>";
36 "This module contains a collection of YANG definitions for
39 This data model is designed for the Network Management Datastore
40 Architecture (NMDA) defined in RFC 8342.
41 Copyright (c) 2018 IETF Trust and the persons identified as
42 authors of the code. All rights reserved.
44 Redistribution and use in source and binary forms, with or
45 without modification, is permitted pursuant to, and subject
46 to the license terms contained in, the Simplified BSD License
47 set forth in Section 4.c of the IETF Trust's Legal Provisions
48 Relating to IETF Documents
49 (https://trustee.ietf.org/license-info).
51 This version of this YANG module is part of RFC 8348; see
52 the RFC itself for full legal notices.";
58 "RFC 8348: A YANG Data Model for Hardware Management";
67 "This feature indicates that the device implements
70 "RFC 6933: Entity MIB (Version 4)";
73 feature hardware-state {
75 "Indicates that ENTITY-STATE-MIB objects are supported";
77 "RFC 4268: Entity State MIB";
80 feature hardware-sensor {
82 "Indicates that ENTITY-SENSOR-MIB objects are supported";
84 "RFC 3433: Entity Sensor Management Information Base";
96 "The resource is unable to report administrative state.";
101 "The resource is administratively prohibited from use.";
106 "The resource usage is administratively limited to current
112 "The resource is not administratively prohibited from
117 "Represents the various possible administrative states.";
119 "RFC 4268: Entity State MIB - EntityAdminState";
127 "The resource is unable to report its operational state.";
132 "The resource is totally inoperable.";
138 "The resource is partially or fully operable.";
143 "The resource is currently being tested and cannot
144 therefore report whether or not it is operational.";
148 "Represents the possible values of operational states.";
150 "RFC 4268: Entity State MIB - EntityOperState";
153 typedef usage-state {
158 "The resource is unable to report usage state.";
163 "The resource is servicing no users.";
168 "The resource is currently in use, and it has sufficient
169 spare capacity to provide for additional users.";
174 "The resource is currently in use, but it currently has no
175 spare capacity to provide for additional users.";
179 "Represents the possible values of usage states.";
181 "RFC 4268: Entity State MIB - EntityUsageState";
184 typedef alarm-state {
189 "The resource is unable to report alarm state.";
194 "The resource is currently being repaired, which, depending
195 on the implementation, may make the other values in this
196 bit string not meaningful.";
201 "One or more critical alarms are active against the
207 "One or more major alarms are active against the
213 "One or more minor alarms are active against the
219 "One or more warning alarms are active against the
225 "One or more alarms of whose perceived severity cannot be
226 determined are active against this resource.";
230 "Represents the possible values of alarm states. An alarm is a
231 persistent indication of an error or warning condition.
233 When no bits of this attribute are set, then no active alarms
234 are known against this component and it is not under repair.";
236 "RFC 4268: Entity State MIB - EntityAlarmStatus";
239 typedef standby-state {
244 "The resource is unable to report standby state.";
249 "The resource is not providing service, but it will be
250 immediately able to take over the role of the resource to
251 be backed up, without the need for initialization
252 activity, and will contain the same information as the
253 resource to be backed up.";
258 "The resource is to back up another resource, but it will
259 not be immediately able to take over the role of a
260 resource to be backed up and will require some
261 initialization activity.";
263 enum providing-service {
266 "The resource is providing service.";
270 "Represents the possible values of standby states.";
272 "RFC 4268: Entity State MIB - EntityStandbyStatus";
275 typedef sensor-value-type {
280 "A measure other than those listed below.";
285 "An unknown measurement or arbitrary, relative numbers";
290 "A measure of electric potential (alternating current).";
295 "A measure of electric potential (direct current).";
300 "A measure of electric current.";
305 "A measure of power.";
310 "A measure of frequency.";
315 "A measure of temperature.";
320 "A measure of percent relative humidity.";
325 "A measure of shaft revolutions per minute.";
330 "A measure of cubic meters per minute (airflow).";
335 "Value is one of 1 (true) or 2 (false)";
339 "A node using this data type represents the sensor measurement
340 data type associated with a physical sensor value. The actual
341 data units are determined by examining a node of this type
342 together with the associated sensor-value-scale node.
344 A node of this type SHOULD be defined together with nodes of
345 type sensor-value-scale and type sensor-value-precision.
346 These three types are used to identify the semantics of a node
347 of type sensor-value.";
349 "RFC 3433: Entity Sensor Management Information Base -
350 EntitySensorDataType";
353 typedef sensor-value-scale {
358 "Data scaling factor of 10^-24.";
363 "Data scaling factor of 10^-21.";
368 "Data scaling factor of 10^-18.";
373 "Data scaling factor of 10^-15.";
378 "Data scaling factor of 10^-12.";
383 "Data scaling factor of 10^-9.";
388 "Data scaling factor of 10^-6.";
393 "Data scaling factor of 10^-3.";
398 "Data scaling factor of 10^0.";
403 "Data scaling factor of 10^3.";
408 "Data scaling factor of 10^6.";
413 "Data scaling factor of 10^9.";
418 "Data scaling factor of 10^12.";
423 "Data scaling factor of 10^15.";
428 "Data scaling factor of 10^18.";
433 "Data scaling factor of 10^21.";
438 "Data scaling factor of 10^24.";
442 "A node using this data type represents a data scaling factor,
443 represented with an International System of Units (SI) prefix.
444 The actual data units are determined by examining a node of
445 this type together with the associated sensor-value-type.
447 A node of this type SHOULD be defined together with nodes of
448 type sensor-value-type and type sensor-value-precision.
449 Together, associated nodes of these three types are used to
450 identify the semantics of a node of type sensor-value.";
452 "RFC 3433: Entity Sensor Management Information Base -
453 EntitySensorDataScale";
456 typedef sensor-value-precision {
461 "A node using this data type represents a sensor value
464 A node of this type SHOULD be defined together with nodes of
465 type sensor-value-type and type sensor-value-scale. Together,
466 associated nodes of these three types are used to identify the
467 semantics of a node of type sensor-value.
469 If a node of this type contains a value in the range 1 to 9,
470 it represents the number of decimal places in the fractional
471 part of an associated sensor-value fixed-point number.
473 If a node of this type contains a value in the range -8 to -1,
474 it represents the number of accurate digits in the associated
475 sensor-value fixed-point number.
477 The value zero indicates the associated sensor-value node is
478 not a fixed-point number.
480 Server implementers must choose a value for the associated
481 sensor-value-precision node so that the precision and accuracy
482 of the associated sensor-value node is correctly indicated.
484 For example, a component representing a temperature sensor
485 that can measure 0 to 100 degrees C in 0.1 degree
486 increments, +/- 0.05 degrees, would have a
487 sensor-value-precision value of '1', a sensor-value-scale
488 value of 'units', and a sensor-value ranging from '0' to
489 '1000'. The sensor-value would be interpreted as
492 "RFC 3433: Entity Sensor Management Information Base -
493 EntitySensorPrecision";
496 typedef sensor-value {
498 range "-1000000000 .. 1000000000";
501 "A node using this data type represents a sensor value.
503 A node of this type SHOULD be defined together with nodes of
504 type sensor-value-type, type sensor-value-scale, and
505 type sensor-value-precision. Together, associated nodes of
506 those three types are used to identify the semantics of a node
509 The semantics of a node using this data type are determined by
510 the value of the associated sensor-value-type node.
512 If the associated sensor-value-type node is equal to 'voltsAC',
513 'voltsDC', 'amperes', 'watts', 'hertz', 'celsius', or 'cmm',
514 then a node of this type MUST contain a fixed-point number
515 ranging from -999,999,999 to +999,999,999. The value
516 -1000000000 indicates an underflow error. The value
517 +1000000000 indicates an overflow error. The
518 sensor-value-precision indicates how many fractional digits
519 are represented in the associated sensor-value node.
521 If the associated sensor-value-type node is equal to
522 'percentRH', then a node of this type MUST contain a number
523 ranging from 0 to 100.
525 If the associated sensor-value-type node is equal to 'rpm',
526 then a node of this type MUST contain a number ranging from
527 -999,999,999 to +999,999,999.
529 If the associated sensor-value-type node is equal to
530 'truth-value', then a node of this type MUST contain either the
531 value 1 (true) or the value 2 (false).
533 If the associated sensor-value-type node is equal to 'other' or
534 'unknown', then a node of this type MUST contain a number
535 ranging from -1000000000 to 1000000000.";
537 "RFC 3433: Entity Sensor Management Information Base -
541 typedef sensor-status {
546 "Indicates that the server can obtain the sensor value.";
551 "Indicates that the server presently cannot obtain the
554 enum nonoperational {
557 "Indicates that the server believes the sensor is broken.
558 The sensor could have a hard failure (disconnected wire)
559 or a soft failure such as out-of-range, jittery, or wildly
560 fluctuating readings.";
564 "A node using this data type represents the operational status
565 of a physical sensor.";
567 "RFC 3433: Entity Sensor Management Information Base -
577 "Data nodes representing components.
579 If the server supports configuration of hardware components,
580 then this data model is instantiated in the configuration
581 datastores supported by the server. The leaf-list 'datastore'
582 for the module 'ietf-hardware' in the YANG library provides
586 type yang:date-and-time;
589 "The time the '/hardware/component' list changed in the
598 When the server detects a new hardware component, it
599 initializes a list entry in the operational state.
601 If the server does not support configuration of hardware
602 components, list entries in the operational state are
603 initialized with values for all nodes as detected by the
606 Otherwise, this procedure is followed:
608 1. If there is an entry in the '/hardware/component' list
609 in the intended configuration with values for the nodes
610 'class', 'parent', and 'parent-rel-pos' that are equal
611 to the detected values, then the list entry in the
612 operational state is initialized with the configured
613 values, including the 'name'.
615 2. Otherwise (i.e., there is no matching configuration
616 entry), the list entry in the operational state is
617 initialized with values for all nodes as detected by
620 If the '/hardware/component' list in the intended
621 configuration is modified, then the system MUST behave as if
622 it re-initializes itself and follow the procedure in (1).";
624 "RFC 6933: Entity MIB (Version 4) - entPhysicalEntry";
629 "The name assigned to this component.
631 This name is not required to be the same as
637 base ianahw:hardware-class;
641 "An indication of the general hardware type of the
644 "RFC 6933: Entity MIB (Version 4) - entPhysicalClass";
647 leaf physical-index {
648 if-feature entity-mib;
650 range "1..2147483647";
654 "The entPhysicalIndex for the entPhysicalEntry represented
655 by this list entry.";
657 "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
664 "A textual description of the component. This node should
665 contain a string that identifies the manufacturer's name
666 for the component and should be set to a distinct value
667 for each version or model of the component.";
669 "RFC 6933: Entity MIB (Version 4) - entPhysicalDescr";
674 path "../../component/name";
675 require-instance false;
678 "The name of the component that physically contains this
681 If this leaf is not instantiated, it indicates that this
682 component is not contained in any other component.
684 In the event that a physical component is contained by
685 more than one physical component (e.g., double-wide
686 modules), this node contains the name of one of these
687 components. An implementation MUST use the same name
688 every time this node is instantiated.";
690 "RFC 6933: Entity MIB (Version 4) - entPhysicalContainedIn";
693 leaf parent-rel-pos {
695 range "0 .. 2147483647";
698 "An indication of the relative position of this child
699 component among all its sibling components. Sibling
700 components are defined as components that:
702 o share the same value of the 'parent' node and
704 o share a common base identity for the 'class' node.
706 Note that the last rule gives implementations flexibility
707 in how components are numbered. For example, some
708 implementations might have a single number series for all
709 components derived from 'ianahw:port', while some others
710 might have different number series for different
711 components with identities derived from 'ianahw:port' (for
712 example, one for registered jack 45 (RJ45) and one for
713 small form-factor pluggable (SFP)).";
716 "RFC 6933: Entity MIB (Version 4) -
717 entPhysicalParentRelPos";
720 leaf-list contains-child {
722 path "../../component/name";
726 "The name of the contained component.";
728 "RFC 6933: Entity MIB (Version 4) - entPhysicalChildIndex";
735 "The vendor-specific hardware revision string for the
736 component. The preferred value is the hardware revision
737 identifier actually printed on the component itself (if
740 "RFC 6933: Entity MIB (Version 4) -
741 entPhysicalHardwareRev";
748 "The vendor-specific firmware revision string for the
751 "RFC 6933: Entity MIB (Version 4) -
752 entPhysicalFirmwareRev";
760 "The vendor-specific software revision string for the
763 "RFC 6933: Entity MIB (Version 4) -
764 entPhysicalSoftwareRev";
771 "The vendor-specific serial number string for the
772 component. The preferred value is the serial number
773 string actually printed on the component itself (if
776 "RFC 6933: Entity MIB (Version 4) - entPhysicalSerialNum";
783 "The name of the manufacturer of this physical component.
784 The preferred value is the manufacturer name string
785 actually printed on the component itself (if present).
787 Note that comparisons between instances of the
788 'model-name', 'firmware-rev', 'software-rev', and
789 'serial-num' nodes are only meaningful amongst components
790 with the same value of 'mfg-name'.
792 If the manufacturer name string associated with the
793 physical component is unknown to the server, then this
794 node is not instantiated.";
796 "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName";
803 "The vendor-specific model name identifier string
804 associated with this physical component. The preferred
805 value is the customer-visible part number, which may be
806 printed on the component itself.
807 If the model name string associated with the physical
808 component is unknown to the server, then this node is not
811 "RFC 6933: Entity MIB (Version 4) - entPhysicalModelName";
817 "An 'alias' name for the component, as specified by a
818 network manager, that provides a non-volatile 'handle' for
821 If no configured value exists, the server MAY set the
822 value of this node to a locally unique value in the
825 A server implementation MAY map this leaf to the
826 entPhysicalAlias MIB object. Such an implementation needs
827 to use some mechanism to handle the differences in size
828 and characters allowed between this leaf and
829 entPhysicalAlias. The definition of such a mechanism is
830 outside the scope of this document.";
832 "RFC 6933: Entity MIB (Version 4) - entPhysicalAlias";
838 "This node is a user-assigned asset tracking identifier for
841 A server implementation MAY map this leaf to the
842 entPhysicalAssetID MIB object. Such an implementation
843 needs to use some mechanism to handle the differences in
844 size and characters allowed between this leaf and
845 entPhysicalAssetID. The definition of such a mechanism is
846 outside the scope of this document.";
848 "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID";
856 "This node indicates whether or not this component is
857 considered a 'field-replaceable unit' by the vendor. If
858 this node contains the value 'true', then this component
859 identifies a field-replaceable unit. For all components
860 that are permanently contained within a field-replaceable
861 unit, the value 'false' should be returned for this
864 "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU";
868 type yang:date-and-time;
871 "The date of manufacturing of the managed component.";
873 "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate";
879 "This node contains identification information about the
882 "RFC 6933: Entity MIB (Version 4) - entPhysicalUris";
889 "A Universally Unique Identifier of the component.";
891 "RFC 6933: Entity MIB (Version 4) - entPhysicalUUID";
895 if-feature hardware-state;
897 "State-related nodes";
899 "RFC 4268: Entity State MIB";
901 leaf state-last-changed {
902 type yang:date-and-time;
905 "The date and time when the value of any of the
906 admin-state, oper-state, usage-state, alarm-state, or
907 standby-state changed for this component.
909 If there has been no change since the last
910 re-initialization of the local system, this node
911 contains the date and time of local system
912 initialization. If there has been no change since the
913 component was added to the local system, this node
914 contains the date and time of the insertion.";
916 "RFC 4268: Entity State MIB - entStateLastChanged";
922 "The administrative state for this component.
924 This node refers to a component's administrative
925 permission to service both other components within its
926 containment hierarchy as well other users of its
927 services defined by means outside the scope of this
930 Some components exhibit only a subset of the remaining
931 administrative state values. Some components cannot be
932 locked; hence, this node exhibits only the 'unlocked'
933 state. Other components cannot be shut down gracefully;
934 hence, this node does not exhibit the 'shutting-down'
937 "RFC 4268: Entity State MIB - entStateAdmin";
944 "The operational state for this component.
946 Note that this node does not follow the administrative
947 state. An administrative state of 'down' does not
948 predict an operational state of 'disabled'.
950 Note that some implementations may not be able to
951 accurately report oper-state while the admin-state node
952 has a value other than 'unlocked'. In these cases, this
953 node MUST have a value of 'unknown'.";
955 "RFC 4268: Entity State MIB - entStateOper";
962 "The usage state for this component.
964 This node refers to a component's ability to service
965 more components in a containment hierarchy.
967 Some components will exhibit only a subset of the usage
968 state values. Components that are unable to ever
969 service any components within a containment hierarchy
970 will always have a usage state of 'busy'. In some
971 cases, a component will be able to support only one
972 other component within its containment hierarchy and
973 will therefore only exhibit values of 'idle' and
976 "RFC 4268: Entity State MIB - entStateUsage";
983 "The alarm state for this component. It does not
984 include the alarms raised on child components within its
985 containment hierarchy.";
987 "RFC 4268: Entity State MIB - entStateAlarm";
994 "The standby state for this component.
996 Some components will exhibit only a subset of the
997 remaining standby state values. If this component
998 cannot operate in a standby role, the value of this node
999 will always be 'providing-service'.";
1001 "RFC 4268: Entity State MIB - entStateStandby";
1005 container sensor-data {
1006 when 'derived-from-or-self(../class,
1009 "Sensor data nodes present for any component of type
1012 if-feature hardware-sensor;
1016 "Sensor-related nodes.";
1018 "RFC 3433: Entity Sensor Management Information Base";
1023 "The most recent measurement obtained by the server
1026 A client that periodically fetches this node should also
1027 fetch the nodes 'value-type', 'value-scale', and
1028 'value-precision', since they may change when the value
1031 "RFC 3433: Entity Sensor Management Information Base -
1036 type sensor-value-type;
1038 "The type of data units associated with the
1041 "RFC 3433: Entity Sensor Management Information Base -
1045 type sensor-value-scale;
1047 "The (power of 10) scaling factor associated
1048 with the sensor value";
1050 "RFC 3433: Entity Sensor Management Information Base -
1054 leaf value-precision {
1055 type sensor-value-precision;
1057 "The number of decimal places of precision
1058 associated with the sensor value";
1060 "RFC 3433: Entity Sensor Management Information Base -
1061 entPhySensorPrecision";
1067 "The operational status of the sensor.";
1069 "RFC 3433: Entity Sensor Management Information Base -
1070 entPhySensorOperStatus";
1073 leaf units-display {
1076 "A textual description of the data units that should be
1077 used in the display of the sensor value.";
1079 "RFC 3433: Entity Sensor Management Information Base -
1080 entPhySensorUnitsDisplay";
1083 leaf value-timestamp {
1084 type yang:date-and-time;
1086 "The time the status and/or value of this sensor was last
1087 obtained by the server.";
1089 "RFC 3433: Entity Sensor Management Information Base -
1090 entPhySensorValueTimeStamp";
1092 leaf value-update-rate {
1094 units "milliseconds";
1096 "An indication of the frequency that the server updates
1097 the associated 'value' node, represented in
1098 milliseconds. The value zero indicates:
1100 - the sensor value is updated on demand (e.g.,
1101 when polled by the server for a get-request),
1103 - the sensor value is updated when the sensor
1104 value changes (event-driven), or
1106 - the server does not know the update rate.";
1108 "RFC 3433: Entity Sensor Management Information Base -
1109 entPhySensorValueUpdateRate";
1119 notification hardware-state-change {
1121 "A hardware-state-change notification is generated when the
1122 value of /hardware/last-change changes in the operational
1125 "RFC 6933: Entity MIB (Version 4) - entConfigChange";
1128 notification hardware-state-oper-enabled {
1129 if-feature hardware-state;
1131 "A hardware-state-oper-enabled notification signifies that a
1132 component has transitioned into the 'enabled' state.";
1136 path "/hardware/component/name";
1140 "The name of the component that has transitioned into the
1145 path "/hardware/component/state/admin-state";
1148 "The administrative state for the component.";
1152 path "/hardware/component/state/alarm-state";
1155 "The alarm state for the component.";
1158 "RFC 4268: Entity State MIB - entStateOperEnabled";
1161 notification hardware-state-oper-disabled {
1162 if-feature hardware-state;
1164 "A hardware-state-oper-disabled notification signifies that a
1165 component has transitioned into the 'disabled' state.";
1169 path "/hardware/component/name";
1172 "The name of the component that has transitioned into the
1177 path "/hardware/component/state/admin-state";
1180 "The administrative state for the component.";
1184 path "/hardware/component/state/alarm-state";
1188 "The alarm state for the component.";
1191 "RFC 4268: Entity State MIB - entStateOperDisabled";