Add power supply call out to UV and input faults
Add the inventory string to the call out for the VIN_UV_FAULT and
INPUT_FAULT conditions. This should result in the enclosure LED turning
on as an indicator that the system requires some service attention.
Change-Id: I1d00086bf1809a424c81e77b1f22c24204e15198
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/elog-errors.hpp b/elog-errors.hpp
index e71aa5f..d50d7b1 100644
--- a/elog-errors.hpp
+++ b/elog-errors.hpp
@@ -679,7 +679,8 @@
{
static constexpr auto L = level::ERR;
using RAW_STATUS = _PowerSupplyUnderVoltageFault::RAW_STATUS;
- using metadata_types = std::tuple<RAW_STATUS>;
+ using CALLOUT_INVENTORY_PATH = xyz::openbmc_project::Common::Callout::Inventory::CALLOUT_INVENTORY_PATH;
+ using metadata_types = std::tuple<RAW_STATUS, CALLOUT_INVENTORY_PATH>;
};
@@ -726,7 +727,8 @@
{
static constexpr auto L = level::ERR;
using RAW_STATUS = _PowerSupplyInputFault::RAW_STATUS;
- using metadata_types = std::tuple<RAW_STATUS>;
+ using CALLOUT_INVENTORY_PATH = xyz::openbmc_project::Common::Callout::Inventory::CALLOUT_INVENTORY_PATH;
+ using metadata_types = std::tuple<RAW_STATUS, CALLOUT_INVENTORY_PATH>;
};
diff --git a/org/open_power/Witherspoon/Fault.metadata.yaml b/org/open_power/Witherspoon/Fault.metadata.yaml
index 07c96eb..d9b69b6 100644
--- a/org/open_power/Witherspoon/Fault.metadata.yaml
+++ b/org/open_power/Witherspoon/Fault.metadata.yaml
@@ -3,11 +3,15 @@
meta:
- str: "RAW_STATUS=%s"
type: string
+ inherits:
+ - xyz.openbmc_project.Common.Callout.Inventory
- name: PowerSupplyInputFault
level: ERR
meta:
- str: "RAW_STATUS=%s"
type: string
+ inherits:
+ - xyz.openbmc_project.Common.Callout.Inventory
- name: PowerSupplyShouldBeOn
level: ERR
meta:
diff --git a/power-supply/power_supply.cpp b/power-supply/power_supply.cpp
index cdb3a73..fdb1227 100644
--- a/power-supply/power_supply.cpp
+++ b/power-supply/power_supply.cpp
@@ -254,8 +254,9 @@
using metadata = org::open_power::Witherspoon::Fault::
PowerSupplyUnderVoltageFault;
- report<PowerSupplyUnderVoltageFault>(metadata::RAW_STATUS(
- nv.get().c_str()));
+ report<PowerSupplyUnderVoltageFault>(
+ metadata::RAW_STATUS(nv.get().c_str()),
+ metadata::CALLOUT_INVENTORY_PATH(inventoryPath.c_str()));
}
else
{
@@ -280,7 +281,8 @@
PowerSupplyInputFault;
report<PowerSupplyInputFault>(
- metadata::RAW_STATUS(nv.get().c_str()));
+ metadata::RAW_STATUS(nv.get().c_str()),
+ metadata::CALLOUT_INVENTORY_PATH(inventoryPath.c_str()));
}
else
{