1# compare_presence
2
3## Description
4Compares a hardware component's presence to an expected value.  The hardware
5component must be a Field-Replaceable Unit (FRU).
6
7This action can be used for [presence_detection](presence_detection.md) of a
8[device](device.md).  It can also be used in an [if](if.md) condition to
9execute actions based on FRU presence.
10
11## Properties
12| Name | Required | Type | Description |
13| :--- | :------: | :--- | :---------- |
14| fru | yes | string | Field-Replaceable Unit.  Specify the relative D-Bus inventory path of the FRU.  Full inventory paths begin with the root "/xyz/openbmc_project/inventory".  Specify the relative path below the root, such as "system/chassis/motherboard/cpu3". |
15| value | yes | boolean (true or false) | Expected presence value. |
16
17## Return Value
18Returns true if the actual presence value equals the expected value, otherwise
19returns false.
20
21## Example
22```
23{
24  "comments": [ "Check if CPU3 is present" ],
25  "compare_presence": {
26    "fru": "system/chassis/motherboard/cpu3",
27    "value": true
28  }
29}
30```
31