Add logic to get image ID from Redfish firmware inventory

Change-Id: Ia12bfe449e44c75ef8e15df06dff15af854e0cf1
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/code_update_utils.robot b/lib/code_update_utils.robot
index d06c1ae..bd186d6 100644
--- a/lib/code_update_utils.robot
+++ b/lib/code_update_utils.robot
@@ -529,12 +529,10 @@
     # Example: # ls /tmp/images/
     #            1b714fb7
     ${image_id}=  Get Latest File  /tmp/images/
-    Valid Value  image_id
 
-    # Though an image sub-directory was found, it really isn't valid unless
-    # the MANIFEST file is present.
-    BMC Execute Command  ls -l /tmp/images/${image_id}/MANIFEST
+    Return From Keyword If  '${image_id}' != '${EMPTY}'  ${image_id}
 
+    ${image_id}=   Get Image Id   Updating
     [Return]  ${image_id}
 
 
diff --git a/lib/redfish_code_update_utils.robot b/lib/redfish_code_update_utils.robot
index a897714..8afff2e 100644
--- a/lib/redfish_code_update_utils.robot
+++ b/lib/redfish_code_update_utils.robot
@@ -148,25 +148,17 @@
 Redfish Upload Image And Check Progress State
     [Documentation]  Code update with ApplyTime.
 
+    Log To Console   Start uploading image to BMC.
     Redfish Upload Image  ${REDFISH_BASE_URI}UpdateService  ${IMAGE_FILE_PATH}
+    Log To Console   Completed image upload to BMC.
 
     ${image_id}=  Get Latest Image ID
     Rprint Vars  image_id
 
-    # TODO: Fix up code using Redfish update inventory
-    #${manifest}  ${stderr}  ${rc}=  BMC Execute Command  cat /tmp/images/${image_id}/MANIFEST
-    #Rprint Vars  manifest
-
-    Wait Until Keyword Succeeds  1 min  05 sec
+    Wait Until Keyword Succeeds  1 min  01 sec
     ...  Check Image Update Progress State  match_state='Disabled', 'Updating'  image_id=${image_id}
 
-    # Wait a few seconds to check if the update progress started.
-    Sleep  5s
-
-    Check Image Update Progress State
-    ...  match_state='Updating'  image_id=${image_id}
-
-    Wait Until Keyword Succeeds  8 min  20 sec
+    Wait Until Keyword Succeeds  8 min  10 sec
     ...  Check Image Update Progress State
     ...    match_state='Enabled'  image_id=${image_id}