openpower-pels: Create guard using libguard
Replace CreateWithEntityPath D-Bus method with guard library calls for
creating guard entries, as CreateWithEntityPath is not an approved dbus
method.
Tested and the guard record is created with the corresponding PEL id
```
before injecting the error
root@p10bmc:~# guard -l
No unresolved records to display
After injecting error, the guard is created using the PEL ID
root@p10bmc:~# guard -l
ID | ERROR | Type | Path
0x00000001 | 0x5000592b | unrecoverable | physical:sys-0/node-0/proc-0/eq-1/fc-0/core-0
root@p10bmc:~# peltool -l
{
"0x5000592B": {
"SRC": "BD13E510",
"Message": "Error Signature: 0x20DA0020 0x00000001 0x4D740407",
"PLID": "0x5000592B",
"CreatorID": "BMC",
"Subsystem": "Processor Unit (CPU)",
"Commit Time": "10/17/2024 09:54:22",
"Sev": "Unrecoverable Error",
"CompID": "bmc hw diags"
}
}
```
Change-Id: I7531bce403206beaa119aea0a621e6b47d28ffd0
Signed-off-by: deepakala-k <deepakala.karthikeyan@ibm.com>
diff --git a/extensions/openpower-pels/phal_service_actions.hpp b/extensions/openpower-pels/phal_service_actions.hpp
index 8032663..0dcd1ff 100644
--- a/extensions/openpower-pels/phal_service_actions.hpp
+++ b/extensions/openpower-pels/phal_service_actions.hpp
@@ -12,21 +12,15 @@
namespace phal
{
-using EntrySeverity =
- sdbusplus::server::xyz::openbmc_project::hardware_isolation::Entry::Type;
-
/**
* @brief Helper function to create service actions in the PEL
*
* @param[in] jsonCallouts - The array of JSON callouts, or an empty object.
- * @param[in] path - The BMC error log object path
* @param[in] dataIface - The DataInterface object
* @param[in] plid - the PLID
*/
void createServiceActions(const nlohmann::json& jsonCallouts,
- const std::string& path,
- const DataInterfaceBase& dataIface,
- const uint32_t plid);
+ const DataInterfaceBase& dataIface, uint32_t plid);
} // namespace phal
} // namespace pels
} // namespace openpower