PEL: Get BMC event log ID from PEL ID
Changes:
- Created a keyword to get BMC ID for a PEL.
Tested:
- Created a dummy keyword to test it.
Signed-off-by: Anusha Dathatri <adathatr@in.ibm.com>
Change-Id: Ic89b2e70514b2aca1c293f7e9a869d6bf13c31f7
diff --git a/lib/pel_utils.py b/lib/pel_utils.py
index a60606a..cf7b39b 100644
--- a/lib/pel_utils.py
+++ b/lib/pel_utils.py
@@ -224,3 +224,17 @@
expected_srcs = []
print(expected_srcs)
return list(set(srcs_found) - set(expected_srcs))
+
+
+def get_bmc_event_log_id_for_pel(pel_id):
+ r"""
+ Return BMC event log ID for the given PEL ID.
+
+ Description of arguments:
+ pel_id PEL ID. E.g. 0x50000021.
+ """
+
+ pel_data = peltool("-i " + pel_id)
+ print(pel_data)
+ bmc_id_for_pel = pel_data["Private Header"]["BMC Event Log Id"]
+ return bmc_id_for_pel