Wait on the BootProgress state change

Changes:
     - New keyword for Boot Progress change
     - Remove the explicit sleep
     - Wait on BootProgress changed from None

Change-Id: I336557de61c3f97879dde577bb121f583d6b640f
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index d319272..29bd240 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -973,12 +973,24 @@
     Redfish Set Auto Reboot  RetryAttempts
 
     Redfish Power Operation  On
-    Sleep  30s
+
+    Wait Until Keyword Succeeds  2 min  5 sec  Is Boot Progress Changed
 
     # Set watchdog timer
     Set Watchdog Interval Using Busctl  ${interval}
 
 
+Is Boot Progress Changed
+    [Documentation]  Get BootProgress state and expect boot state mismatch.
+    [Arguments]  ${boot_state}=None
+
+    # Description of argument(s):
+    # boot_state   Value of the BootProgress state to match against.
+
+    ${boot_progress}  ${host_state}=  Redfish Get Boot Progress
+
+    Should Not Be Equal  ${boot_progress}   ${boot_state}
+
 
 Set Watchdog Interval Using Busctl
     [Documentation]  Set Watchdog time interval.