Compares a VPD (Vital Product Data) keyword value to an expected value.
VPD is information that describes a hardware component. VPD is typically read from an EEPROM on a Field-Replaceable Unit (FRU). For this reason, VPD is also called "FRU data".
The phosphor-regulators application obtains VPD keyword values from D-Bus. Other BMC applications and drivers are responsible for reading VPD from hardware components and publishing it on D-Bus.
The following VPD keywords are currently supported:
This action can be used in an if condition to execute actions based on a VPD keyword value. For example, you could set the output voltage only for regulators with a specific Model number.
A keyword value may be unavailable if:
If the keyword value is unavailable, it will be treated as having an "empty" value:
If the expected value is not "empty", the compare_vpd action will return false since the values will not match.
Name | Required | Type | Description |
---|---|---|---|
fru | yes | string | Field-Replaceable Unit (FRU) that contains the VPD. 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/disk_backplane". |
keyword | yes | string | VPD keyword. Specify one of the following: "CCIN", "Manufacturer", "Model", "PartNumber", "HW". |
value | see notes | string | Expected value. |
byte_values | see notes | array of strings | Zero or more expected byte values expressed in hexadecimal. Each value must be prefixed with 0x and surrounded by double quotes. |
Returns true if the keyword value equals the expected value, otherwise returns false.
{ "comments": [ "Check if disk backplane has CCIN value 2D35" ], "compare_vpd": { "fru": "system/chassis/disk_backplane", "keyword": "CCIN", "value": "2D35" } }
{ "comments": [ "Check if disk backplane has CCIN value 0x32, 0x44, 0x33, 0x35" ], "compare_vpd": { "fru": "system/chassis/disk_backplane", "keyword": "CCIN", "byte_values": [ "0x32", "0x44", "0x33", "0x35" ] } }