1 module ietf-hardware-state {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-hardware-state";
6 import ietf-inet-types {
9 import ietf-yang-types {
12 import iana-hardware {
15 import ietf-hardware {
20 "IETF NETMOD (Network Modeling) Working Group";
23 "WG Web: <https://datatracker.ietf.org/wg/netmod/>
24 WG List: <mailto:netmod@ietf.org>
27 <mailto:andy@yumaworks.com>
29 Editor: Martin Bjorklund
30 <mailto:mbj@tail-f.com>
33 <mailto:jie.dong@huawei.com>
35 <mailto:dromasca@gmail.com>";
38 "This module contains a collection of YANG definitions for
41 This data model is designed as a temporary solution for
42 implementations that do not yet support the Network Management
43 Datastore Architecture (NMDA) defined in RFC 8342. Such an
44 implementation cannot implement the module 'ietf-hardware'
45 properly, since without NMDA support, it is not possible to
46 distinguish between instances of nodes in the running
47 configuration and operational states.
49 The data model in this module is the same as the data model in
50 'ietf-hardware', except all nodes are marked as 'config false'.
52 If a server that implements this module but doesn't support NMDA
53 also supports configuration of hardware components, it SHOULD
54 also implement the module 'ietf-hardware' in the configuration
55 datastores. The corresponding state data is found in the
56 '/hw-state:hardware' subtree.
58 Copyright (c) 2018 IETF Trust and the persons identified as
59 authors of the code. All rights reserved.
61 Redistribution and use in source and binary forms, with or
62 without modification, is permitted pursuant to, and subject
63 to the license terms contained in, the Simplified BSD License
64 set forth in Section 4.c of the IETF Trust's Legal Provisions
65 Relating to IETF Documents
66 (https://trustee.ietf.org/license-info).
68 This version of this YANG module is part of RFC 8348; see
69 the RFC itself for full legal notices.";
75 "RFC 8348: A YANG Data Model for Hardware Management";
85 "This feature indicates that the device implements
88 "RFC 6933: Entity MIB (Version 4)";
91 feature hardware-state {
94 "Indicates that ENTITY-STATE-MIB objects are supported";
96 "RFC 4268: Entity State MIB";
99 feature hardware-sensor {
102 "Indicates that ENTITY-SENSOR-MIB objects are supported";
104 "RFC 3433: Entity Sensor Management Information Base";
115 "Data nodes representing components.";
118 type yang:date-and-time;
121 "The time the '/hardware/component' list changed in the
130 When the server detects a new hardware component, it
131 initializes a list entry in the operational state.
133 If the server does not support configuration of hardware
134 components, list entries in the operational state are
135 initialized with values for all nodes as detected by the
138 Otherwise, this procedure is followed:
140 1. If there is an entry in the '/hardware/component' list
141 in the intended configuration with values for the nodes
142 'class', 'parent', and 'parent-rel-pos' that are equal
143 to the detected values, then:
145 1a. If the configured entry has a value for 'mfg-name'
146 that is equal to the detected value or if the
147 'mfg-name' value cannot be detected, then the list
148 entry in the operational state is initialized with the
149 configured values for all configured nodes, including
152 Otherwise, the list entry in the operational state is
153 initialized with values for all nodes as detected by
154 the implementation. The implementation may raise an
155 alarm that informs about the 'mfg-name' mismatch
156 condition. How this is done is outside the scope of
159 1b. Otherwise (i.e., there is no matching configuration
160 entry), the list entry in the operational state is
161 initialized with values for all nodes as detected by
164 If the '/hardware/component' list in the intended
165 configuration is modified, then the system MUST behave as if
166 it re-initializes itself and follow the procedure in (1).";
168 "RFC 6933: Entity MIB (Version 4) - entPhysicalEntry";
174 "The name assigned to this component.
176 This name is not required to be the same as
182 base ianahw:hardware-class;
187 "An indication of the general hardware type of the
190 "RFC 6933: Entity MIB (Version 4) - entPhysicalClass";
193 leaf physical-index {
194 if-feature entity-mib;
196 range "1..2147483647";
200 "The entPhysicalIndex for the entPhysicalEntry represented
201 by this list entry.";
203 "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
210 "A textual description of the component. This node should
211 contain a string that identifies the manufacturer's name
212 for the component and should be set to a distinct value
213 for each version or model of the component.";
215 "RFC 6933: Entity MIB (Version 4) - entPhysicalDescr";
220 path "../../component/name";
221 require-instance false;
226 "The name of the component that physically contains this
229 If this leaf is not instantiated, it indicates that this
230 component is not contained in any other component.
232 In the event that a physical component is contained by
233 more than one physical component (e.g., double-wide
234 modules), this node contains the name of one of these
235 components. An implementation MUST use the same name
236 every time this node is instantiated.";
238 "RFC 6933: Entity MIB (Version 4) -
239 entPhysicalContainedIn";
242 leaf parent-rel-pos {
244 range "0 .. 2147483647";
248 "An indication of the relative position of this child
249 component among all its sibling components. Sibling
250 components are defined as components that:
252 o share the same value of the 'parent' node and
254 o share a common base identity for the 'class' node.
256 Note that the last rule gives implementations flexibility
257 in how components are numbered. For example, some
258 implementations might have a single number series for all
259 components derived from 'ianahw:port', while some others
260 might have different number series for different
261 components with identities derived from 'ianahw:port' (for
262 example, one for RJ45 and one for SFP).";
265 "RFC 6933: Entity MIB (Version 4) -
266 entPhysicalParentRelPos";
269 leaf-list contains-child {
271 path "../../component/name";
275 "The name of the contained component.";
277 "RFC 6933: Entity MIB (Version 4) - entPhysicalChildIndex";
284 "The vendor-specific hardware revision string for the
285 component. The preferred value is the hardware revision
286 identifier actually printed on the component itself (if
289 "RFC 6933: Entity MIB (Version 4) -
290 entPhysicalHardwareRev";
297 "The vendor-specific firmware revision string for the
300 "RFC 6933: Entity MIB (Version 4) -
301 entPhysicalFirmwareRev";
308 "The vendor-specific software revision string for the
311 "RFC 6933: Entity MIB (Version 4) -
312 entPhysicalSoftwareRev";
320 "The vendor-specific serial number string for the
321 component. The preferred value is the serial number
322 string actually printed on the component itself (if
325 "RFC 6933: Entity MIB (Version 4) - entPhysicalSerialNum";
332 "The name of the manufacturer of this physical component.
333 The preferred value is the manufacturer name string
334 actually printed on the component itself (if present).
336 Note that comparisons between instances of the
337 'model-name', 'firmware-rev', 'software-rev', and
338 'serial-num' nodes are only meaningful amongst components
339 with the same value of 'mfg-name'.
341 If the manufacturer name string associated with the
342 physical component is unknown to the server, then this
343 node is not instantiated.";
345 "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName";
352 "The vendor-specific model name identifier string
353 associated with this physical component. The preferred
354 value is the customer-visible part number, which may be
355 printed on the component itself.
357 If the model name string associated with the physical
358 component is unknown to the server, then this node is not
361 "RFC 6933: Entity MIB (Version 4) - entPhysicalModelName";
368 "An 'alias' name for the component, as specified by a
369 network manager, that provides a non-volatile 'handle' for
372 If no configured value exists, the server MAY set the
373 value of this node to a locally unique value in the
376 A server implementation MAY map this leaf to the
377 entPhysicalAlias MIB object. Such an implementation needs
378 to use some mechanism to handle the differences in size
379 and characters allowed between this leaf and
380 entPhysicalAlias. The definition of such a mechanism is
381 outside the scope of this document.";
383 "RFC 6933: Entity MIB (Version 4) - entPhysicalAlias";
390 "This node is a user-assigned asset tracking identifier for
393 A server implementation MAY map this leaf to the
394 entPhysicalAssetID MIB object. Such an implementation
395 needs to use some mechanism to handle the differences in
396 size and characters allowed between this leaf and
397 entPhysicalAssetID. The definition of such a mechanism is
398 outside the scope of this document.";
400 "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID";
407 "This node indicates whether or not this component is
408 considered a 'field-replaceable unit' by the vendor. If
409 this node contains the value 'true', then this component
410 identifies a field-replaceable unit. For all components
411 that are permanently contained within a field-replaceable
412 unit, the value 'false' should be returned for this
416 "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU";
420 type yang:date-and-time;
423 "The date of manufacturing of the managed component.";
425 "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate";
432 "This node contains identification information about the
435 "RFC 6933: Entity MIB (Version 4) - entPhysicalUris";
442 "A Universally Unique Identifier of the component.";
444 "RFC 6933: Entity MIB (Version 4) - entPhysicalUUID";
448 if-feature hardware-state;
451 "State-related nodes";
453 "RFC 4268: Entity State MIB";
455 leaf state-last-changed {
456 type yang:date-and-time;
459 "The date and time when the value of any of the
460 admin-state, oper-state, usage-state, alarm-state, or
461 standby-state changed for this component.
463 If there has been no change since the last
464 re-initialization of the local system, this node
465 contains the date and time of local system
466 initialization. If there has been no change since the
467 component was added to the local system, this node
468 contains the date and time of the insertion.";
470 "RFC 4268: Entity State MIB - entStateLastChanged";
477 "The administrative state for this component.
479 This node refers to a component's administrative
480 permission to service both other components within its
481 containment hierarchy as well as other users of its
482 services defined by means outside the scope of this
485 Some components exhibit only a subset of the remaining
486 administrative state values. Some components cannot be
487 locked; hence, this node exhibits only the 'unlocked'
488 state. Other components cannot be shut down gracefully;
489 hence, this node does not exhibit the 'shutting-down'
492 "RFC 4268: Entity State MIB - entStateAdmin";
499 "The operational state for this component.
501 Note that this node does not follow the administrative
502 state. An administrative state of 'down' does not
503 predict an operational state of 'disabled'.
505 Note that some implementations may not be able to
506 accurately report oper-state while the admin-state node
507 has a value other than 'unlocked'. In these cases, this
508 node MUST have a value of 'unknown'.";
510 "RFC 4268: Entity State MIB - entStateOper";
517 "The usage state for this component.
519 This node refers to a component's ability to service
520 more components in a containment hierarchy.
522 Some components will exhibit only a subset of the usage
523 state values. Components that are unable to ever
524 service any components within a containment hierarchy
525 will always have a usage state of 'busy'. In some
526 cases, a component will be able to support only one
527 other component within its containment hierarchy and
528 will therefore only exhibit values of 'idle' and
531 "RFC 4268: Entity State MIB - entStateUsage";
538 "The alarm state for this component. It does not
539 include the alarms raised on child components within its
540 containment hierarchy.";
542 "RFC 4268: Entity State MIB - entStateAlarm";
546 type hw:standby-state;
549 "The standby state for this component.
551 Some components will exhibit only a subset of the
552 remaining standby state values. If this component
553 cannot operate in a standby role, the value of this node
554 will always be 'providing-service'.";
556 "RFC 4268: Entity State MIB - entStateStandby";
559 container sensor-data {
560 when 'derived-from-or-self(../class,
563 "Sensor data nodes present for any component of type
566 if-feature hardware-sensor;
570 "Sensor-related nodes.";
572 "RFC 3433: Entity Sensor Management Information Base";
575 type hw:sensor-value;
578 "The most recent measurement obtained by the server
581 A client that periodically fetches this node should also
582 fetch the nodes 'value-type', 'value-scale', and
583 'value-precision', since they may change when the value
586 "RFC 3433: Entity Sensor Management Information Base -
591 type hw:sensor-value-type;
594 "The type of data units associated with the
597 "RFC 3433: Entity Sensor Management Information Base -
602 type hw:sensor-value-scale;
605 "The (power of 10) scaling factor associated
606 with the sensor value";
608 "RFC 3433: Entity Sensor Management Information Base -
612 leaf value-precision {
613 type hw:sensor-value-precision;
616 "The number of decimal places of precision
617 associated with the sensor value";
619 "RFC 3433: Entity Sensor Management Information Base -
620 entPhySensorPrecision";
624 type hw:sensor-status;
627 "The operational status of the sensor.";
629 "RFC 3433: Entity Sensor Management Information Base -
630 entPhySensorOperStatus";
637 "A textual description of the data units that should be
638 used in the display of the sensor value.";
640 "RFC 3433: Entity Sensor Management Information Base -
641 entPhySensorUnitsDisplay";
644 leaf value-timestamp {
645 type yang:date-and-time;
648 "The time the status and/or value of this sensor was last
649 obtained by the server.";
651 "RFC 3433: Entity Sensor Management Information Base -
652 entPhySensorValueTimeStamp";
655 leaf value-update-rate {
657 units "milliseconds";
660 "An indication of the frequency that the server updates
661 the associated 'value' node, represented in
662 milliseconds. The value zero indicates:
664 - the sensor value is updated on demand (e.g.,
665 when polled by the server for a get-request),
667 - the sensor value is updated when the sensor
668 value changes (event-driven), or
670 - the server does not know the update rate.";
672 "RFC 3433: Entity Sensor Management Information Base -
673 entPhySensorValueUpdateRate";
683 notification hardware-state-change {
686 "A hardware-state-change notification is generated when the
687 value of /hardware/last-change changes in the operational
690 "RFC 6933: Entity MIB (Version 4) - entConfigChange";
693 notification hardware-state-oper-enabled {
694 if-feature hardware-state;
697 "A hardware-state-oper-enabled notification signifies that a
698 component has transitioned into the 'enabled' state.";
702 path "/hardware/component/name";
706 "The name of the component that has transitioned into the
711 path "/hardware/component/state/admin-state";
715 "The administrative state for the component.";
719 path "/hardware/component/state/alarm-state";
723 "The alarm state for the component.";
726 "RFC 4268: Entity State MIB - entStateOperEnabled";
729 notification hardware-state-oper-disabled {
730 if-feature hardware-state;
733 "A hardware-state-oper-disabled notification signifies that a
734 component has transitioned into the 'disabled' state.";
738 path "/hardware/component/name";
742 "The name of the component that has transitioned into the
747 path "/hardware/component/state/admin-state";
752 "The administrative state for the component.";
756 path "/hardware/component/state/alarm-state";
760 "The alarm state for the component.";
763 "RFC 4268: Entity State MIB - entStateOperDisabled";