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/systems/LogServices/test_post_codes.robot b/redfish/systems/LogServices/test_post_codes.robot
index 2f4972a..0e0bcad 100644
--- a/redfish/systems/LogServices/test_post_codes.robot
+++ b/redfish/systems/LogServices/test_post_codes.robot
@@ -203,7 +203,7 @@
${last_id}= Split String ${last_id} -
${boot_count}= Set Variable ${last_id[0][1]}
- Return From Keyword ${boot_count}
+ RETURN ${boot_count}
Populate PostCode Logs Incase No Prior Entries Available
diff --git a/redfish/systems/test_systems_inventory.robot b/redfish/systems/test_systems_inventory.robot
index c3e24e2..0c2224e 100755
--- a/redfish/systems/test_systems_inventory.robot
+++ b/redfish/systems/test_systems_inventory.robot
@@ -22,7 +22,6 @@
*** Test Cases ***
-
Verify CPU And Core Count
[Documentation] Get the total number of CPUs and cores in the system.
... Verify counts are above minimums.
@@ -108,7 +107,7 @@
${state}= Set Variable ${power_supply['Status']['State']}
${good_state}= Evaluate
... any(x in '${state}' for x in ('Enabled', 'StandbyOffline'))
- Run Keyword If not ${good_state} Continue For Loop
+ IF not ${good_state} CONTINUE
${total_num_supplies}= Evaluate $total_num_supplies + ${1}
END
@@ -174,7 +173,7 @@
# "/redfish/v1/Systems/system/Processors/cpu0").
${total_cores}= Redfish.Get Attribute ${processor} TotalCores
- Return From Keyword If ${total_cores} is ${NONE} ${0}
+ IF ${total_cores} is ${NONE} RETURN ${0}
RETURN ${total_cores}
@@ -191,8 +190,9 @@
${good_state}= Evaluate
... any(x in '${state}' for x in ('Absent', 'Enabled', 'UnavailableOffline'))
Rprint Vars gpu state
- Run Keyword If not ${good_state} Fail
- ... msg=GPU State is not Absent, Enabled, or UnavailableOffline.
+ IF not ${good_state}
+ Fail msg=GPU State is not Absent, Enabled, or UnavailableOffline.
+ END
END
@@ -200,6 +200,7 @@
[Documentation] Get and return a tuple of lists of URIs for CPU,
... GPU and PowerSupplies.
+
${processor_info}= Redfish_Utils.Enumerate Request
... ${SYSTEM_BASE_URI}Processors return_json=0