--- /dev/null
+module ietf-hardware {\r
+yang-version 1.1;\r
+namespace "urn:ietf:params:xml:ns:yang:ietf-hardware";\r
+prefix hw;\r
+\r
+import ietf-inet-types {\r
+ prefix inet;\r
+}\r
+import ietf-yang-types {\r
+ prefix yang;\r
+}\r
+import iana-hardware {\r
+ prefix ianahw;\r
+}\r
+\r
+organization\r
+ "IETF NETMOD (Network Modeling) Working Group";\r
+\r
+contact\r
+ "WG Web: <https://datatracker.ietf.org/wg/netmod/>\r
+ WG List: <mailto:netmod@ietf.org>\r
+ Editor: Andy Bierman\r
+ <mailto:andy@yumaworks.com>\r
+ Editor: Martin Bjorklund\r
+ <mailto:mbj@tail-f.com>\r
+ Editor: Jie Dong\r
+ <mailto:jie.dong@huawei.com>\r
+ Editor: Dan Romascanu\r
+ <mailto:dromasca@gmail.com>";\r
+\r
+description\r
+ "This module contains a collection of YANG definitions for\r
+ managing hardware.\r
+ This data model is designed for the Network Management Datastore\r
+ Architecture (NMDA) defined in RFC 8342.\r
+ Copyright (c) 2018 IETF Trust and the persons identified as\r
+ authors of the code. All rights reserved.\r
+ Redistribution and use in source and binary forms, with or\r
+ without modification, is permitted pursuant to, and subject\r
+ to the license terms contained in, the Simplified BSD License\r
+ set forth in Section 4.c of the IETF Trust's Legal Provisions\r
+ Relating to IETF Documents\r
+ (https://trustee.ietf.org/license-info).\r
+ This version of this YANG module is part of RFC 8348; see\r
+ the RFC itself for full legal notices.";\r
+\r
+revision 2018-03-13 {\r
+ description\r
+ "Initial revision.";\r
+ reference\r
+ "RFC 8348: A YANG Data Model for Hardware Management";\r
+}\r
+\r
+/*\r
+ * Features\r
+ */\r
+\r
+feature entity-mib {\r
+ description\r
+ "This feature indicates that the device implements\r
+ the ENTITY-MIB.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4)";\r
+}\r
+\r
+feature hardware-state {\r
+ description\r
+ "Indicates that ENTITY-STATE-MIB objects are supported";\r
+ reference\r
+ "RFC 4268: Entity State MIB";\r
+}\r
+\r
+feature hardware-sensor {\r
+ description\r
+ "Indicates that ENTITY-SENSOR-MIB objects are supported";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base";\r
+}\r
+\r
+/*\r
+ * Typedefs\r
+ */\r
+\r
+typedef admin-state {\r
+ type enumeration {\r
+ enum unknown {\r
+ value 1;\r
+ description\r
+ "The resource is unable to report administrative state.";\r
+ }\r
+ enum locked {\r
+ value 2;\r
+ description\r
+ "The resource is administratively prohibited from use.";\r
+ }\r
+ enum shutting-down {\r
+ value 3;\r
+ description\r
+ "The resource usage is administratively limited to current\r
+ instances of use.";\r
+ }\r
+ enum unlocked {\r
+ value 4;\r
+ description\r
+ "The resource is not administratively prohibited from\r
+ use.";\r
+ }\r
+ }\r
+ description\r
+ "Represents the various possible administrative states.";\r
+ reference\r
+ "RFC 4268: Entity State MIB - EntityAdminState";\r
+}\r
+\r
+typedef oper-state {\r
+ type enumeration {\r
+ enum unknown {\r
+ value 1;\r
+ description\r
+ "The resource is unable to report its operational state.";\r
+ }\r
+ enum disabled {\r
+ value 2;\r
+ description\r
+ "The resource is totally inoperable.";\r
+ }\r
+ enum enabled {\r
+ value 3;\r
+\r
+ description\r
+ "The resource is partially or fully operable.";\r
+ }\r
+ enum testing {\r
+ value 4;\r
+ description\r
+ "The resource is currently being tested and cannot\r
+ therefore report whether or not it is operational.";\r
+ }\r
+ }\r
+ description\r
+ "Represents the possible values of operational states.";\r
+ reference\r
+ "RFC 4268: Entity State MIB - EntityOperState";\r
+}\r
+\r
+typedef usage-state {\r
+ type enumeration {\r
+ enum unknown {\r
+ value 1;\r
+ description\r
+ "The resource is unable to report usage state.";\r
+ }\r
+ enum idle {\r
+ value 2;\r
+ description\r
+ "The resource is servicing no users.";\r
+ }\r
+ enum active {\r
+ value 3;\r
+ description\r
+ "The resource is currently in use, and it has sufficient\r
+ spare capacity to provide for additional users.";\r
+ }\r
+ enum busy {\r
+ value 4;\r
+ description\r
+ "The resource is currently in use, but it currently has no\r
+ spare capacity to provide for additional users.";\r
+ }\r
+ }\r
+ description\r
+ "Represents the possible values of usage states.";\r
+ reference\r
+ "RFC 4268: Entity State MIB - EntityUsageState";\r
+}\r
+\r
+typedef alarm-state {\r
+ type bits {\r
+ bit unknown {\r
+ position 0;\r
+ description\r
+ "The resource is unable to report alarm state.";\r
+ }\r
+ bit under-repair {\r
+ position 1;\r
+ description\r
+ "The resource is currently being repaired, which, depending\r
+ on the implementation, may make the other values in this\r
+ bit string not meaningful.";\r
+ }\r
+ bit critical {\r
+ position 2;\r
+ description\r
+ "One or more critical alarms are active against the\r
+ resource.";\r
+ }\r
+ bit major {\r
+ position 3;\r
+ description\r
+ "One or more major alarms are active against the\r
+ resource.";\r
+ }\r
+ bit minor {\r
+ position 4;\r
+ description\r
+ "One or more minor alarms are active against the\r
+ resource.";\r
+ }\r
+ bit warning {\r
+ position 5;\r
+ description\r
+ "One or more warning alarms are active against the\r
+ resource.";\r
+ }\r
+ bit indeterminate {\r
+ position 6;\r
+ description\r
+ "One or more alarms of whose perceived severity cannot be\r
+ determined are active against this resource.";\r
+ }\r
+ }\r
+ description\r
+ "Represents the possible values of alarm states. An alarm is a\r
+ persistent indication of an error or warning condition.\r
+ When no bits of this attribute are set, then no active alarms\r
+ are known against this component and it is not under repair.";\r
+ reference\r
+ "RFC 4268: Entity State MIB - EntityAlarmStatus";\r
+}\r
+\r
+typedef standby-state {\r
+ type enumeration {\r
+ enum unknown {\r
+ value 1;\r
+ description\r
+ "The resource is unable to report standby state.";\r
+ }\r
+ enum hot-standby {\r
+ value 2;\r
+ description\r
+ "The resource is not providing service, but it will be\r
+ immediately able to take over the role of the resource to\r
+ be backed up, without the need for initialization\r
+ activity, and will contain the same information as the\r
+ resource to be backed up.";\r
+ }\r
+ enum cold-standby {\r
+ value 3;\r
+ description\r
+ "The resource is to back up another resource, but it will\r
+ not be immediately able to take over the role of a\r
+ resource to be backed up and will require some\r
+ initialization activity.";\r
+ }\r
+ enum providing-service {\r
+ value 4;\r
+ description\r
+ "The resource is providing service.";\r
+ }\r
+ }\r
+ description\r
+ "Represents the possible values of standby states.";\r
+ reference\r
+ "RFC 4268: Entity State MIB - EntityStandbyStatus";\r
+}\r
+\r
+typedef sensor-value-type {\r
+ type enumeration {\r
+ enum other {\r
+ value 1;\r
+ description\r
+ "A measure other than those listed below.";\r
+ }\r
+ enum unknown {\r
+ value 2;\r
+ description\r
+ "An unknown measurement or arbitrary, relative numbers";\r
+ }\r
+ enum volts-AC {\r
+ value 3;\r
+ description\r
+ "A measure of electric potential (alternating current).";\r
+ }\r
+ enum volts-DC {\r
+ value 4;\r
+ description\r
+ "A measure of electric potential (direct current).";\r
+ }\r
+ enum amperes {\r
+ value 5;\r
+ description\r
+ "A measure of electric current.";\r
+ }\r
+ enum watts {\r
+ value 6;\r
+ description\r
+ "A measure of power.";\r
+ }\r
+ enum hertz {\r
+ value 7;\r
+ description\r
+ "A measure of frequency.";\r
+ }\r
+ enum celsius {\r
+ value 8;\r
+ description\r
+ "A measure of temperature.";\r
+ }\r
+ enum percent-RH {\r
+ value 9;\r
+ description\r
+ "A measure of percent relative humidity.";\r
+ }\r
+ enum rpm {\r
+ value 10;\r
+ description\r
+ "A measure of shaft revolutions per minute.";\r
+ }\r
+ enum cmm {\r
+ value 11;\r
+ description\r
+ "A measure of cubic meters per minute (airflow).";\r
+ }\r
+ enum truth-value {\r
+ value 12;\r
+ description\r
+ "Value is one of 1 (true) or 2 (false)";\r
+ }\r
+ }\r
+ description\r
+ "A node using this data type represents the sensor measurement\r
+ data type associated with a physical sensor value. The actual\r
+ data units are determined by examining a node of this type\r
+ together with the associated sensor-value-scale node.\r
+ A node of this type SHOULD be defined together with nodes of\r
+ type sensor-value-scale and type sensor-value-precision.\r
+ These three types are used to identify the semantics of a node\r
+ of type sensor-value.";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ EntitySensorDataType";\r
+}\r
+\r
+typedef sensor-value-scale {\r
+ type enumeration {\r
+ enum yocto {\r
+ value 1;\r
+ description\r
+ "Data scaling factor of 10^-24.";\r
+ }\r
+ enum zepto {\r
+ value 2;\r
+ description\r
+ "Data scaling factor of 10^-21.";\r
+ }\r
+ enum atto {\r
+ value 3;\r
+ description\r
+ "Data scaling factor of 10^-18.";\r
+ }\r
+ enum femto {\r
+ value 4;\r
+ description\r
+ "Data scaling factor of 10^-15.";\r
+ }\r
+ enum pico {\r
+ value 5;\r
+ description\r
+ "Data scaling factor of 10^-12.";\r
+ }\r
+ enum nano {\r
+ value 6;\r
+ description\r
+ "Data scaling factor of 10^-9.";\r
+ }\r
+ enum micro {\r
+ value 7;\r
+ description\r
+ "Data scaling factor of 10^-6.";\r
+ }\r
+ enum milli {\r
+ value 8;\r
+ description\r
+ "Data scaling factor of 10^-3.";\r
+ }\r
+ enum units {\r
+ value 9;\r
+ description\r
+ "Data scaling factor of 10^0.";\r
+ }\r
+ enum kilo {\r
+ value 10;\r
+ description\r
+ "Data scaling factor of 10^3.";\r
+ }\r
+ enum mega {\r
+ value 11;\r
+ description\r
+ "Data scaling factor of 10^6.";\r
+ }\r
+ enum giga {\r
+ value 12;\r
+ description\r
+ "Data scaling factor of 10^9.";\r
+ }\r
+ enum tera {\r
+ value 13;\r
+ description\r
+ "Data scaling factor of 10^12.";\r
+ }\r
+ enum peta {\r
+ value 14;\r
+ description\r
+ "Data scaling factor of 10^15.";\r
+ }\r
+ enum exa {\r
+ value 15;\r
+ description\r
+ "Data scaling factor of 10^18.";\r
+ }\r
+ enum zetta {\r
+ value 16;\r
+ description\r
+ "Data scaling factor of 10^21.";\r
+ }\r
+ enum yotta {\r
+ value 17;\r
+ description\r
+ "Data scaling factor of 10^24.";\r
+ }\r
+ }\r
+ description\r
+ "A node using this data type represents a data scaling factor,\r
+ represented with an International System of Units (SI) prefix.\r
+ The actual data units are determined by examining a node of\r
+ this type together with the associated sensor-value-type.\r
+ A node of this type SHOULD be defined together with nodes of\r
+ type sensor-value-type and type sensor-value-precision.\r
+ Together, associated nodes of these three types are used to\r
+ identify the semantics of a node of type sensor-value.";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ EntitySensorDataScale";\r
+}\r
+\r
+typedef sensor-value-precision {\r
+ type int8 {\r
+ range "-8 .. 9";\r
+ }\r
+ description\r
+ "A node using this data type represents a sensor value\r
+ precision range.\r
+ A node of this type SHOULD be defined together with nodes of\r
+ type sensor-value-type and type sensor-value-scale. Together,\r
+ associated nodes of these three types are used to identify the\r
+ semantics of a node of type sensor-value.\r
+ If a node of this type contains a value in the range 1 to 9,\r
+ it represents the number of decimal places in the fractional\r
+ part of an associated sensor-value fixed-point number.\r
+ If a node of this type contains a value in the range -8 to -1,\r
+ it represents the number of accurate digits in the associated\r
+ sensor-value fixed-point number.\r
+ The value zero indicates the associated sensor-value node is\r
+ not a fixed-point number.\r
+ Server implementers must choose a value for the associated\r
+ sensor-value-precision node so that the precision and accuracy\r
+ of the associated sensor-value node is correctly indicated.\r
+ For example, a component representing a temperature sensor\r
+ that can measure 0 to 100 degrees C in 0.1 degree\r
+ increments, +/- 0.05 degrees, would have a\r
+ sensor-value-precision value of '1', a sensor-value-scale\r
+ value of 'units', and a sensor-value ranging from '0' to\r
+ '1000'. The sensor-value would be interpreted as\r
+ 'degrees C * 10'.";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ EntitySensorPrecision";\r
+}\r
+\r
+typedef sensor-value {\r
+ type int32 {\r
+ range "-1000000000 .. 1000000000";\r
+ }\r
+ description\r
+ "A node using this data type represents a sensor value.\r
+ A node of this type SHOULD be defined together with nodes of\r
+ type sensor-value-type, type sensor-value-scale, and\r
+ type sensor-value-precision. Together, associated nodes of\r
+ those three types are used to identify the semantics of a node\r
+ of this data type.\r
+ The semantics of a node using this data type are determined by\r
+ the value of the associated sensor-value-type node.\r
+ If the associated sensor-value-type node is equal to 'voltsAC',\r
+ 'voltsDC', 'amperes', 'watts', 'hertz', 'celsius', or 'cmm',\r
+ then a node of this type MUST contain a fixed-point number\r
+ ranging from -999,999,999 to +999,999,999. The value\r
+ -1000000000 indicates an underflow error. The value\r
+ +1000000000 indicates an overflow error. The\r
+ sensor-value-precision indicates how many fractional digits\r
+ are represented in the associated sensor-value node.\r
+ If the associated sensor-value-type node is equal to\r
+ 'percentRH', then a node of this type MUST contain a number\r
+ ranging from 0 to 100.\r
+ If the associated sensor-value-type node is equal to 'rpm',\r
+ then a node of this type MUST contain a number ranging from\r
+ -999,999,999 to +999,999,999.\r
+ If the associated sensor-value-type node is equal to\r
+ 'truth-value', then a node of this type MUST contain either the\r
+ value 1 (true) or the value 2 (false).\r
+ If the associated sensor-value-type node is equal to 'other' or\r
+ 'unknown', then a node of this type MUST contain a number\r
+ ranging from -1000000000 to 1000000000.";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ EntitySensorValue";\r
+}\r
+\r
+typedef sensor-status {\r
+ type enumeration {\r
+ enum ok {\r
+ value 1;\r
+ description\r
+ "Indicates that the server can obtain the sensor value.";\r
+ }\r
+ enum unavailable {\r
+ value 2;\r
+ description\r
+ "Indicates that the server presently cannot obtain the\r
+ sensor value.";\r
+ }\r
+ enum nonoperational {\r
+ value 3;\r
+ description\r
+ "Indicates that the server believes the sensor is broken.\r
+ The sensor could have a hard failure (disconnected wire)\r
+ or a soft failure such as out-of-range, jittery, or wildly\r
+ fluctuating readings.";\r
+ }\r
+ }\r
+ description\r
+ "A node using this data type represents the operational status\r
+ of a physical sensor.";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ EntitySensorStatus";\r
+}\r
+\r
+/*\r
+ * Data nodes\r
+ */\r
+\r
+container hardware {\r
+ description\r
+ "Data nodes representing components.\r
+ If the server supports configuration of hardware components,\r
+ then this data model is instantiated in the configuration\r
+ datastores supported by the server. The leaf-list 'datastore'\r
+ for the module 'ietf-hardware' in the YANG library provides\r
+ this information.";\r
+\r
+ leaf last-change {\r
+ type yang:date-and-time;\r
+ config false;\r
+ description\r
+ "The time the '/hardware/component' list changed in the\r
+ operational state.";\r
+ }\r
+\r
+ list component {\r
+ key name;\r
+ description\r
+ "List of components.\r
+ When the server detects a new hardware component, it\r
+ initializes a list entry in the operational state.\r
+ If the server does not support configuration of hardware\r
+ components, list entries in the operational state are\r
+ initialized with values for all nodes as detected by the\r
+ implementation.\r
+ Otherwise, this procedure is followed:\r
+ 1. If there is an entry in the '/hardware/component' list\r
+ in the intended configuration with values for the nodes\r
+ 'class', 'parent', and 'parent-rel-pos' that are equal\r
+ to the detected values, then the list entry in the\r
+ operational state is initialized with the configured\r
+ values, including the 'name'.\r
+ 2. Otherwise (i.e., there is no matching configuration\r
+ entry), the list entry in the operational state is\r
+ initialized with values for all nodes as detected by\r
+ the implementation.\r
+ If the '/hardware/component' list in the intended\r
+ configuration is modified, then the system MUST behave as if\r
+ it re-initializes itself and follow the procedure in (1).";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalEntry";\r
+\r
+ leaf name {\r
+ type string;\r
+ description\r
+ "The name assigned to this component.\r
+ This name is not required to be the same as\r
+ entPhysicalName.";\r
+ }\r
+\r
+ leaf class {\r
+ type identityref {\r
+ base ianahw:hardware-class;\r
+ }\r
+ mandatory true;\r
+ description\r
+ "An indication of the general hardware type of the\r
+ component.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalClass";\r
+ }\r
+\r
+ leaf physical-index {\r
+ if-feature entity-mib;\r
+ type int32 {\r
+ range "1..2147483647";\r
+ }\r
+ config false;\r
+ description\r
+ "The entPhysicalIndex for the entPhysicalEntry represented\r
+ by this list entry.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";\r
+ }\r
+\r
+ leaf description {\r
+ type string;\r
+ config false;\r
+ description\r
+ "A textual description of the component. This node should\r
+ contain a string that identifies the manufacturer's name\r
+ for the component and should be set to a distinct value\r
+ for each version or model of the component.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalDescr";\r
+ }\r
+\r
+ leaf parent {\r
+ type leafref {\r
+ path "../../component/name";\r
+ require-instance false;\r
+ }\r
+ description\r
+ "The name of the component that physically contains this\r
+ component.\r
+ If this leaf is not instantiated, it indicates that this\r
+ component is not contained in any other component.\r
+ In the event that a physical component is contained by\r
+ more than one physical component (e.g., double-wide\r
+ modules), this node contains the name of one of these\r
+ components. An implementation MUST use the same name\r
+ every time this node is instantiated.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalContainedIn";\r
+ }\r
+\r
+ leaf parent-rel-pos {\r
+ type int32 {\r
+ range "0 .. 2147483647";\r
+ }\r
+ description\r
+ "An indication of the relative position of this child\r
+ component among all its sibling components. Sibling\r
+ components are defined as components that:\r
+ o share the same value of the 'parent' node and\r
+ o share a common base identity for the 'class' node.\r
+ Note that the last rule gives implementations flexibility\r
+ in how components are numbered. For example, some\r
+ implementations might have a single number series for all\r
+ components derived from 'ianahw:port', while some others\r
+ might have different number series for different\r
+ components with identities derived from 'ianahw:port' (for\r
+ example, one for registered jack 45 (RJ45) and one for\r
+ small form-factor pluggable (SFP)).";\r
+\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) -\r
+ entPhysicalParentRelPos";\r
+ }\r
+\r
+ leaf-list contains-child {\r
+ type leafref {\r
+ path "../../component/name";\r
+ }\r
+ config false;\r
+ description\r
+ "The name of the contained component.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalChildIndex";\r
+ }\r
+\r
+ leaf hardware-rev {\r
+ type string;\r
+ config false;\r
+ description\r
+ "The vendor-specific hardware revision string for the\r
+ component. The preferred value is the hardware revision\r
+ identifier actually printed on the component itself (if\r
+ present).";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) -\r
+ entPhysicalHardwareRev";\r
+ }\r
+\r
+ leaf firmware-rev {\r
+ type string;\r
+ config false;\r
+ description\r
+ "The vendor-specific firmware revision string for the\r
+ component.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) -\r
+ entPhysicalFirmwareRev";\r
+ }\r
+\r
+ leaf software-rev {\r
+ type string;\r
+ config false;\r
+\r
+ description\r
+ "The vendor-specific software revision string for the\r
+ component.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) -\r
+ entPhysicalSoftwareRev";\r
+ }\r
+\r
+ leaf serial-num {\r
+ type string;\r
+ config false;\r
+ description\r
+ "The vendor-specific serial number string for the\r
+ component. The preferred value is the serial number\r
+ string actually printed on the component itself (if\r
+ present).";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalSerialNum";\r
+ }\r
+\r
+ leaf mfg-name {\r
+ type string;\r
+ config false;\r
+ description\r
+ "The name of the manufacturer of this physical component.\r
+ The preferred value is the manufacturer name string\r
+ actually printed on the component itself (if present).\r
+ Note that comparisons between instances of the\r
+ 'model-name', 'firmware-rev', 'software-rev', and\r
+ 'serial-num' nodes are only meaningful amongst components\r
+ with the same value of 'mfg-name'.\r
+ If the manufacturer name string associated with the\r
+ physical component is unknown to the server, then this\r
+ node is not instantiated.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName";\r
+ }\r
+\r
+ leaf model-name {\r
+ type string;\r
+ config false;\r
+ description\r
+ "The vendor-specific model name identifier string\r
+ associated with this physical component. The preferred\r
+ value is the customer-visible part number, which may be\r
+ printed on the component itself.\r
+ If the model name string associated with the physical\r
+ component is unknown to the server, then this node is not\r
+ instantiated.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalModelName";\r
+ }\r
+\r
+ leaf alias {\r
+ type string;\r
+ description\r
+ "An 'alias' name for the component, as specified by a\r
+ network manager, that provides a non-volatile 'handle' for\r
+ the component.\r
+ If no configured value exists, the server MAY set the\r
+ value of this node to a locally unique value in the\r
+ operational state.\r
+ A server implementation MAY map this leaf to the\r
+ entPhysicalAlias MIB object. Such an implementation needs\r
+ to use some mechanism to handle the differences in size\r
+ and characters allowed between this leaf and\r
+ entPhysicalAlias. The definition of such a mechanism is\r
+ outside the scope of this document.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalAlias";\r
+ }\r
+\r
+ leaf asset-id {\r
+ type string;\r
+ description\r
+ "This node is a user-assigned asset tracking identifier for\r
+ the component.\r
+ A server implementation MAY map this leaf to the\r
+ entPhysicalAssetID MIB object. Such an implementation\r
+ needs to use some mechanism to handle the differences in\r
+ size and characters allowed between this leaf and\r
+ entPhysicalAssetID. The definition of such a mechanism is\r
+ outside the scope of this document.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID";\r
+ }\r
+\r
+ leaf is-fru {\r
+ type boolean;\r
+ config false;\r
+\r
+ description\r
+ "This node indicates whether or not this component is\r
+ considered a 'field-replaceable unit' by the vendor. If\r
+ this node contains the value 'true', then this component\r
+ identifies a field-replaceable unit. For all components\r
+ that are permanently contained within a field-replaceable\r
+ unit, the value 'false' should be returned for this\r
+ node.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU";\r
+ }\r
+\r
+ leaf mfg-date {\r
+ type yang:date-and-time;\r
+ config false;\r
+ description\r
+ "The date of manufacturing of the managed component.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate";\r
+ }\r
+\r
+ leaf-list uri {\r
+ type inet:uri;\r
+ description\r
+ "This node contains identification information about the\r
+ component.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalUris";\r
+ }\r
+\r
+ leaf uuid {\r
+ type yang:uuid;\r
+ config false;\r
+ description\r
+ "A Universally Unique Identifier of the component.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entPhysicalUUID";\r
+ }\r
+\r
+ container state {\r
+ if-feature hardware-state;\r
+ description\r
+ "State-related nodes";\r
+ reference\r
+ "RFC 4268: Entity State MIB";\r
+\r
+ leaf state-last-changed {\r
+ type yang:date-and-time;\r
+ config false;\r
+ description\r
+ "The date and time when the value of any of the\r
+ admin-state, oper-state, usage-state, alarm-state, or\r
+ standby-state changed for this component.\r
+ If there has been no change since the last\r
+ re-initialization of the local system, this node\r
+ contains the date and time of local system\r
+ initialization. If there has been no change since the\r
+ component was added to the local system, this node\r
+ contains the date and time of the insertion.";\r
+ reference\r
+ "RFC 4268: Entity State MIB - entStateLastChanged";\r
+ }\r
+\r
+ leaf admin-state {\r
+ type admin-state;\r
+ description\r
+ "The administrative state for this component.\r
+ This node refers to a component's administrative\r
+ permission to service both other components within its\r
+ containment hierarchy as well other users of its\r
+ services defined by means outside the scope of this\r
+ module.\r
+ Some components exhibit only a subset of the remaining\r
+ administrative state values. Some components cannot be\r
+ locked; hence, this node exhibits only the 'unlocked'\r
+ state. Other components cannot be shut down gracefully;\r
+ hence, this node does not exhibit the 'shutting-down'\r
+ state.";\r
+ reference\r
+ "RFC 4268: Entity State MIB - entStateAdmin";\r
+ }\r
+\r
+ leaf oper-state {\r
+ type oper-state;\r
+ config false;\r
+ description\r
+ "The operational state for this component.\r
+ Note that this node does not follow the administrative\r
+ state. An administrative state of 'down' does not\r
+ predict an operational state of 'disabled'.\r
+ Note that some implementations may not be able to\r
+ accurately report oper-state while the admin-state node\r
+ has a value other than 'unlocked'. In these cases, this\r
+ node MUST have a value of 'unknown'.";\r
+ reference\r
+ "RFC 4268: Entity State MIB - entStateOper";\r
+ }\r
+\r
+ leaf usage-state {\r
+ type usage-state;\r
+ config false;\r
+ description\r
+ "The usage state for this component.\r
+ This node refers to a component's ability to service\r
+ more components in a containment hierarchy.\r
+ Some components will exhibit only a subset of the usage\r
+ state values. Components that are unable to ever\r
+ service any components within a containment hierarchy\r
+ will always have a usage state of 'busy'. In some\r
+ cases, a component will be able to support only one\r
+ other component within its containment hierarchy and\r
+ will therefore only exhibit values of 'idle' and\r
+ 'busy'.";\r
+ reference\r
+ "RFC 4268: Entity State MIB - entStateUsage";\r
+ }\r
+\r
+ leaf alarm-state {\r
+ type alarm-state;\r
+ config false;\r
+ description\r
+ "The alarm state for this component. It does not\r
+ include the alarms raised on child components within its\r
+ containment hierarchy.";\r
+ reference\r
+ "RFC 4268: Entity State MIB - entStateAlarm";\r
+ }\r
+\r
+ leaf standby-state {\r
+ type standby-state;\r
+ config false;\r
+ description\r
+ "The standby state for this component.\r
+ Some components will exhibit only a subset of the\r
+ remaining standby state values. If this component\r
+ cannot operate in a standby role, the value of this node\r
+ will always be 'providing-service'.";\r
+ reference\r
+ "RFC 4268: Entity State MIB - entStateStandby";\r
+ }\r
+ }\r
+\r
+ container sensor-data {\r
+ when 'derived-from-or-self(../class,\r
+ "ianahw:sensor")' {\r
+ description\r
+ "Sensor data nodes present for any component of type\r
+ 'sensor'";\r
+ }\r
+ if-feature hardware-sensor;\r
+ config false;\r
+\r
+ description\r
+ "Sensor-related nodes.";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base";\r
+\r
+ leaf value {\r
+ type sensor-value;\r
+ description\r
+ "The most recent measurement obtained by the server\r
+ for this sensor.\r
+ A client that periodically fetches this node should also\r
+ fetch the nodes 'value-type', 'value-scale', and\r
+ 'value-precision', since they may change when the value\r
+ is changed.";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ entPhySensorValue";\r
+ }\r
+\r
+ leaf value-type {\r
+ type sensor-value-type;\r
+ description\r
+ "The type of data units associated with the\r
+ sensor value";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ entPhySensorType";\r
+ }\r
+ leaf value-scale {\r
+ type sensor-value-scale;\r
+ description\r
+ "The (power of 10) scaling factor associated\r
+ with the sensor value";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ entPhySensorScale";\r
+ }\r
+\r
+ leaf value-precision {\r
+ type sensor-value-precision;\r
+ description\r
+ "The number of decimal places of precision\r
+ associated with the sensor value";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ entPhySensorPrecision";\r
+ }\r
+\r
+ leaf oper-status {\r
+ type sensor-status;\r
+ description\r
+ "The operational status of the sensor.";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ entPhySensorOperStatus";\r
+ }\r
+\r
+ leaf units-display {\r
+ type string;\r
+ description\r
+ "A textual description of the data units that should be\r
+ used in the display of the sensor value.";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ entPhySensorUnitsDisplay";\r
+ }\r
+\r
+ leaf value-timestamp {\r
+ type yang:date-and-time;\r
+ description\r
+ "The time the status and/or value of this sensor was last\r
+ obtained by the server.";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ entPhySensorValueTimeStamp";\r
+ }\r
+ leaf value-update-rate {\r
+ type uint32;\r
+ units "milliseconds";\r
+ description\r
+ "An indication of the frequency that the server updates\r
+ the associated 'value' node, represented in\r
+ milliseconds. The value zero indicates:\r
+ - the sensor value is updated on demand (e.g.,\r
+ when polled by the server for a get-request),\r
+ - the sensor value is updated when the sensor\r
+ value changes (event-driven), or\r
+ - the server does not know the update rate.";\r
+ reference\r
+ "RFC 3433: Entity Sensor Management Information Base -\r
+ entPhySensorValueUpdateRate";\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+/*\r
+ * Notifications\r
+ */\r
+\r
+notification hardware-state-change {\r
+ description\r
+ "A hardware-state-change notification is generated when the\r
+ value of /hardware/last-change changes in the operational\r
+ state.";\r
+ reference\r
+ "RFC 6933: Entity MIB (Version 4) - entConfigChange";\r
+}\r
+\r
+notification hardware-state-oper-enabled {\r
+ if-feature hardware-state;\r
+ description\r
+ "A hardware-state-oper-enabled notification signifies that a\r
+ component has transitioned into the 'enabled' state.";\r
+\r
+ leaf name {\r
+ type leafref {\r
+ path "/hardware/component/name";\r
+ }\r
+\r
+ description\r
+ "The name of the component that has transitioned into the\r
+ 'enabled' state.";\r
+ }\r
+ leaf admin-state {\r
+ type leafref {\r
+ path "/hardware/component/state/admin-state";\r
+ }\r
+ description\r
+ "The administrative state for the component.";\r
+ }\r
+ leaf alarm-state {\r
+ type leafref {\r
+ path "/hardware/component/state/alarm-state";\r
+ }\r
+ description\r
+ "The alarm state for the component.";\r
+ }\r
+ reference\r
+ "RFC 4268: Entity State MIB - entStateOperEnabled";\r
+}\r
+\r
+notification hardware-state-oper-disabled {\r
+ if-feature hardware-state;\r
+ description\r
+ "A hardware-state-oper-disabled notification signifies that a\r
+ component has transitioned into the 'disabled' state.";\r
+\r
+ leaf name {\r
+ type leafref {\r
+ path "/hardware/component/name";\r
+ }\r
+ description\r
+ "The name of the component that has transitioned into the\r
+ 'disabled' state.";\r
+ }\r
+ leaf admin-state {\r
+ type leafref {\r
+ path "/hardware/component/state/admin-state";\r
+ }\r
+ description\r
+ "The administrative state for the component.";\r
+ }\r
+ leaf alarm-state {\r
+ type leafref {\r
+ path "/hardware/component/state/alarm-state";\r
+ }\r
+\r
+ description\r
+ "The alarm state for the component.";\r
+ }\r
+ reference\r
+ "RFC 4268: Entity State MIB - entStateOperDisabled";\r
+}\r
+\r
+}\r