Fix for depreciated Return From Keyword If keyword
Changes:
- Return From Keyword If is deprecated since
Robot Framework version 5.*, use IF and RETURN instead
Tested:
- Checked using robot dry-run to make sure the
syntax is not broken
Change-Id: I458528b33a1abe9fc750a6941e98490db9b36094
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/redfish/extended/redfish_bmc_code_update.robot b/redfish/extended/redfish_bmc_code_update.robot
index 3ac19d4..56c6985 100644
--- a/redfish/extended/redfish_bmc_code_update.robot
+++ b/redfish/extended/redfish_bmc_code_update.robot
@@ -71,9 +71,11 @@
${nonfunctional_sw_inv}= Get Non Functional Firmware ${sw_inv} False
# Redfish active software image API.
- Run Keyword If ${num_records} > 0
- ... Run Keyword If '${nonfunctional_sw_inv['version']}' == '${image_version}'
- ... Set Backup Firmware To Functional ${image_version} ${state}
+ IF ${num_records} > 0
+ IF '${nonfunctional_sw_inv['version']}' == '${image_version}'
+ Set Backup Firmware To Functional ${image_version} ${state}
+ END
+ END
Print Timen Performing firmware update ${image_version}.
@@ -197,7 +199,7 @@
# If no software inventory record was found, there is no existing
# firmware for the given version and therefore no action to be taken.
- Return From Keyword If not ${num_keys}
+ IF not ${num_keys} RETURN
# Check if the existing firmware is functional.
Pass Execution If ${software_inventory_record['functional']}
@@ -241,7 +243,8 @@
${cur_priority}= Get Image Priority ${image_version}
Rprint Vars least_priority cur_priority
- Return From Keyword If '${least_priority}' == ${cur_priority}
+ IF '${least_priority}' == ${cur_priority} RETURN
+
Set Host Software Property
... ${SOFTWARE_VERSION_URI}${software_inventory['image_id']}
... Priority ${least_priority}