Automation fix to separate Set Apply time and Redfish upload image keyword

Separate the 2 keyword from 1.
1. Redfish Upload Image And Check Progress State
2. Set ApplyTime  policy

Change-Id: Iab54be0f20371fa664681b82cde4a5416a27ab53
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 0b99ca4..5759b13 100644
--- a/lib/redfish_code_update_utils.robot
+++ b/lib/redfish_code_update_utils.robot
@@ -105,12 +105,7 @@
 
 Redfish Upload Image And Check Progress State
     [Documentation]  Code update with ApplyTime.
-    [Arguments]  ${apply_time}
 
-    # Description of argument(s):
-    # apply_time     ApplyTime allowed values (e.g. "OnReset", "Immediate").
-
-    Set ApplyTime  policy=${apply_Time}
     Redfish Upload Image  ${REDFISH_BASE_URI}UpdateService  ${IMAGE_FILE_PATH}
 
     ${image_id}=  Get Latest Image ID
@@ -118,7 +113,6 @@
 
     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
diff --git a/redfish/extended/redfish_bmc_code_update.robot b/redfish/extended/redfish_bmc_code_update.robot
index 084ecac..ce8dbb1 100644
--- a/redfish/extended/redfish_bmc_code_update.robot
+++ b/redfish/extended/redfish_bmc_code_update.robot
@@ -128,7 +128,8 @@
     ${state}=  Get Pre Reboot State
     Rprint Vars  state
 
-    Redfish Upload Image And Check Progress State  Immediate
+    Set ApplyTime  policy=Immediate
+    Redfish Upload Image And Check Progress State
     Reboot BMC And Verify BMC Image
     ...  Immediate  start_boot_seconds=${state['epoch_seconds']}
 
diff --git a/redfish/update_service/test_redfish_bmc_code_update.robot b/redfish/update_service/test_redfish_bmc_code_update.robot
index 21e96ba..36715ed 100644
--- a/redfish/update_service/test_redfish_bmc_code_update.robot
+++ b/redfish/update_service/test_redfish_bmc_code_update.robot
@@ -70,7 +70,8 @@
     ${state}=  Get Pre Reboot State
     Rprint Vars  state
 
-    Redfish Upload Image And Check Progress State  ${apply_time}
+    Set ApplyTime  policy=${apply_Time}
+    Redfish Upload Image And Check Progress State
     Reboot BMC And Verify BMC Image
     ...  ${apply_time}  start_boot_seconds=${state['epoch_seconds']}
 
diff --git a/redfish/update_service/test_redfish_host_code_update.robot b/redfish/update_service/test_redfish_host_code_update.robot
index 2c59a9a..08b5c44 100644
--- a/redfish/update_service/test_redfish_host_code_update.robot
+++ b/redfish/update_service/test_redfish_host_code_update.robot
@@ -68,6 +68,7 @@
     # policy     ApplyTime allowed values (e.g. "OnReset", "Immediate").
 
     Redfish.Login
-    Redfish Upload Image And Check Progress State  ${apply_time}
+    Set ApplyTime  policy=${apply_Time}
+    Redfish Upload Image And Check Progress State
     Poweron Host And Verify Host Image  ${apply_time}
 
diff --git a/redfish/update_service/test_redfish_signed_image_update.robot b/redfish/update_service/test_redfish_signed_image_update.robot
index 086e449..51e2171 100644
--- a/redfish/update_service/test_redfish_signed_image_update.robot
+++ b/redfish/update_service/test_redfish_signed_image_update.robot
@@ -78,7 +78,8 @@
     ${image_version}=  Get Version Tar  ${image_file_path}
     ${state}=  Get Pre Reboot State
     Rprint Vars  state
-    Redfish Upload Image And Check Progress State  Immediate
+    Set ApplyTime  policy=Immediate
+    Redfish Upload Image And Check Progress State
     ${image_info}=  Get Software Inventory State By Version  ${image_version}
     Run Keyword If  'BMC update' == '${image_info["image_type"]}'
     ...    Reboot BMC And Verify BMC Image  Immediate  start_boot_seconds=${state['epoch_seconds']}