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>
23 <mailto:andy@yumaworks.com>
24 Editor: Martin Bjorklund
25 <mailto:mbj@tail-f.com>
27 <mailto:jie.dong@huawei.com>
29 <mailto:dromasca@gmail.com>";
32 "This module contains a collection of YANG definitions for
34 This data model is designed for the Network Management Datastore
35 Architecture (NMDA) defined in RFC 8342.
36 Copyright (c) 2018 IETF Trust and the persons identified as
37 authors of the code. All rights reserved.
38 Redistribution and use in source and binary forms, with or
39 without modification, is permitted pursuant to, and subject
40 to the license terms contained in, the Simplified BSD License
41 set forth in Section 4.c of the IETF Trust's Legal Provisions
42 Relating to IETF Documents
43 (https://trustee.ietf.org/license-info).
44 This version of this YANG module is part of RFC 8348; see
45 the RFC itself for full legal notices.";
51 "RFC 8348: A YANG Data Model for Hardware Management";
60 "This feature indicates that the device implements
63 "RFC 6933: Entity MIB (Version 4)";
66 feature hardware-state {
68 "Indicates that ENTITY-STATE-MIB objects are supported";
70 "RFC 4268: Entity State MIB";
73 feature hardware-sensor {
75 "Indicates that ENTITY-SENSOR-MIB objects are supported";
77 "RFC 3433: Entity Sensor Management Information Base";
89 "The resource is unable to report administrative state.";
94 "The resource is administratively prohibited from use.";
99 "The resource usage is administratively limited to current
105 "The resource is not administratively prohibited from
110 "Represents the various possible administrative states.";
112 "RFC 4268: Entity State MIB - EntityAdminState";
120 "The resource is unable to report its operational state.";
125 "The resource is totally inoperable.";
131 "The resource is partially or fully operable.";
136 "The resource is currently being tested and cannot
137 therefore report whether or not it is operational.";
141 "Represents the possible values of operational states.";
143 "RFC 4268: Entity State MIB - EntityOperState";
146 typedef usage-state {
151 "The resource is unable to report usage state.";
156 "The resource is servicing no users.";
161 "The resource is currently in use, and it has sufficient
162 spare capacity to provide for additional users.";
167 "The resource is currently in use, but it currently has no
168 spare capacity to provide for additional users.";
172 "Represents the possible values of usage states.";
174 "RFC 4268: Entity State MIB - EntityUsageState";
177 typedef alarm-state {
182 "The resource is unable to report alarm state.";
187 "The resource is currently being repaired, which, depending
188 on the implementation, may make the other values in this
189 bit string not meaningful.";
194 "One or more critical alarms are active against the
200 "One or more major alarms are active against the
206 "One or more minor alarms are active against the
212 "One or more warning alarms are active against the
218 "One or more alarms of whose perceived severity cannot be
219 determined are active against this resource.";
223 "Represents the possible values of alarm states. An alarm is a
224 persistent indication of an error or warning condition.
225 When no bits of this attribute are set, then no active alarms
226 are known against this component and it is not under repair.";
228 "RFC 4268: Entity State MIB - EntityAlarmStatus";
231 typedef standby-state {
236 "The resource is unable to report standby state.";
241 "The resource is not providing service, but it will be
242 immediately able to take over the role of the resource to
243 be backed up, without the need for initialization
244 activity, and will contain the same information as the
245 resource to be backed up.";
250 "The resource is to back up another resource, but it will
251 not be immediately able to take over the role of a
252 resource to be backed up and will require some
253 initialization activity.";
255 enum providing-service {
258 "The resource is providing service.";
262 "Represents the possible values of standby states.";
264 "RFC 4268: Entity State MIB - EntityStandbyStatus";
267 typedef sensor-value-type {
272 "A measure other than those listed below.";
277 "An unknown measurement or arbitrary, relative numbers";
282 "A measure of electric potential (alternating current).";
287 "A measure of electric potential (direct current).";
292 "A measure of electric current.";
297 "A measure of power.";
302 "A measure of frequency.";
307 "A measure of temperature.";
312 "A measure of percent relative humidity.";
317 "A measure of shaft revolutions per minute.";
322 "A measure of cubic meters per minute (airflow).";
327 "Value is one of 1 (true) or 2 (false)";
331 "A node using this data type represents the sensor measurement
332 data type associated with a physical sensor value. The actual
333 data units are determined by examining a node of this type
334 together with the associated sensor-value-scale node.
335 A node of this type SHOULD be defined together with nodes of
336 type sensor-value-scale and type sensor-value-precision.
337 These three types are used to identify the semantics of a node
338 of type sensor-value.";
340 "RFC 3433: Entity Sensor Management Information Base -
341 EntitySensorDataType";
344 typedef sensor-value-scale {
349 "Data scaling factor of 10^-24.";
354 "Data scaling factor of 10^-21.";
359 "Data scaling factor of 10^-18.";
364 "Data scaling factor of 10^-15.";
369 "Data scaling factor of 10^-12.";
374 "Data scaling factor of 10^-9.";
379 "Data scaling factor of 10^-6.";
384 "Data scaling factor of 10^-3.";
389 "Data scaling factor of 10^0.";
394 "Data scaling factor of 10^3.";
399 "Data scaling factor of 10^6.";
404 "Data scaling factor of 10^9.";
409 "Data scaling factor of 10^12.";
414 "Data scaling factor of 10^15.";
419 "Data scaling factor of 10^18.";
424 "Data scaling factor of 10^21.";
429 "Data scaling factor of 10^24.";
433 "A node using this data type represents a data scaling factor,
434 represented with an International System of Units (SI) prefix.
435 The actual data units are determined by examining a node of
436 this type together with the associated sensor-value-type.
437 A node of this type SHOULD be defined together with nodes of
438 type sensor-value-type and type sensor-value-precision.
439 Together, associated nodes of these three types are used to
440 identify the semantics of a node of type sensor-value.";
442 "RFC 3433: Entity Sensor Management Information Base -
443 EntitySensorDataScale";
446 typedef sensor-value-precision {
451 "A node using this data type represents a sensor value
453 A node of this type SHOULD be defined together with nodes of
454 type sensor-value-type and type sensor-value-scale. Together,
455 associated nodes of these three types are used to identify the
456 semantics of a node of type sensor-value.
457 If a node of this type contains a value in the range 1 to 9,
458 it represents the number of decimal places in the fractional
459 part of an associated sensor-value fixed-point number.
460 If a node of this type contains a value in the range -8 to -1,
461 it represents the number of accurate digits in the associated
462 sensor-value fixed-point number.
463 The value zero indicates the associated sensor-value node is
464 not a fixed-point number.
465 Server implementers must choose a value for the associated
466 sensor-value-precision node so that the precision and accuracy
467 of the associated sensor-value node is correctly indicated.
468 For example, a component representing a temperature sensor
469 that can measure 0 to 100 degrees C in 0.1 degree
470 increments, +/- 0.05 degrees, would have a
471 sensor-value-precision value of '1', a sensor-value-scale
472 value of 'units', and a sensor-value ranging from '0' to
473 '1000'. The sensor-value would be interpreted as
476 "RFC 3433: Entity Sensor Management Information Base -
477 EntitySensorPrecision";
480 typedef sensor-value {
482 range "-1000000000 .. 1000000000";
485 "A node using this data type represents a sensor value.
486 A node of this type SHOULD be defined together with nodes of
487 type sensor-value-type, type sensor-value-scale, and
488 type sensor-value-precision. Together, associated nodes of
489 those three types are used to identify the semantics of a node
491 The semantics of a node using this data type are determined by
492 the value of the associated sensor-value-type node.
493 If the associated sensor-value-type node is equal to 'voltsAC',
494 'voltsDC', 'amperes', 'watts', 'hertz', 'celsius', or 'cmm',
495 then a node of this type MUST contain a fixed-point number
496 ranging from -999,999,999 to +999,999,999. The value
497 -1000000000 indicates an underflow error. The value
498 +1000000000 indicates an overflow error. The
499 sensor-value-precision indicates how many fractional digits
500 are represented in the associated sensor-value node.
501 If the associated sensor-value-type node is equal to
502 'percentRH', then a node of this type MUST contain a number
503 ranging from 0 to 100.
504 If the associated sensor-value-type node is equal to 'rpm',
505 then a node of this type MUST contain a number ranging from
506 -999,999,999 to +999,999,999.
507 If the associated sensor-value-type node is equal to
508 'truth-value', then a node of this type MUST contain either the
509 value 1 (true) or the value 2 (false).
510 If the associated sensor-value-type node is equal to 'other' or
511 'unknown', then a node of this type MUST contain a number
512 ranging from -1000000000 to 1000000000.";
514 "RFC 3433: Entity Sensor Management Information Base -
518 typedef sensor-status {
523 "Indicates that the server can obtain the sensor value.";
528 "Indicates that the server presently cannot obtain the
531 enum nonoperational {
534 "Indicates that the server believes the sensor is broken.
535 The sensor could have a hard failure (disconnected wire)
536 or a soft failure such as out-of-range, jittery, or wildly
537 fluctuating readings.";
541 "A node using this data type represents the operational status
542 of a physical sensor.";
544 "RFC 3433: Entity Sensor Management Information Base -
554 "Data nodes representing components.
555 If the server supports configuration of hardware components,
556 then this data model is instantiated in the configuration
557 datastores supported by the server. The leaf-list 'datastore'
558 for the module 'ietf-hardware' in the YANG library provides
562 type yang:date-and-time;
565 "The time the '/hardware/component' list changed in the
573 When the server detects a new hardware component, it
574 initializes a list entry in the operational state.
575 If the server does not support configuration of hardware
576 components, list entries in the operational state are
577 initialized with values for all nodes as detected by the
579 Otherwise, this procedure is followed:
580 1. If there is an entry in the '/hardware/component' list
581 in the intended configuration with values for the nodes
582 'class', 'parent', and 'parent-rel-pos' that are equal
583 to the detected values, then the list entry in the
584 operational state is initialized with the configured
585 values, including the 'name'.
586 2. Otherwise (i.e., there is no matching configuration
587 entry), the list entry in the operational state is
588 initialized with values for all nodes as detected by
590 If the '/hardware/component' list in the intended
591 configuration is modified, then the system MUST behave as if
592 it re-initializes itself and follow the procedure in (1).";
594 "RFC 6933: Entity MIB (Version 4) - entPhysicalEntry";
599 "The name assigned to this component.
600 This name is not required to be the same as
606 base ianahw:hardware-class;
610 "An indication of the general hardware type of the
613 "RFC 6933: Entity MIB (Version 4) - entPhysicalClass";
616 leaf physical-index {
617 if-feature entity-mib;
619 range "1..2147483647";
623 "The entPhysicalIndex for the entPhysicalEntry represented
624 by this list entry.";
626 "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
633 "A textual description of the component. This node should
634 contain a string that identifies the manufacturer's name
635 for the component and should be set to a distinct value
636 for each version or model of the component.";
638 "RFC 6933: Entity MIB (Version 4) - entPhysicalDescr";
643 path "../../component/name";
644 require-instance false;
647 "The name of the component that physically contains this
649 If this leaf is not instantiated, it indicates that this
650 component is not contained in any other component.
651 In the event that a physical component is contained by
652 more than one physical component (e.g., double-wide
653 modules), this node contains the name of one of these
654 components. An implementation MUST use the same name
655 every time this node is instantiated.";
657 "RFC 6933: Entity MIB (Version 4) - entPhysicalContainedIn";
660 leaf parent-rel-pos {
662 range "0 .. 2147483647";
665 "An indication of the relative position of this child
666 component among all its sibling components. Sibling
667 components are defined as components that:
668 o share the same value of the 'parent' node and
669 o share a common base identity for the 'class' node.
670 Note that the last rule gives implementations flexibility
671 in how components are numbered. For example, some
672 implementations might have a single number series for all
673 components derived from 'ianahw:port', while some others
674 might have different number series for different
675 components with identities derived from 'ianahw:port' (for
676 example, one for registered jack 45 (RJ45) and one for
677 small form-factor pluggable (SFP)).";
680 "RFC 6933: Entity MIB (Version 4) -
681 entPhysicalParentRelPos";
684 leaf-list contains-child {
686 path "../../component/name";
690 "The name of the contained component.";
692 "RFC 6933: Entity MIB (Version 4) - entPhysicalChildIndex";
699 "The vendor-specific hardware revision string for the
700 component. The preferred value is the hardware revision
701 identifier actually printed on the component itself (if
704 "RFC 6933: Entity MIB (Version 4) -
705 entPhysicalHardwareRev";
712 "The vendor-specific firmware revision string for the
715 "RFC 6933: Entity MIB (Version 4) -
716 entPhysicalFirmwareRev";
724 "The vendor-specific software revision string for the
727 "RFC 6933: Entity MIB (Version 4) -
728 entPhysicalSoftwareRev";
735 "The vendor-specific serial number string for the
736 component. The preferred value is the serial number
737 string actually printed on the component itself (if
740 "RFC 6933: Entity MIB (Version 4) - entPhysicalSerialNum";
747 "The name of the manufacturer of this physical component.
748 The preferred value is the manufacturer name string
749 actually printed on the component itself (if present).
750 Note that comparisons between instances of the
751 'model-name', 'firmware-rev', 'software-rev', and
752 'serial-num' nodes are only meaningful amongst components
753 with the same value of 'mfg-name'.
754 If the manufacturer name string associated with the
755 physical component is unknown to the server, then this
756 node is not instantiated.";
758 "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName";
765 "The vendor-specific model name identifier string
766 associated with this physical component. The preferred
767 value is the customer-visible part number, which may be
768 printed on the component itself.
769 If the model name string associated with the physical
770 component is unknown to the server, then this node is not
773 "RFC 6933: Entity MIB (Version 4) - entPhysicalModelName";
779 "An 'alias' name for the component, as specified by a
780 network manager, that provides a non-volatile 'handle' for
782 If no configured value exists, the server MAY set the
783 value of this node to a locally unique value in the
785 A server implementation MAY map this leaf to the
786 entPhysicalAlias MIB object. Such an implementation needs
787 to use some mechanism to handle the differences in size
788 and characters allowed between this leaf and
789 entPhysicalAlias. The definition of such a mechanism is
790 outside the scope of this document.";
792 "RFC 6933: Entity MIB (Version 4) - entPhysicalAlias";
798 "This node is a user-assigned asset tracking identifier for
800 A server implementation MAY map this leaf to the
801 entPhysicalAssetID MIB object. Such an implementation
802 needs to use some mechanism to handle the differences in
803 size and characters allowed between this leaf and
804 entPhysicalAssetID. The definition of such a mechanism is
805 outside the scope of this document.";
807 "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID";
815 "This node indicates whether or not this component is
816 considered a 'field-replaceable unit' by the vendor. If
817 this node contains the value 'true', then this component
818 identifies a field-replaceable unit. For all components
819 that are permanently contained within a field-replaceable
820 unit, the value 'false' should be returned for this
823 "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU";
827 type yang:date-and-time;
830 "The date of manufacturing of the managed component.";
832 "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate";
838 "This node contains identification information about the
841 "RFC 6933: Entity MIB (Version 4) - entPhysicalUris";
848 "A Universally Unique Identifier of the component.";
850 "RFC 6933: Entity MIB (Version 4) - entPhysicalUUID";
854 if-feature hardware-state;
856 "State-related nodes";
858 "RFC 4268: Entity State MIB";
860 leaf state-last-changed {
861 type yang:date-and-time;
864 "The date and time when the value of any of the
865 admin-state, oper-state, usage-state, alarm-state, or
866 standby-state changed for this component.
867 If there has been no change since the last
868 re-initialization of the local system, this node
869 contains the date and time of local system
870 initialization. If there has been no change since the
871 component was added to the local system, this node
872 contains the date and time of the insertion.";
874 "RFC 4268: Entity State MIB - entStateLastChanged";
880 "The administrative state for this component.
881 This node refers to a component's administrative
882 permission to service both other components within its
883 containment hierarchy as well other users of its
884 services defined by means outside the scope of this
886 Some components exhibit only a subset of the remaining
887 administrative state values. Some components cannot be
888 locked; hence, this node exhibits only the 'unlocked'
889 state. Other components cannot be shut down gracefully;
890 hence, this node does not exhibit the 'shutting-down'
893 "RFC 4268: Entity State MIB - entStateAdmin";
900 "The operational state for this component.
901 Note that this node does not follow the administrative
902 state. An administrative state of 'down' does not
903 predict an operational state of 'disabled'.
904 Note that some implementations may not be able to
905 accurately report oper-state while the admin-state node
906 has a value other than 'unlocked'. In these cases, this
907 node MUST have a value of 'unknown'.";
909 "RFC 4268: Entity State MIB - entStateOper";
916 "The usage state for this component.
917 This node refers to a component's ability to service
918 more components in a containment hierarchy.
919 Some components will exhibit only a subset of the usage
920 state values. Components that are unable to ever
921 service any components within a containment hierarchy
922 will always have a usage state of 'busy'. In some
923 cases, a component will be able to support only one
924 other component within its containment hierarchy and
925 will therefore only exhibit values of 'idle' and
928 "RFC 4268: Entity State MIB - entStateUsage";
935 "The alarm state for this component. It does not
936 include the alarms raised on child components within its
937 containment hierarchy.";
939 "RFC 4268: Entity State MIB - entStateAlarm";
946 "The standby state for this component.
947 Some components will exhibit only a subset of the
948 remaining standby state values. If this component
949 cannot operate in a standby role, the value of this node
950 will always be 'providing-service'.";
952 "RFC 4268: Entity State MIB - entStateStandby";
956 container sensor-data {
957 when 'derived-from-or-self(../class,
960 "Sensor data nodes present for any component of type
963 if-feature hardware-sensor;
967 "Sensor-related nodes.";
969 "RFC 3433: Entity Sensor Management Information Base";
974 "The most recent measurement obtained by the server
976 A client that periodically fetches this node should also
977 fetch the nodes 'value-type', 'value-scale', and
978 'value-precision', since they may change when the value
981 "RFC 3433: Entity Sensor Management Information Base -
986 type sensor-value-type;
988 "The type of data units associated with the
991 "RFC 3433: Entity Sensor Management Information Base -
995 type sensor-value-scale;
997 "The (power of 10) scaling factor associated
998 with the sensor value";
1000 "RFC 3433: Entity Sensor Management Information Base -
1004 leaf value-precision {
1005 type sensor-value-precision;
1007 "The number of decimal places of precision
1008 associated with the sensor value";
1010 "RFC 3433: Entity Sensor Management Information Base -
1011 entPhySensorPrecision";
1017 "The operational status of the sensor.";
1019 "RFC 3433: Entity Sensor Management Information Base -
1020 entPhySensorOperStatus";
1023 leaf units-display {
1026 "A textual description of the data units that should be
1027 used in the display of the sensor value.";
1029 "RFC 3433: Entity Sensor Management Information Base -
1030 entPhySensorUnitsDisplay";
1033 leaf value-timestamp {
1034 type yang:date-and-time;
1036 "The time the status and/or value of this sensor was last
1037 obtained by the server.";
1039 "RFC 3433: Entity Sensor Management Information Base -
1040 entPhySensorValueTimeStamp";
1042 leaf value-update-rate {
1044 units "milliseconds";
1046 "An indication of the frequency that the server updates
1047 the associated 'value' node, represented in
1048 milliseconds. The value zero indicates:
1049 - the sensor value is updated on demand (e.g.,
1050 when polled by the server for a get-request),
1051 - the sensor value is updated when the sensor
1052 value changes (event-driven), or
1053 - the server does not know the update rate.";
1055 "RFC 3433: Entity Sensor Management Information Base -
1056 entPhySensorValueUpdateRate";
1066 notification hardware-state-change {
1068 "A hardware-state-change notification is generated when the
1069 value of /hardware/last-change changes in the operational
1072 "RFC 6933: Entity MIB (Version 4) - entConfigChange";
1075 notification hardware-state-oper-enabled {
1076 if-feature hardware-state;
1078 "A hardware-state-oper-enabled notification signifies that a
1079 component has transitioned into the 'enabled' state.";
1083 path "/hardware/component/name";
1087 "The name of the component that has transitioned into the
1092 path "/hardware/component/state/admin-state";
1095 "The administrative state for the component.";
1099 path "/hardware/component/state/alarm-state";
1102 "The alarm state for the component.";
1105 "RFC 4268: Entity State MIB - entStateOperEnabled";
1108 notification hardware-state-oper-disabled {
1109 if-feature hardware-state;
1111 "A hardware-state-oper-disabled notification signifies that a
1112 component has transitioned into the 'disabled' state.";
1116 path "/hardware/component/name";
1119 "The name of the component that has transitioned into the
1124 path "/hardware/component/state/admin-state";
1127 "The administrative state for the component.";
1131 path "/hardware/component/state/alarm-state";
1135 "The alarm state for the component.";
1138 "RFC 4268: Entity State MIB - entStateOperDisabled";