Added keywords for dump and BMC state
Changes:
- Added keyword
"Redfish Get All System Dumps"
"Redfish Verify BMC State"
Tested:
- Ran successfully
Redfish Get All System Dumps
Redfish Verify BMC State
Change-Id: Iaf0b1fac7adf17300a0a2bec4a80943a3a7d00f7
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/data/variables.py b/data/variables.py
index 5c08380..2711ea6 100755
--- a/data/variables.py
+++ b/data/variables.py
@@ -227,6 +227,9 @@
"Managers/" + REDFISH_MANAGERS_ID + "/LogServices/Dump/Entries"
)
REDFISH_DUMP_URI = REDFISH_BASE_URI + REDFISH_BMC_DUMP
+REDFISH_SYSTEM_DUMP = (
+ REDFISH_BASE_URI + "/Systems/system/LogServices/Dump/Entries"
+)
# Boot options and URI variables.
POWER_ON = "On"
diff --git a/lib/dump_utils.robot b/lib/dump_utils.robot
index cc26705..9939194 100644
--- a/lib/dump_utils.robot
+++ b/lib/dump_utils.robot
@@ -156,7 +156,7 @@
Redfish Delete BMC Dump
- [Documentation] Deletes a given BMC dump via Redfish..
+ [Documentation] Deletes a given BMC dump via Redfish.
[Arguments] ${dump_id}
# Description of Argument(s):
@@ -175,6 +175,14 @@
Redfish.Post /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Actions/LogService.ClearLog
+Redfish Get All System Dumps
+ [Documentation] Get the system dump log entries.
+
+ ${resp}= Redfish.Get ${REDFISH_SYSTEM_DUMP}
+
+ [Return] ${resp.dict}
+
+
Get Redfish BMC Dump Log Entries
[Documentation] Get the BMC dump log entries.
diff --git a/lib/utils.robot b/lib/utils.robot
index 35a2d8a..7be72b3 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -908,6 +908,18 @@
[Return] ${status["State"]}
+Redfish Verify BMC State
+ [Documentation] Verify BMC state is enabled.
+ [Arguments] ${match_state}=Enabled
+
+ # Description of argument(s):
+ # match_state Expected match state (e.g. Enabled, Starting, Error)
+
+ ${Status}= Redfish.Get Attribute /redfish/v1/Managers/bmc Status
+
+ Should Be Equal As Strings ${match_state} ${Status['State']}
+
+
Redfish Get Host State
[Documentation] Return host power and health state.