Temporary fix for lab system migration to new latest driver
Check if /xyz/openbmc_project/state/BMC0/ exist, then use the new
"Wait For Temp BMC Ready" keyword post "Prepare For Update" reboot.
Change-Id: I9ec314727879f187fd9837b9e5ba5c3f54d11ecc
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/code_update/update_bmc.robot b/extended/code_update/update_bmc.robot
index 00ad0ab..4a55880 100644
--- a/extended/code_update/update_bmc.robot
+++ b/extended/code_update/update_bmc.robot
@@ -73,7 +73,12 @@
Check If BMC is Up 20 min 10 sec
Check Boot Count And Time
- Wait For BMC Ready
+ # Temporary fix for lab migration for driver which is booted with
+ # BMC state "/xyz/openbmc_project/state/BMC0/".
+ ${status}= Run Keyword And Return Status Temp BMC URI Check
+ Run Keyword If '${status}' == '${False}'
+ ... Wait For BMC Ready
+ ... ELSE Wait For Temp BMC Ready
# TODO: openbmc/openbmc#815
Sleep 1 min
@@ -123,3 +128,20 @@
Run Keyword If ${BOOT_COUNT} > ${MAX_BOOT_COUNT}
... Log Phantom Reboot!!! Unexpected reboot detected level=WARN
+Temp BMC URI Check
+ [Documentation] Check for transient "BMC0" interface.
+ ${resp}= Openbmc Get Request /xyz/openbmc_project/state/BMC0/
+ Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
+
+Check Temp BMC State
+ [Documentation] BMC state should be "Ready".
+ # quiet - Suppress REST output logging to console.
+ ${state}=
+ ... Read Attribute /xyz/openbmc_project/state/BMC0/ CurrentBMCState
+ Should Be Equal Ready ${state.rsplit('.', 1)[1]}
+
+Wait For Temp BMC Ready
+ [Documentation] Check for BMC "Ready" until timedout.
+ Wait Until Keyword Succeeds
+ ... 10 min 10 sec Check Temp BMC State
+