Hardbootme use either REST or Redfish power on/off
In 'Test Setup Execution' determine if Redfish or not.
Resolves openbmc/openbmc-test-automation#1689
Signed-off-by: Steven Sombar <ssombar@us.ibm.com>
Change-Id: Ic5b1363d66d4e6b2fd45ae77b5fb47fc037333a5
diff --git a/systest/htx_hardbootme_test.robot b/systest/htx_hardbootme_test.robot
index 5b6fbdb..f180a17 100755
--- a/systest/htx_hardbootme_test.robot
+++ b/systest/htx_hardbootme_test.robot
@@ -60,6 +60,8 @@
${INV_IGNORE_LIST} size
${PREV_INV_FILE_PATH} NONE
+${rest_keyword} REST
+
# Error log Severities to ignore when checking for eSELs.
@{ESEL_WHITELIST}
... xyz.openbmc_project.Logging.Entry.Level.Informational
@@ -124,7 +126,7 @@
Printn
Rpvars loop_count estimated_loop_time estimated_time_remaining
- REST Power On stack_mode=skip
+ Run Keyword ${rest_keyword} Power On stack_mode=skip
Run Key U Sleep \ 15s
# Post Power off and on, the OS SSH session needs to be established.
@@ -147,7 +149,7 @@
... Do Inventory And Compare ${json_final_file_path}
... ${PREV_INV_FILE_PATH}
- Power Off Host
+ Run Keyword ${rest_keyword} Power Off
# Close all SSH and REST active sessions.
Close All Connections
@@ -255,7 +257,13 @@
${pnor_version}= Get Host Software Objects Details
Rpvars pnor_version
- REST Power On stack_mode=skip
+ ${is_redfish}= Run Keyword And Return Status Redfish.Login
+ ${rest_keyword}= Set Variable If ${is_redfish} Redfish REST
+ Rprint Vars rest_keyword
+ Set Suite Variable ${rest_keyword} children=true
+
+ Run Keyword ${rest_keyword} Power On stack_mode=skip
+
Run Key U Sleep \ 15s
Delete All Error Logs
Tool Exist htxcmdline