Changed logic for reboot the BMC and verify the BMC version
Change-Id: I8f76ff25190c55892eb54b403d6d8be3dc8e2d6e
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/lib/applytime_table.json b/lib/applytime_table.json
index 9fcc28c..3452f18 100644
--- a/lib/applytime_table.json
+++ b/lib/applytime_table.json
@@ -1,9 +1,9 @@
{
- "bmc": {
+ "BMC image": {
"OnReset": "Redfish OBMC Reboot (off)",
"Immediate": "Wait For Reboot start_boot_seconds=${state['epoch_seconds']}"
},
- "host": {
+ "Host image": {
"OnReset": "Redfish Host Reboot",
"Immediate": "Wait State os_running_match_state 10 mins"
}
diff --git a/redfish/extended/redfish_bmc_code_update.robot b/redfish/extended/redfish_bmc_code_update.robot
index c067b4b..e4d01a1 100644
--- a/redfish/extended/redfish_bmc_code_update.robot
+++ b/redfish/extended/redfish_bmc_code_update.robot
@@ -17,6 +17,7 @@
Resource ../../lib/redfish_code_update_utils.robot
Library ../../lib/gen_robot_valid.py
Library ../../lib/var_funcs.py
+Library ../../lib/gen_robot_keyword.py
Suite Setup Suite Setup Execution
Suite Teardown Redfish.Logout
@@ -128,6 +129,11 @@
Run Keyword And Ignore Error Set ApplyTime policy=OnReset
Redfish Upload Image And Check Progress State
- Reboot BMC And Verify BMC Image
- ... OnReset start_boot_seconds=${state['epoch_seconds']}
+ ${tar_version}= Get Version Tar ${IMAGE_FILE_PATH}
+ ${image_info}= Get Software Inventory State By Version ${tar_version}
+ ${get_json_file}= OperatingSystem.Get File lib/applytime_table.json
+ ${post_code_update_actions}= Evaluate json.loads('''${get_json_file}''') json
+ Run Key ${post_code_update_actions['${image_info["image_type"]}']['OnReset']}
+ Redfish.Login
+ Redfish Verify BMC Version ${IMAGE_FILE_PATH}