presence_detection

Description

Specifies how to detect whether a device is present.

Some devices are only present in certain system configurations. For example:

  • A regulator is only present when a related processor or memory module is present.
  • A system supports multiple storage backplane types, and the device only exists on one of the backplanes.

Device presence is detected by executing actions, such as compare_presence and compare_vpd.

Device operations like configuration, sensor monitoring, and phase fault detection will only be performed if the actions indicate the device is present.

The actions can be specified in two ways:

  • Use the "rule_id" property to specify a standard rule to run.
  • Use the "actions" property to specify an array of actions that are unique to this device.

The return value of the rule or the last action in the array indicates whether the device is present. A return value of true means the device is present; false means the device is missing.

Device presence will only be detected once per boot of the system. Presence will be determined prior to the first device operation (such as configuration). When the system is re-booted, presence will be re-detected. As a result, presence detection is not supported for devices that can be removed or added (hot-plugged) while the system is booted and running.

Properties

NameRequiredTypeDescription
commentsnoarray of stringsOne or more comment lines describing the presence detection.
rule_idsee notesstringUnique ID of the rule to execute.
actionssee notesarray of actionsOne or more actions to execute.

Notes

  • You must specify either "rule_id" or "actions".

Examples

{
  "comments": [ "Regulator is only present on the FooBar backplane" ],
  "rule_id": "is_foobar_backplane_installed_rule"
}

{
  "comments": [ "Regulator is only present when CPU 3 is present" ],
  "actions": [
    {
      "compare_presence": {
        "fru": "system/chassis/motherboard/cpu3",
        "value": true
      }
    }
  ]
}