Update Clean up script to handle REST and redfish
Change-Id: Ia9e53411faef3f32f2f959ac559894b0d3d9a1d5
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/standby_bmc.robot b/extended/standby_bmc.robot
index 266c492..1357358 100644
--- a/extended/standby_bmc.robot
+++ b/extended/standby_bmc.robot
@@ -60,10 +60,12 @@
... 1 min 30 sec Initialize OpenBMC
${ready_status}= Run Keyword And Return Status Is BMC Ready
- Run Keyword If '${ready_status}' == '${False}' Put BMC State Ready
-
- ${host_off_status}= Run Keyword And Return Status Is Host Off
- Run Keyword If '${host_off_status}' == '${False}' Initiate Host PowerOff
+ Run Keyword If '${ready_status}' == '${False}'
+ ... Put BMC State Ready
+ ... ELSE IF ${REDFISH_SUPPORT_TRANS_STATE} == ${1}
+ ... Redfish Power Off stack_mode=skip
+ ... ELSE
+ ... REST Power Off stack_mode=skip
Prune Journal Log
diff --git a/lib/state_manager.robot b/lib/state_manager.robot
index e50f1b0..66df12d 100755
--- a/lib/state_manager.robot
+++ b/lib/state_manager.robot
@@ -232,9 +232,9 @@
${bmc_state}= Get BMC State
Run Keyword If '${bmc_state}' == '${expected_state}'
- ... Log BMC is already in ${expected_state} state
- ... ELSE Run Keywords Initiate BMC Reboot AND
- ... Wait for BMC state ${expected_state}
+ ... Log BMC is already in ${expected_state} state
+ ... ELSE
+ ... OBMC Reboot (off)
Initiate BMC Reboot
[Documentation] Initiate BMC reboot.