Elia Battiston | 589addb | 2022-04-04 16:40:01 +0200 | [diff] [blame^] | 1 | module ietf-hardware { |
| 2 | yang-version 1.1; |
| 3 | namespace "urn:ietf:params:xml:ns:yang:ietf-hardware"; |
| 4 | prefix hw; |
| 5 | |
| 6 | import ietf-inet-types { |
| 7 | prefix inet; |
| 8 | } |
| 9 | import ietf-yang-types { |
| 10 | prefix yang; |
| 11 | } |
| 12 | import iana-hardware { |
| 13 | prefix ianahw; |
| 14 | } |
| 15 | |
| 16 | organization |
| 17 | "IETF NETMOD (Network Modeling) Working Group"; |
| 18 | |
| 19 | contact |
| 20 | "WG Web: <https://datatracker.ietf.org/wg/netmod/> |
| 21 | WG List: <mailto:netmod@ietf.org> |
| 22 | |
| 23 | Editor: Andy Bierman |
| 24 | <mailto:andy@yumaworks.com> |
| 25 | |
| 26 | Editor: Martin Bjorklund |
| 27 | <mailto:mbj@tail-f.com> |
| 28 | |
| 29 | Editor: Jie Dong |
| 30 | <mailto:jie.dong@huawei.com> |
| 31 | |
| 32 | Editor: Dan Romascanu |
| 33 | <mailto:dromasca@gmail.com>"; |
| 34 | |
| 35 | description |
| 36 | "This module contains a collection of YANG definitions for |
| 37 | managing hardware. |
| 38 | |
| 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. |
| 43 | |
| 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). |
| 50 | |
| 51 | This version of this YANG module is part of RFC 8348; see |
| 52 | the RFC itself for full legal notices."; |
| 53 | |
| 54 | revision 2018-03-13 { |
| 55 | description |
| 56 | "Initial revision."; |
| 57 | reference |
| 58 | "RFC 8348: A YANG Data Model for Hardware Management"; |
| 59 | } |
| 60 | |
| 61 | /* |
| 62 | * Features |
| 63 | */ |
| 64 | |
| 65 | feature entity-mib { |
| 66 | description |
| 67 | "This feature indicates that the device implements |
| 68 | the ENTITY-MIB."; |
| 69 | reference |
| 70 | "RFC 6933: Entity MIB (Version 4)"; |
| 71 | } |
| 72 | |
| 73 | feature hardware-state { |
| 74 | description |
| 75 | "Indicates that ENTITY-STATE-MIB objects are supported"; |
| 76 | reference |
| 77 | "RFC 4268: Entity State MIB"; |
| 78 | } |
| 79 | |
| 80 | feature hardware-sensor { |
| 81 | description |
| 82 | "Indicates that ENTITY-SENSOR-MIB objects are supported"; |
| 83 | reference |
| 84 | "RFC 3433: Entity Sensor Management Information Base"; |
| 85 | } |
| 86 | |
| 87 | /* |
| 88 | * Typedefs |
| 89 | */ |
| 90 | |
| 91 | typedef admin-state { |
| 92 | type enumeration { |
| 93 | enum unknown { |
| 94 | value 1; |
| 95 | description |
| 96 | "The resource is unable to report administrative state."; |
| 97 | } |
| 98 | enum locked { |
| 99 | value 2; |
| 100 | description |
| 101 | "The resource is administratively prohibited from use."; |
| 102 | } |
| 103 | enum shutting-down { |
| 104 | value 3; |
| 105 | description |
| 106 | "The resource usage is administratively limited to current |
| 107 | instances of use."; |
| 108 | } |
| 109 | enum unlocked { |
| 110 | value 4; |
| 111 | description |
| 112 | "The resource is not administratively prohibited from |
| 113 | use."; |
| 114 | } |
| 115 | } |
| 116 | description |
| 117 | "Represents the various possible administrative states."; |
| 118 | reference |
| 119 | "RFC 4268: Entity State MIB - EntityAdminState"; |
| 120 | } |
| 121 | |
| 122 | typedef oper-state { |
| 123 | type enumeration { |
| 124 | enum unknown { |
| 125 | value 1; |
| 126 | description |
| 127 | "The resource is unable to report its operational state."; |
| 128 | } |
| 129 | enum disabled { |
| 130 | value 2; |
| 131 | description |
| 132 | "The resource is totally inoperable."; |
| 133 | } |
| 134 | enum enabled { |
| 135 | value 3; |
| 136 | |
| 137 | description |
| 138 | "The resource is partially or fully operable."; |
| 139 | } |
| 140 | enum testing { |
| 141 | value 4; |
| 142 | description |
| 143 | "The resource is currently being tested and cannot |
| 144 | therefore report whether or not it is operational."; |
| 145 | } |
| 146 | } |
| 147 | description |
| 148 | "Represents the possible values of operational states."; |
| 149 | reference |
| 150 | "RFC 4268: Entity State MIB - EntityOperState"; |
| 151 | } |
| 152 | |
| 153 | typedef usage-state { |
| 154 | type enumeration { |
| 155 | enum unknown { |
| 156 | value 1; |
| 157 | description |
| 158 | "The resource is unable to report usage state."; |
| 159 | } |
| 160 | enum idle { |
| 161 | value 2; |
| 162 | description |
| 163 | "The resource is servicing no users."; |
| 164 | } |
| 165 | enum active { |
| 166 | value 3; |
| 167 | description |
| 168 | "The resource is currently in use, and it has sufficient |
| 169 | spare capacity to provide for additional users."; |
| 170 | } |
| 171 | enum busy { |
| 172 | value 4; |
| 173 | description |
| 174 | "The resource is currently in use, but it currently has no |
| 175 | spare capacity to provide for additional users."; |
| 176 | } |
| 177 | } |
| 178 | description |
| 179 | "Represents the possible values of usage states."; |
| 180 | reference |
| 181 | "RFC 4268: Entity State MIB - EntityUsageState"; |
| 182 | } |
| 183 | |
| 184 | typedef alarm-state { |
| 185 | type bits { |
| 186 | bit unknown { |
| 187 | position 0; |
| 188 | description |
| 189 | "The resource is unable to report alarm state."; |
| 190 | } |
| 191 | bit under-repair { |
| 192 | position 1; |
| 193 | description |
| 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."; |
| 197 | } |
| 198 | bit critical { |
| 199 | position 2; |
| 200 | description |
| 201 | "One or more critical alarms are active against the |
| 202 | resource."; |
| 203 | } |
| 204 | bit major { |
| 205 | position 3; |
| 206 | description |
| 207 | "One or more major alarms are active against the |
| 208 | resource."; |
| 209 | } |
| 210 | bit minor { |
| 211 | position 4; |
| 212 | description |
| 213 | "One or more minor alarms are active against the |
| 214 | resource."; |
| 215 | } |
| 216 | bit warning { |
| 217 | position 5; |
| 218 | description |
| 219 | "One or more warning alarms are active against the |
| 220 | resource."; |
| 221 | } |
| 222 | bit indeterminate { |
| 223 | position 6; |
| 224 | description |
| 225 | "One or more alarms of whose perceived severity cannot be |
| 226 | determined are active against this resource."; |
| 227 | } |
| 228 | } |
| 229 | description |
| 230 | "Represents the possible values of alarm states. An alarm is a |
| 231 | persistent indication of an error or warning condition. |
| 232 | |
| 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."; |
| 235 | reference |
| 236 | "RFC 4268: Entity State MIB - EntityAlarmStatus"; |
| 237 | } |
| 238 | |
| 239 | typedef standby-state { |
| 240 | type enumeration { |
| 241 | enum unknown { |
| 242 | value 1; |
| 243 | description |
| 244 | "The resource is unable to report standby state."; |
| 245 | } |
| 246 | enum hot-standby { |
| 247 | value 2; |
| 248 | description |
| 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."; |
| 254 | } |
| 255 | enum cold-standby { |
| 256 | value 3; |
| 257 | description |
| 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."; |
| 262 | } |
| 263 | enum providing-service { |
| 264 | value 4; |
| 265 | description |
| 266 | "The resource is providing service."; |
| 267 | } |
| 268 | } |
| 269 | description |
| 270 | "Represents the possible values of standby states."; |
| 271 | reference |
| 272 | "RFC 4268: Entity State MIB - EntityStandbyStatus"; |
| 273 | } |
| 274 | |
| 275 | typedef sensor-value-type { |
| 276 | type enumeration { |
| 277 | enum other { |
| 278 | value 1; |
| 279 | description |
| 280 | "A measure other than those listed below."; |
| 281 | } |
| 282 | enum unknown { |
| 283 | value 2; |
| 284 | description |
| 285 | "An unknown measurement or arbitrary, relative numbers"; |
| 286 | } |
| 287 | enum volts-AC { |
| 288 | value 3; |
| 289 | description |
| 290 | "A measure of electric potential (alternating current)."; |
| 291 | } |
| 292 | enum volts-DC { |
| 293 | value 4; |
| 294 | description |
| 295 | "A measure of electric potential (direct current)."; |
| 296 | } |
| 297 | enum amperes { |
| 298 | value 5; |
| 299 | description |
| 300 | "A measure of electric current."; |
| 301 | } |
| 302 | enum watts { |
| 303 | value 6; |
| 304 | description |
| 305 | "A measure of power."; |
| 306 | } |
| 307 | enum hertz { |
| 308 | value 7; |
| 309 | description |
| 310 | "A measure of frequency."; |
| 311 | } |
| 312 | enum celsius { |
| 313 | value 8; |
| 314 | description |
| 315 | "A measure of temperature."; |
| 316 | } |
| 317 | enum percent-RH { |
| 318 | value 9; |
| 319 | description |
| 320 | "A measure of percent relative humidity."; |
| 321 | } |
| 322 | enum rpm { |
| 323 | value 10; |
| 324 | description |
| 325 | "A measure of shaft revolutions per minute."; |
| 326 | } |
| 327 | enum cmm { |
| 328 | value 11; |
| 329 | description |
| 330 | "A measure of cubic meters per minute (airflow)."; |
| 331 | } |
| 332 | enum truth-value { |
| 333 | value 12; |
| 334 | description |
| 335 | "Value is one of 1 (true) or 2 (false)"; |
| 336 | } |
| 337 | } |
| 338 | description |
| 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. |
| 343 | |
| 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."; |
| 348 | reference |
| 349 | "RFC 3433: Entity Sensor Management Information Base - |
| 350 | EntitySensorDataType"; |
| 351 | } |
| 352 | |
| 353 | typedef sensor-value-scale { |
| 354 | type enumeration { |
| 355 | enum yocto { |
| 356 | value 1; |
| 357 | description |
| 358 | "Data scaling factor of 10^-24."; |
| 359 | } |
| 360 | enum zepto { |
| 361 | value 2; |
| 362 | description |
| 363 | "Data scaling factor of 10^-21."; |
| 364 | } |
| 365 | enum atto { |
| 366 | value 3; |
| 367 | description |
| 368 | "Data scaling factor of 10^-18."; |
| 369 | } |
| 370 | enum femto { |
| 371 | value 4; |
| 372 | description |
| 373 | "Data scaling factor of 10^-15."; |
| 374 | } |
| 375 | enum pico { |
| 376 | value 5; |
| 377 | description |
| 378 | "Data scaling factor of 10^-12."; |
| 379 | } |
| 380 | enum nano { |
| 381 | value 6; |
| 382 | description |
| 383 | "Data scaling factor of 10^-9."; |
| 384 | } |
| 385 | enum micro { |
| 386 | value 7; |
| 387 | description |
| 388 | "Data scaling factor of 10^-6."; |
| 389 | } |
| 390 | enum milli { |
| 391 | value 8; |
| 392 | description |
| 393 | "Data scaling factor of 10^-3."; |
| 394 | } |
| 395 | enum units { |
| 396 | value 9; |
| 397 | description |
| 398 | "Data scaling factor of 10^0."; |
| 399 | } |
| 400 | enum kilo { |
| 401 | value 10; |
| 402 | description |
| 403 | "Data scaling factor of 10^3."; |
| 404 | } |
| 405 | enum mega { |
| 406 | value 11; |
| 407 | description |
| 408 | "Data scaling factor of 10^6."; |
| 409 | } |
| 410 | enum giga { |
| 411 | value 12; |
| 412 | description |
| 413 | "Data scaling factor of 10^9."; |
| 414 | } |
| 415 | enum tera { |
| 416 | value 13; |
| 417 | description |
| 418 | "Data scaling factor of 10^12."; |
| 419 | } |
| 420 | enum peta { |
| 421 | value 14; |
| 422 | description |
| 423 | "Data scaling factor of 10^15."; |
| 424 | } |
| 425 | enum exa { |
| 426 | value 15; |
| 427 | description |
| 428 | "Data scaling factor of 10^18."; |
| 429 | } |
| 430 | enum zetta { |
| 431 | value 16; |
| 432 | description |
| 433 | "Data scaling factor of 10^21."; |
| 434 | } |
| 435 | enum yotta { |
| 436 | value 17; |
| 437 | description |
| 438 | "Data scaling factor of 10^24."; |
| 439 | } |
| 440 | } |
| 441 | description |
| 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. |
| 446 | |
| 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."; |
| 451 | reference |
| 452 | "RFC 3433: Entity Sensor Management Information Base - |
| 453 | EntitySensorDataScale"; |
| 454 | } |
| 455 | |
| 456 | typedef sensor-value-precision { |
| 457 | type int8 { |
| 458 | range "-8 .. 9"; |
| 459 | } |
| 460 | description |
| 461 | "A node using this data type represents a sensor value |
| 462 | precision range. |
| 463 | |
| 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. |
| 468 | |
| 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. |
| 472 | |
| 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. |
| 476 | |
| 477 | The value zero indicates the associated sensor-value node is |
| 478 | not a fixed-point number. |
| 479 | |
| 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. |
| 483 | |
| 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 |
| 490 | 'degrees C * 10'."; |
| 491 | reference |
| 492 | "RFC 3433: Entity Sensor Management Information Base - |
| 493 | EntitySensorPrecision"; |
| 494 | } |
| 495 | |
| 496 | typedef sensor-value { |
| 497 | type int32 { |
| 498 | range "-1000000000 .. 1000000000"; |
| 499 | } |
| 500 | description |
| 501 | "A node using this data type represents a sensor value. |
| 502 | |
| 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 |
| 507 | of this data type. |
| 508 | |
| 509 | The semantics of a node using this data type are determined by |
| 510 | the value of the associated sensor-value-type node. |
| 511 | |
| 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. |
| 520 | |
| 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. |
| 524 | |
| 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. |
| 528 | |
| 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). |
| 532 | |
| 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."; |
| 536 | reference |
| 537 | "RFC 3433: Entity Sensor Management Information Base - |
| 538 | EntitySensorValue"; |
| 539 | } |
| 540 | |
| 541 | typedef sensor-status { |
| 542 | type enumeration { |
| 543 | enum ok { |
| 544 | value 1; |
| 545 | description |
| 546 | "Indicates that the server can obtain the sensor value."; |
| 547 | } |
| 548 | enum unavailable { |
| 549 | value 2; |
| 550 | description |
| 551 | "Indicates that the server presently cannot obtain the |
| 552 | sensor value."; |
| 553 | } |
| 554 | enum nonoperational { |
| 555 | value 3; |
| 556 | description |
| 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."; |
| 561 | } |
| 562 | } |
| 563 | description |
| 564 | "A node using this data type represents the operational status |
| 565 | of a physical sensor."; |
| 566 | reference |
| 567 | "RFC 3433: Entity Sensor Management Information Base - |
| 568 | EntitySensorStatus"; |
| 569 | } |
| 570 | |
| 571 | /* |
| 572 | * Data nodes |
| 573 | */ |
| 574 | |
| 575 | container hardware { |
| 576 | description |
| 577 | "Data nodes representing components. |
| 578 | |
| 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 |
| 583 | this information."; |
| 584 | |
| 585 | leaf last-change { |
| 586 | type yang:date-and-time; |
| 587 | config false; |
| 588 | description |
| 589 | "The time the '/hardware/component' list changed in the |
| 590 | operational state."; |
| 591 | } |
| 592 | |
| 593 | list component { |
| 594 | key name; |
| 595 | description |
| 596 | "List of components. |
| 597 | |
| 598 | When the server detects a new hardware component, it |
| 599 | initializes a list entry in the operational state. |
| 600 | |
| 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 |
| 604 | implementation. |
| 605 | |
| 606 | Otherwise, this procedure is followed: |
| 607 | |
| 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'. |
| 614 | |
| 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 |
| 618 | the implementation. |
| 619 | |
| 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)."; |
| 623 | reference |
| 624 | "RFC 6933: Entity MIB (Version 4) - entPhysicalEntry"; |
| 625 | |
| 626 | leaf name { |
| 627 | type string; |
| 628 | description |
| 629 | "The name assigned to this component. |
| 630 | |
| 631 | This name is not required to be the same as |
| 632 | entPhysicalName."; |
| 633 | } |
| 634 | |
| 635 | leaf class { |
| 636 | type identityref { |
| 637 | base ianahw:hardware-class; |
| 638 | } |
| 639 | mandatory true; |
| 640 | description |
| 641 | "An indication of the general hardware type of the |
| 642 | component."; |
| 643 | reference |
| 644 | "RFC 6933: Entity MIB (Version 4) - entPhysicalClass"; |
| 645 | } |
| 646 | |
| 647 | leaf physical-index { |
| 648 | if-feature entity-mib; |
| 649 | type int32 { |
| 650 | range "1..2147483647"; |
| 651 | } |
| 652 | config false; |
| 653 | description |
| 654 | "The entPhysicalIndex for the entPhysicalEntry represented |
| 655 | by this list entry."; |
| 656 | reference |
| 657 | "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; |
| 658 | } |
| 659 | |
| 660 | leaf description { |
| 661 | type string; |
| 662 | config false; |
| 663 | description |
| 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."; |
| 668 | reference |
| 669 | "RFC 6933: Entity MIB (Version 4) - entPhysicalDescr"; |
| 670 | } |
| 671 | |
| 672 | leaf parent { |
| 673 | type leafref { |
| 674 | path "../../component/name"; |
| 675 | require-instance false; |
| 676 | } |
| 677 | description |
| 678 | "The name of the component that physically contains this |
| 679 | component. |
| 680 | |
| 681 | If this leaf is not instantiated, it indicates that this |
| 682 | component is not contained in any other component. |
| 683 | |
| 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."; |
| 689 | reference |
| 690 | "RFC 6933: Entity MIB (Version 4) - entPhysicalContainedIn"; |
| 691 | } |
| 692 | |
| 693 | leaf parent-rel-pos { |
| 694 | type int32 { |
| 695 | range "0 .. 2147483647"; |
| 696 | } |
| 697 | description |
| 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: |
| 701 | |
| 702 | o share the same value of the 'parent' node and |
| 703 | |
| 704 | o share a common base identity for the 'class' node. |
| 705 | |
| 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))."; |
| 714 | |
| 715 | reference |
| 716 | "RFC 6933: Entity MIB (Version 4) - |
| 717 | entPhysicalParentRelPos"; |
| 718 | } |
| 719 | |
| 720 | leaf-list contains-child { |
| 721 | type leafref { |
| 722 | path "../../component/name"; |
| 723 | } |
| 724 | config false; |
| 725 | description |
| 726 | "The name of the contained component."; |
| 727 | reference |
| 728 | "RFC 6933: Entity MIB (Version 4) - entPhysicalChildIndex"; |
| 729 | } |
| 730 | |
| 731 | leaf hardware-rev { |
| 732 | type string; |
| 733 | config false; |
| 734 | description |
| 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 |
| 738 | present)."; |
| 739 | reference |
| 740 | "RFC 6933: Entity MIB (Version 4) - |
| 741 | entPhysicalHardwareRev"; |
| 742 | } |
| 743 | |
| 744 | leaf firmware-rev { |
| 745 | type string; |
| 746 | config false; |
| 747 | description |
| 748 | "The vendor-specific firmware revision string for the |
| 749 | component."; |
| 750 | reference |
| 751 | "RFC 6933: Entity MIB (Version 4) - |
| 752 | entPhysicalFirmwareRev"; |
| 753 | } |
| 754 | |
| 755 | leaf software-rev { |
| 756 | type string; |
| 757 | config false; |
| 758 | |
| 759 | description |
| 760 | "The vendor-specific software revision string for the |
| 761 | component."; |
| 762 | reference |
| 763 | "RFC 6933: Entity MIB (Version 4) - |
| 764 | entPhysicalSoftwareRev"; |
| 765 | } |
| 766 | |
| 767 | leaf serial-num { |
| 768 | type string; |
| 769 | config false; |
| 770 | description |
| 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 |
| 774 | present)."; |
| 775 | reference |
| 776 | "RFC 6933: Entity MIB (Version 4) - entPhysicalSerialNum"; |
| 777 | } |
| 778 | |
| 779 | leaf mfg-name { |
| 780 | type string; |
| 781 | config false; |
| 782 | description |
| 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). |
| 786 | |
| 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'. |
| 791 | |
| 792 | If the manufacturer name string associated with the |
| 793 | physical component is unknown to the server, then this |
| 794 | node is not instantiated."; |
| 795 | reference |
| 796 | "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName"; |
| 797 | } |
| 798 | |
| 799 | leaf model-name { |
| 800 | type string; |
| 801 | config false; |
| 802 | description |
| 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 |
| 809 | instantiated."; |
| 810 | reference |
| 811 | "RFC 6933: Entity MIB (Version 4) - entPhysicalModelName"; |
| 812 | } |
| 813 | |
| 814 | leaf alias { |
| 815 | type string; |
| 816 | description |
| 817 | "An 'alias' name for the component, as specified by a |
| 818 | network manager, that provides a non-volatile 'handle' for |
| 819 | the component. |
| 820 | |
| 821 | If no configured value exists, the server MAY set the |
| 822 | value of this node to a locally unique value in the |
| 823 | operational state. |
| 824 | |
| 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."; |
| 831 | reference |
| 832 | "RFC 6933: Entity MIB (Version 4) - entPhysicalAlias"; |
| 833 | } |
| 834 | |
| 835 | leaf asset-id { |
| 836 | type string; |
| 837 | description |
| 838 | "This node is a user-assigned asset tracking identifier for |
| 839 | the component. |
| 840 | |
| 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."; |
| 847 | reference |
| 848 | "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID"; |
| 849 | } |
| 850 | |
| 851 | leaf is-fru { |
| 852 | type boolean; |
| 853 | config false; |
| 854 | |
| 855 | description |
| 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 |
| 862 | node."; |
| 863 | reference |
| 864 | "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU"; |
| 865 | } |
| 866 | |
| 867 | leaf mfg-date { |
| 868 | type yang:date-and-time; |
| 869 | config false; |
| 870 | description |
| 871 | "The date of manufacturing of the managed component."; |
| 872 | reference |
| 873 | "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate"; |
| 874 | } |
| 875 | |
| 876 | leaf-list uri { |
| 877 | type inet:uri; |
| 878 | description |
| 879 | "This node contains identification information about the |
| 880 | component."; |
| 881 | reference |
| 882 | "RFC 6933: Entity MIB (Version 4) - entPhysicalUris"; |
| 883 | } |
| 884 | |
| 885 | leaf uuid { |
| 886 | type yang:uuid; |
| 887 | config false; |
| 888 | description |
| 889 | "A Universally Unique Identifier of the component."; |
| 890 | reference |
| 891 | "RFC 6933: Entity MIB (Version 4) - entPhysicalUUID"; |
| 892 | } |
| 893 | |
| 894 | container state { |
| 895 | if-feature hardware-state; |
| 896 | description |
| 897 | "State-related nodes"; |
| 898 | reference |
| 899 | "RFC 4268: Entity State MIB"; |
| 900 | |
| 901 | leaf state-last-changed { |
| 902 | type yang:date-and-time; |
| 903 | config false; |
| 904 | description |
| 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. |
| 908 | |
| 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."; |
| 915 | reference |
| 916 | "RFC 4268: Entity State MIB - entStateLastChanged"; |
| 917 | } |
| 918 | |
| 919 | leaf admin-state { |
| 920 | type admin-state; |
| 921 | description |
| 922 | "The administrative state for this component. |
| 923 | |
| 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 |
| 928 | module. |
| 929 | |
| 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' |
| 935 | state."; |
| 936 | reference |
| 937 | "RFC 4268: Entity State MIB - entStateAdmin"; |
| 938 | } |
| 939 | |
| 940 | leaf oper-state { |
| 941 | type oper-state; |
| 942 | config false; |
| 943 | description |
| 944 | "The operational state for this component. |
| 945 | |
| 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'. |
| 949 | |
| 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'."; |
| 954 | reference |
| 955 | "RFC 4268: Entity State MIB - entStateOper"; |
| 956 | } |
| 957 | |
| 958 | leaf usage-state { |
| 959 | type usage-state; |
| 960 | config false; |
| 961 | description |
| 962 | "The usage state for this component. |
| 963 | |
| 964 | This node refers to a component's ability to service |
| 965 | more components in a containment hierarchy. |
| 966 | |
| 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 |
| 974 | 'busy'."; |
| 975 | reference |
| 976 | "RFC 4268: Entity State MIB - entStateUsage"; |
| 977 | } |
| 978 | |
| 979 | leaf alarm-state { |
| 980 | type alarm-state; |
| 981 | config false; |
| 982 | description |
| 983 | "The alarm state for this component. It does not |
| 984 | include the alarms raised on child components within its |
| 985 | containment hierarchy."; |
| 986 | reference |
| 987 | "RFC 4268: Entity State MIB - entStateAlarm"; |
| 988 | } |
| 989 | |
| 990 | leaf standby-state { |
| 991 | type standby-state; |
| 992 | config false; |
| 993 | description |
| 994 | "The standby state for this component. |
| 995 | |
| 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'."; |
| 1000 | reference |
| 1001 | "RFC 4268: Entity State MIB - entStateStandby"; |
| 1002 | } |
| 1003 | } |
| 1004 | |
| 1005 | container sensor-data { |
| 1006 | when 'derived-from-or-self(../class, |
| 1007 | "ianahw:sensor")' { |
| 1008 | description |
| 1009 | "Sensor data nodes present for any component of type |
| 1010 | 'sensor'"; |
| 1011 | } |
| 1012 | if-feature hardware-sensor; |
| 1013 | config false; |
| 1014 | |
| 1015 | description |
| 1016 | "Sensor-related nodes."; |
| 1017 | reference |
| 1018 | "RFC 3433: Entity Sensor Management Information Base"; |
| 1019 | |
| 1020 | leaf value { |
| 1021 | type sensor-value; |
| 1022 | description |
| 1023 | "The most recent measurement obtained by the server |
| 1024 | for this sensor. |
| 1025 | |
| 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 |
| 1029 | is changed."; |
| 1030 | reference |
| 1031 | "RFC 3433: Entity Sensor Management Information Base - |
| 1032 | entPhySensorValue"; |
| 1033 | } |
| 1034 | |
| 1035 | leaf value-type { |
| 1036 | type sensor-value-type; |
| 1037 | description |
| 1038 | "The type of data units associated with the |
| 1039 | sensor value"; |
| 1040 | reference |
| 1041 | "RFC 3433: Entity Sensor Management Information Base - |
| 1042 | entPhySensorType"; |
| 1043 | } |
| 1044 | leaf value-scale { |
| 1045 | type sensor-value-scale; |
| 1046 | description |
| 1047 | "The (power of 10) scaling factor associated |
| 1048 | with the sensor value"; |
| 1049 | reference |
| 1050 | "RFC 3433: Entity Sensor Management Information Base - |
| 1051 | entPhySensorScale"; |
| 1052 | } |
| 1053 | |
| 1054 | leaf value-precision { |
| 1055 | type sensor-value-precision; |
| 1056 | description |
| 1057 | "The number of decimal places of precision |
| 1058 | associated with the sensor value"; |
| 1059 | reference |
| 1060 | "RFC 3433: Entity Sensor Management Information Base - |
| 1061 | entPhySensorPrecision"; |
| 1062 | } |
| 1063 | |
| 1064 | leaf oper-status { |
| 1065 | type sensor-status; |
| 1066 | description |
| 1067 | "The operational status of the sensor."; |
| 1068 | reference |
| 1069 | "RFC 3433: Entity Sensor Management Information Base - |
| 1070 | entPhySensorOperStatus"; |
| 1071 | } |
| 1072 | |
| 1073 | leaf units-display { |
| 1074 | type string; |
| 1075 | description |
| 1076 | "A textual description of the data units that should be |
| 1077 | used in the display of the sensor value."; |
| 1078 | reference |
| 1079 | "RFC 3433: Entity Sensor Management Information Base - |
| 1080 | entPhySensorUnitsDisplay"; |
| 1081 | } |
| 1082 | |
| 1083 | leaf value-timestamp { |
| 1084 | type yang:date-and-time; |
| 1085 | description |
| 1086 | "The time the status and/or value of this sensor was last |
| 1087 | obtained by the server."; |
| 1088 | reference |
| 1089 | "RFC 3433: Entity Sensor Management Information Base - |
| 1090 | entPhySensorValueTimeStamp"; |
| 1091 | } |
| 1092 | leaf value-update-rate { |
| 1093 | type uint32; |
| 1094 | units "milliseconds"; |
| 1095 | description |
| 1096 | "An indication of the frequency that the server updates |
| 1097 | the associated 'value' node, represented in |
| 1098 | milliseconds. The value zero indicates: |
| 1099 | |
| 1100 | - the sensor value is updated on demand (e.g., |
| 1101 | when polled by the server for a get-request), |
| 1102 | |
| 1103 | - the sensor value is updated when the sensor |
| 1104 | value changes (event-driven), or |
| 1105 | |
| 1106 | - the server does not know the update rate."; |
| 1107 | reference |
| 1108 | "RFC 3433: Entity Sensor Management Information Base - |
| 1109 | entPhySensorValueUpdateRate"; |
| 1110 | } |
| 1111 | } |
| 1112 | } |
| 1113 | } |
| 1114 | |
| 1115 | /* |
| 1116 | * Notifications |
| 1117 | */ |
| 1118 | |
| 1119 | notification hardware-state-change { |
| 1120 | description |
| 1121 | "A hardware-state-change notification is generated when the |
| 1122 | value of /hardware/last-change changes in the operational |
| 1123 | state."; |
| 1124 | reference |
| 1125 | "RFC 6933: Entity MIB (Version 4) - entConfigChange"; |
| 1126 | } |
| 1127 | |
| 1128 | notification hardware-state-oper-enabled { |
| 1129 | if-feature hardware-state; |
| 1130 | description |
| 1131 | "A hardware-state-oper-enabled notification signifies that a |
| 1132 | component has transitioned into the 'enabled' state."; |
| 1133 | |
| 1134 | leaf name { |
| 1135 | type leafref { |
| 1136 | path "/hardware/component/name"; |
| 1137 | } |
| 1138 | |
| 1139 | description |
| 1140 | "The name of the component that has transitioned into the |
| 1141 | 'enabled' state."; |
| 1142 | } |
| 1143 | leaf admin-state { |
| 1144 | type leafref { |
| 1145 | path "/hardware/component/state/admin-state"; |
| 1146 | } |
| 1147 | description |
| 1148 | "The administrative state for the component."; |
| 1149 | } |
| 1150 | leaf alarm-state { |
| 1151 | type leafref { |
| 1152 | path "/hardware/component/state/alarm-state"; |
| 1153 | } |
| 1154 | description |
| 1155 | "The alarm state for the component."; |
| 1156 | } |
| 1157 | reference |
| 1158 | "RFC 4268: Entity State MIB - entStateOperEnabled"; |
| 1159 | } |
| 1160 | |
| 1161 | notification hardware-state-oper-disabled { |
| 1162 | if-feature hardware-state; |
| 1163 | description |
| 1164 | "A hardware-state-oper-disabled notification signifies that a |
| 1165 | component has transitioned into the 'disabled' state."; |
| 1166 | |
| 1167 | leaf name { |
| 1168 | type leafref { |
| 1169 | path "/hardware/component/name"; |
| 1170 | } |
| 1171 | description |
| 1172 | "The name of the component that has transitioned into the |
| 1173 | 'disabled' state."; |
| 1174 | } |
| 1175 | leaf admin-state { |
| 1176 | type leafref { |
| 1177 | path "/hardware/component/state/admin-state"; |
| 1178 | } |
| 1179 | description |
| 1180 | "The administrative state for the component."; |
| 1181 | } |
| 1182 | leaf alarm-state { |
| 1183 | type leafref { |
| 1184 | path "/hardware/component/state/alarm-state"; |
| 1185 | } |
| 1186 | |
| 1187 | description |
| 1188 | "The alarm state for the component."; |
| 1189 | } |
| 1190 | reference |
| 1191 | "RFC 4268: Entity State MIB - entStateOperDisabled"; |
| 1192 | } |
| 1193 | |
| 1194 | } |