Fix Power and Restory policy test

Change-Id: I6b4f6093d96a5ba729481870baff910996244c31
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/extended/test_power_restore.robot b/redfish/extended/test_power_restore.robot
index 913002e..981c859 100644
--- a/redfish/extended/test_power_restore.robot
+++ b/redfish/extended/test_power_restore.robot
@@ -9,6 +9,8 @@
 Resource        ../../lib/openbmc_ffdc.robot
 Resource        ../../lib/state_manager.robot
 Resource        ../../lib/boot_utils.robot
+Resource        ../../lib/bmc_redfish_resource.robot
+Resource        ../../lib/bmc_redfish_utils.robot
 Library         ../../lib/state_map.py
 
 Test Teardown   Test Teardown Execution
@@ -114,14 +116,15 @@
     # expectedState    Test initial host state.
     # nextState        Test end host state.
 
-    Set BMC Power Policy  ${policy}
-
     Set Initial Test State  ${expectedState}
 
-    Redfish Power Operation  reset_type=GracefulRestart
+    Set BMC Power Policy  ${policy}
+
+    Redfish BMC Reset Operation
+    Check If BMC is Up
 
     Wait Until Keyword Succeeds
-    ...  10 min  10 sec  Valid Boot States  ${nextState}
+    ...  10 min  20 sec  Valid Boot States  ${nextState}
 
 
 Valid Boot States
@@ -145,10 +148,12 @@
     # expectedState    Test initial host state.
 
     Run Keyword If  '${expectedState}' == 'Running'
-    ...  Redfish Power On
+    ...  Redfish Power On  stack_mode=skip
 
     Run Keyword If  '${expectedState}' == 'Off'
-    ...  Redfish Power Off
+    ...  Redfish Power Off  stack_mode=skip
+
+    Redfish.Login
 
 
 Test Teardown Execution
@@ -158,6 +163,7 @@
 
     FFDC On Test Case Fail
     Close All Connections
+    Redfish.Login
 
 
 Suite Teardown Execution
@@ -165,4 +171,5 @@
     # 1. Set policy to default.
 
     Run Keyword And Ignore Error  Set BMC Power Policy  ${ALWAYS_POWER_OFF}
+    Redfish.Logout