PEL: Prevent deletion if it's associated with HWIsolation
- This ensures that PELs linked to HWIsolation records are protected
from accidental deletion.
- Shows error message of "Call failed: The service is temporarily
unavailable.", when attempting to delete such a PEL individually.
- If trying to Delete all, will skip such PELs without showing any
message.
Tested:
Sample output:
```bash
$ busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/
logging xyz.openbmc_project.Collection.DeleteAll DeleteAll
$ busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/
logging/entry/2 xyz.openbmc_project.Object.Delete Delete
Call failed: The service is temporarily unavailable.
```
Change-Id: I2d28de91bbb0fbc2a991e3d5e5631814d41fe044
Signed-off-by: Harsh Agarwal <Harsh.Agarwal@ibm.com>
diff --git a/extensions.cpp b/extensions.cpp
index 2fc8792..c24c764 100644
--- a/extensions.cpp
+++ b/extensions.cpp
@@ -29,6 +29,12 @@
return deleteProhibitedFunctions;
}
+LogIDsWithHwIsolationFunctions& Extensions::getLogIDWithHwIsolationFunctions()
+{
+ static LogIDsWithHwIsolationFunctions logIDWithHwIsolationFunctions{};
+ return logIDWithHwIsolationFunctions;
+}
+
Extensions::DefaultErrorCaps& Extensions::getDefaultErrorCaps()
{
static DefaultErrorCaps defaultErrorCaps = DefaultErrorCaps::enable;