Run code update in loop

changes:
   - Default loop count value is set to 20, but can be passed as argument.
   - Added test case "Redfish Firmware Update Loop"
   - Added keyword "Redfish Firmware Update In Loop"
   - Added keyword "Get BMC Functional Firmware"
   - Added keyword "Get Functional Firmware"
   - Added keyword "Get Non Fucntional Firmware"
   - Added keyword "Delete BMC Image"

Change-Id: I1ba7fff156ba2e8c85baa01f0f4b3267e2b5c4cd
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/lib/redfish_code_update_utils.robot b/lib/redfish_code_update_utils.robot
index a97b06e..ba5fb60 100644
--- a/lib/redfish_code_update_utils.robot
+++ b/lib/redfish_code_update_utils.robot
@@ -18,7 +18,8 @@
 
     ${image_info}=  Redfish.Get Properties  /redfish/v1/UpdateService/FirmwareInventory/${image_id}
 
-    ${sw_functional}=  Run Keyword If  '${image_info["Description"]}' == 'BMC image'
+    ${sw_functional}=  Run Keyword If
+    ...   '${image_info["Description"]}' == 'BMC image' or '${image_info["Description"]}' == 'BMC update'
     ...    Redfish.Get Attribute  /redfish/v1/Managers/bmc  FirmwareVersion
     ...  ELSE
     ...    Redfish.Get Attribute  /redfish/v1/Systems/system  BiosVersion
@@ -114,10 +115,12 @@
     ${manifest}  ${stderr}  ${rc}=  BMC Execute Command  cat /tmp/images/${image_id}/MANIFEST
     Rprint Vars  manifest
 
-    Check Image Update Progress State
-    ...  match_state='Disabled', 'Updating'  image_id=${image_id}
+    Wait Until Keyword Succeeds  1 min  05 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}