Fix reboot bad path use case for host update test

Fixes:
    - Remove extra BMC reboot.
    - Check if Object exist before and after reboot.

Change-Id: Iba361bb742456904306f3a240dee11e2e7443cf2
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/code_update/host_recoverable_error_test.robot b/extended/code_update/host_recoverable_error_test.robot
index 5929a2e..7b4347d 100644
--- a/extended/code_update/host_recoverable_error_test.robot
+++ b/extended/code_update/host_recoverable_error_test.robot
@@ -35,7 +35,6 @@
     [Tags]  Reboot_BMC_During_Host_Code_Update
 
     Attempt To Reboot BMC During Image Activation  ${IMAGE_FILE_PATH}
-    OBMC Reboot (off)
 
 
 *** Keywords ***
diff --git a/lib/code_update_utils.robot b/lib/code_update_utils.robot
index 55dc734..2dee39b 100644
--- a/lib/code_update_utils.robot
+++ b/lib/code_update_utils.robot
@@ -214,17 +214,13 @@
     # Attempt to reboot during activation.
     ${version_id}=  Upload And Activate Image  ${image_file_path}
     ...  wait=${0}
-    BMC Execute Command  /sbin/reboot
+    ${resp}=  OpenBMC Get Request  ${SOFTWARE_VERSION_URI}${version_id}
+    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
 
-    # Wait for activation to finish.
-    Wait For Activation State Change  ${version_id}  ${ACTIVATING}
-    ${software_state}=  Read Properties  ${SOFTWARE_VERSION_URI}${version_id}
-    Should Be Equal As Strings  &{software_state}[Activation]  ${ACTIVE}
+    OBMC Reboot (off)
 
-    # Verify the image priority is 0.
-    ${priority}=  Read Software Attribute  ${SOFTWARE_VERSION_URI}${version_id}
-    ...  Priority
-    Should Be Equal  ${priority}  ${0}
+    ${resp}=  OpenBMC Get Request  ${SOFTWARE_VERSION_URI}${version_id}
+    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_NOT_FOUND}
 
 
 Switch To Active Image And Pass