Added test to verify BMC event log ID
Change-Id: Ibc7c18b151ea3182a4e445d3e4c3def36ad53cdf
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/openpower/pel/test_bmc_pel.robot b/openpower/pel/test_bmc_pel.robot
index 3a01054..288a1f3 100644
--- a/openpower/pel/test_bmc_pel.robot
+++ b/openpower/pel/test_bmc_pel.robot
@@ -170,6 +170,52 @@
Should Be Empty ${pel_bmc_error} msg=Unexpected error log generated during Host poweron.
+Verify BMC Event Log ID
+ [Documentation] Verify BMC Event Log ID from PEL.
+ [Tags] Verify_BMC_Event_Log_ID
+
+ Redfish Purge Event Log
+ Create Test PEL Log
+
+ ${pel_ids}= Get PEL Log Via BMC CLI
+ ${pel_bmc_event_log_id}= Get PEL Field Value ${pel_ids[0]} Private Header BMC Event Log Id
+
+ # Example "BMC Event Log Id" field value from "Private Header" section of PEL.
+ # [Private Header]:
+ # [Created at]: 08/24/1928 12:04:06
+ # [Created by]: 0x584D
+ # [Sub-section type]: 0
+ # [Entry Id]: 0x50000BB7
+ # [Platform Log Id]: 0x8200061D
+ # [CSSVER]:
+ # [Section Version]: 1
+ # [Creator Subsystem]: PHYP
+ # [BMC Event Log Id]: 341 <---- BMC event log id value
+ # [Committed at]: 03/25/1920 12:06:22
+
+ ${redfish_event_logs}= Redfish.Get Properties /redfish/v1/Systems/system/LogServices/EventLog/Entries
+
+ # Example of redfish_event_logs output:
+ # redfish_event_logs:
+ # [@odata.id]: /redfish/v1/Systems/system/LogServices/EventLog/Entries
+ # [Name]: System Event Log Entries
+ # [Members@odata.count]: 1
+ # [@odata.type]: #LogEntryCollection.LogEntryCollection
+ # [Description]: Collection of System Event Log Entries
+ # [Members]:
+ # [0]:
+ # [@odata.id]: /redfish/v1/Systems/system/LogServices/EventLog/Entries/235
+ # [Name]: System Event Log Entry
+ # [Severity]: Critical
+ # [EntryType]: Event
+ # [Created]: 2020-04-02T07:25:13+00:00
+ # [@odata.type]: #LogEntry.v1_5_1.LogEntry
+ # [Id]: 235 <----- Event log ID
+ # [Message]: xyz.openbmc_project.Common.Error.InternalFailure
+
+ Valid Value pel_bmc_event_log_id ['${redfish_event_logs['Members'][0]['Id']}']
+
+
*** Keywords ***
Create Test PEL Log