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/account_service/test_ldap_configuration.robot b/redfish/account_service/test_ldap_configuration.robot
index 0338772..2a95bc2 100644
--- a/redfish/account_service/test_ldap_configuration.robot
+++ b/redfish/account_service/test_ldap_configuration.robot
@@ -632,7 +632,7 @@
Restore AccountLockout Attributes
[Documentation] Restore AccountLockout Attributes.
- Return From Keyword If &{old_account_service} == &{EMPTY}
+ IF &{old_account_service} == &{EMPTY} RETURN
Redfish.Patch ${REDFISH_BASE_URI}AccountService
... body=[('AccountLockoutDuration', ${old_account_service['AccountLockoutDuration']})]
... valid_status_codes=[${HTTP_OK},${HTTP_NO_CONTENT}]
@@ -740,7 +740,7 @@
${ldap_config}= Get LDAP Configuration ${LDAP_TYPE}
${num_list_entries}= Get Length ${ldap_config["RemoteRoleMapping"]}
- Return From Keyword If ${num_list_entries} == ${0} @{EMPTY}
+ IF ${num_list_entries} == ${0} @{EMPTY} RETURN
RETURN ${ldap_config["RemoteRoleMapping"][0]["LocalRole"]}
@@ -749,7 +749,7 @@
[Documentation] Restore the LDAP privilege to its original value.
Redfish.Login
- Return From Keyword If '${old_ldap_privilege}' == '${EMPTY}' or '${old_ldap_privilege}' == '[]'
+ IF '${old_ldap_privilege}' == '${EMPTY}' or '${old_ldap_privilege}' == '[]' RETURN
# Log back in to restore the original privilege.
Update LDAP Configuration with LDAP User Role And Group ${LDAP_TYPE}
... ${old_ldap_privilege} ${GROUP_NAME}
@@ -764,7 +764,7 @@
# expected_power_status State of Host e.g. Off or On.
${power_status}= Redfish.Get Attribute /redfish/v1/Chassis/${CHASSIS_ID} PowerState
- Return From Keyword If '${power_status}' == '${expected_power_status}'
+ IF '${power_status}' == '${expected_power_status}' RETURN
IF '${power_status}' == 'Off'
Redfish Power On
@@ -794,7 +794,7 @@
Redfish.Post ${REDFISH_POWER_URI}
... body={'ResetType': 'ForceOff'} valid_status_codes=[${valid_status_code}]
- Return From Keyword If ${valid_status_code} == ${HTTP_FORBIDDEN}
+ IF ${valid_status_code} == ${HTTP_FORBIDDEN} RETURN
Wait Until Keyword Succeeds 1 min 10 sec Verify Host Power State Off
@@ -820,7 +820,7 @@
Redfish.Post ${REDFISH_POWER_URI}
... body={'ResetType': 'On'} valid_status_codes=[${valid_status_code}]
- Return From Keyword If ${valid_status_code} == ${HTTP_FORBIDDEN}
+ IF ${valid_status_code} == ${HTTP_FORBIDDEN} RETURN
Verify Host Is Up