Automation fix to delete the non functional image
Changes:
- In previous code if user try to install the firmware which is
non-functional but in active state then the code update skip,
and it changes the priority to lowest and then make it
fucntional image.
- In new implementation, user can flash the firmware.
- When user flash an image which is non functional on BMC,
then these changes will delete the non functional image on BMC.
After the deleting the non fucntional image, a fresh code update
start with user image.
Change-Id: I98e2f98698e7c0b9535cc4415b55081d445cc16c
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/extended/code_update/bmc_code_update.robot b/extended/code_update/bmc_code_update.robot
index bdcfdd5..41568c6 100644
--- a/extended/code_update/bmc_code_update.robot
+++ b/extended/code_update/bmc_code_update.robot
@@ -84,6 +84,9 @@
Pass Execution If '${functional_version}' == '${image_version}'
... The existing ${image_version} firmware is already functional.
+ ${software_object}= Get Non Running BMC Software Object
+ Run Keyword And Ignore Error Delete Software Object ${software_object}
+
Upload And Activate Image ${IMAGE_FILE_PATH}
... skip_if_active=${SKIP_UPDATE_IF_ACTIVE}
OBMC Reboot (off)