Add code to print and check current functional image on the BMC
Output:
.image_version: 2.9.0-dev-550-g271cfda64
.#(CDT) 2020/07/24 02:23:15.900599 - 0.188676 - Issuing: cat /etc/os-release
..functional_version:
Change-Id: Ia7a79570e64e34966a57582e3b042da883c84c66
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/extended/redfish_bmc_code_update.robot b/redfish/extended/redfish_bmc_code_update.robot
index be54c3b..77194f3 100644
--- a/redfish/extended/redfish_bmc_code_update.robot
+++ b/redfish/extended/redfish_bmc_code_update.robot
@@ -41,6 +41,10 @@
${image_version}= Get Version Tar ${IMAGE_FILE_PATH}
Rprint Vars image_version
+ ${bmc_release_info}= Get BMC Release Info
+ ${functional_version}= Set Variable ${bmc_release_info['version_id']}
+ Rprint Vars functional_version
+
Run Keyword If not ${FORCE_UPDATE}
... Activate Existing Firmware ${image_version}
Redfish Update Firmware