Fix for depreciated Continue For Loop If keyword
Changes:
- Continue For Loop If is deprecated since
Robot Framework version 5.*, use IF and CONTINUE instead
Tested:
- Checked using robot dry-run to make sure the
syntax is not broken
Change-Id: I63bba499b2c82394bb3fe2f74405dbacd09a6d0c
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/redfish/managers/test_certificate.robot b/redfish/managers/test_certificate.robot
index 7d00362..20d6782 100644
--- a/redfish/managers/test_certificate.robot
+++ b/redfish/managers/test_certificate.robot
@@ -243,8 +243,7 @@
${match}= Set Variable ${False}
FOR ${Certificates_dict} IN @{Links['Certificates']}
- Continue For Loop If
- ... "${Certificates_dict['@odata.id']}}" != "${match_cert}}"
+ IF "${Certificates_dict['@odata.id']}}" != "${match_cert}}" CONTINUE
${match}= Set Variable ${True}
END
diff --git a/redfish/managers/test_managers_bmc.robot b/redfish/managers/test_managers_bmc.robot
index 9cd1bdd..d55f284 100644
--- a/redfish/managers/test_managers_bmc.robot
+++ b/redfish/managers/test_managers_bmc.robot
@@ -79,8 +79,7 @@
Log Dictionary ${active_channel_config["${channel_number}"]}
# Skip channel if is_valid is false for the channel number
- Continue For Loop If
- ... ${active_channel_config["${channel_number}"]["is_valid"]}==${FALSE}
+ IF ${active_channel_config["${channel_number}"]["is_valid"]}==${FALSE} CONTINUE
# Get ethernet valid paths in redfish.
# Example: ['/redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces']
diff --git a/redfish/systems/test_power_operations.robot b/redfish/systems/test_power_operations.robot
index 7ccd777..7b064d8 100644
--- a/redfish/systems/test_power_operations.robot
+++ b/redfish/systems/test_power_operations.robot
@@ -112,7 +112,7 @@
... Remove Values From List ${power_uri_list} ${idx}
# Check the next available element in the list.
- Continue For Loop If "${value}" == "${EMPTY}"
+ IF "${value}" == "${EMPTY}" CONTINUE
Valid Dict power_control[${0}] ['PowerConsumedWatts']
diff --git a/redfish/update_service/test_bmc_image_switch.robot b/redfish/update_service/test_bmc_image_switch.robot
index 787d645..80d18fc 100755
--- a/redfish/update_service/test_bmc_image_switch.robot
+++ b/redfish/update_service/test_bmc_image_switch.robot
@@ -55,7 +55,7 @@
Log To Console LOOP_COUNT:${count} execution.
Redfish BMC Switch Firmware Side
- Continue For Loop If '${power_on}' == 'NO'
+ IF '${power_on}' == 'NO' CONTINUE
Log To Console Power on requested, issuing power on.
Redfish Power On
@@ -95,7 +95,7 @@
# Get the backup firmware version for reference.
FOR ${id} IN @{fw_inv_dict.keys()}
- Continue For Loop If '${fw_inv_dict['${id}']['functional']}' == 'True'
+ IF '${fw_inv_dict['${id}']['functional']}' == 'True' CONTINUE
# Find the non functional id and fetch the version.
${image_version}= Set Variable ${fw_inv_dict['${id}']['version']}
END