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/test/openpower-pels/mocks.hpp b/test/openpower-pels/mocks.hpp
index 3b74871..ae8d385 100644
--- a/test/openpower-pels/mocks.hpp
+++ b/test/openpower-pels/mocks.hpp
@@ -68,6 +68,10 @@
MOCK_METHOD(std::vector<uint8_t>, getRawProgressSRC, (), (const override));
MOCK_METHOD(std::optional<std::vector<uint8_t>>, getDIProperty,
(const std::string&), (const override));
+ MOCK_METHOD(DBusPathList, getAssociatedPaths,
+ (const DBusPath&, const DBusPath&, int32_t,
+ const DBusInterfaceList&),
+ (const override));
void changeHostState(bool newState)
{