Use new interfaces to check BMC state

This change fix includes:
    - Renaming Get BMC State of utils.robot with Deprecated as Suffix
    - Import state manager file for using new Get BMC State
    - Addedd 'Is OS Starting' Keyword to check boot progress state

Resolves  openbmc/openbmc-test-automation#307

Change-Id: I32a3da98de4100f324bbc5704f14a4f4e59980e6
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/tests/test_time.robot b/tests/test_time.robot
index c91f178..b70edd1 100644
--- a/tests/test_time.robot
+++ b/tests/test_time.robot
@@ -4,6 +4,7 @@
 Resource               ../lib/rest_client.robot
 Resource               ../lib/ipmi_client.robot
 Resource               ../lib/openbmc_ffdc.robot
+Resource               ../lib/state_manager.robot
 Resource               ../lib/resource.txt
 
 Library                OperatingSystem
@@ -250,13 +251,12 @@
     ...  ${SETTING_HOST}/attr/time_owner  data=${valueDict}
     ${jsondata}=  to JSON  ${resp.content}
 
-    @{states}=  Create List  BMC_READY  HOST_POWERED_OFF
-    ${bmc_state}=  Get BMC State
+    ${host_state}=  Get Host State
 
-    Run Keyword If  '${bmc_state}' in ${states}
+    Run Keyword If  '${host_state}' == 'Off'
     ...  Log  System is in off state so owner change will get applied.
     ...  ELSE   Run keyword
-    ...  Initiate Power Off
+    ...  Initiate Host PowerOff
 
     ${owner}=  Read Attribute  ${SETTING_HOST}  time_owner
     Should Be Equal  ${owner}  ${args}