Performance fix and correction for events verification post reboot

Seeing failure for event post reboot this particular test since many
test runs and manual execution as well. This turns out to be due to
fixed sleep and doing REST operation. With this changes, the test is
sanely doing the test and consitently passing on a given good driver.

This changes includes:
   - Adding new keyword in utils.robot for general usage and
     removing it from code update utils.
   - Tweaks "Verify Ping and REST Authentication" keyword

Resolves openbmc/openbmc-test-automation#115

Change-Id: Ief10e948fd03736a024a13add208de478ac9fecb
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 219f951..0f56d78 100644
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -189,18 +189,30 @@
 Verify Ping and REST Authentication
     ${l_ping} =   Run Keyword And Return Status
     ...    Ping Host  ${OPENBMC_HOST}
-    Return From Keyword If  '${l_ping}' == '${False}'    ${False}
+    Run Keyword If  '${l_ping}' == '${False}'
+    ...    Fail   msg=Ping Failed
 
     ${l_rest} =   Run Keyword And Return Status
     ...    Initialize OpenBMC
-    Return From Keyword If  '${l_rest}' == '${False}'    ${False}
+    Run Keyword If  '${l_rest}' == '${False}'
+    ...    Fail   msg=REST Authentication Failed
 
     # Just to make sure the SSH is working for SCP
     Open Connection And Log In
     ${system}   ${stderr}=    Execute Command   hostname   return_stderr=True
     Should Be Empty     ${stderr}
 
-    [return]    ${True}
+
+Check If BMC is Up
+    [Documentation]  Wait for Host to be online. Checks every X seconds
+    ...              interval for Y minutes and fails if timed out.
+    ...              Default MAX timedout is 10 min, interval 10 seconds.
+    [arguments]      ${max_timeout}=${OPENBMC_REBOOT_TIMEOUT}
+    ...              ${interval}=10 sec
+
+    Wait Until Keyword Succeeds
+    ...   ${max_timeout}  ${interval}   Verify Ping and REST Authentication
+
 
 Check If warmReset is Initiated
     [Documentation]  Ping would be still alive, so try SSH to connect