Redfish EventLog utility keyword
Changes:
- Added keyword to get EventLog entries.
Change-Id: I7f8cfbb1c1c2d103b2210d99f6a6be66d35d1796
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/data/variables.py b/data/variables.py
index ac6ee40..0de3b63 100755
--- a/data/variables.py
+++ b/data/variables.py
@@ -166,6 +166,11 @@
CLIENT_CERTIFICATE_URI = OPENBMC_BASE_URI + 'certs/client/ldap'
CA_CERTIFICATE_URI = OPENBMC_BASE_URI + 'certs/authority/ldap'
+# EventLog variables.
+SYSTEM_BASE_URI = REDFISH_BASE_URI + 'Systems/system/'
+EVENT_LOG_ENTRY_URI = SYSTEM_BASE_URI + 'LogServices/EventLog/Entries/'
+
+
'''
QEMU HTTPS variable:
diff --git a/lib/logging_utils.robot b/lib/logging_utils.robot
index b13057c..f17a376 100644
--- a/lib/logging_utils.robot
+++ b/lib/logging_utils.robot
@@ -173,3 +173,32 @@
... msg=Debug tarball path value is required.
BMC Execute Command rm -rf /tmp/tarball
Install Debug Tarball On BMC ${DEBUG_TARBALL_PATH}
+
+
+Get Event Logs
+ [Documentation] Get all available EventLog entries.
+
+ #{
+ # "@odata.context": "/redfish/v1/$metadata#LogEntryCollection.LogEntryCollection",
+ # "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries",
+ # "@odata.type": "#LogEntryCollection.LogEntryCollection",
+ # "Description": "Collection of System Event Log Entries",
+ # "Members": [
+ # {
+ # "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
+ # "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/1",
+ # "@odata.type": "#LogEntry.v1_4_0.LogEntry",
+ # "Created": "2019-05-29T13:19:27+00:00",
+ # "EntryType": "Event",
+ # "Id": "1",
+ # "Message": "org.open_power.Host.Error.Event",
+ # "Name": "System DBus Event Log Entry",
+ # "Severity": "Critical"
+ # }
+ # ],
+ # "Members@odata.count": 1,
+ # "Name": "System Event Log Entries"
+ #}
+
+ ${members}= Redfish.Get Attribute ${EVENT_LOG_ENTRY_URI} Members
+ [Return] ${members}