Robot Framework 7.0 changes
Update robot code syntax overall in the repo
Changes:
- Update the requirement.txt package version for robot
- The '[Return]' setting is deprecated.
Use the 'RETURN' statement instead.
- Singular section headers like '*** Test Case ***'
are deprecated. Use plural format like
'*** Test Cases ***' instead.
- Singular section headers like '*** Variable ***'
are deprecated
Tested:
- Ran from sandbox with the version
$ robot --version
Robot Framework 7.0 (Python 3.10.12 on linux)
and also tested on latest python version
Robot Framework 7.0 (Python 3.11.9 on linux)
Change-Id: I54e85f9d799556c63b9a39f79483f83e9b980768
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/systems/eventlog/test_esel.robot b/redfish/systems/eventlog/test_esel.robot
index 84d025d..d1947e3 100644
--- a/redfish/systems/eventlog/test_esel.robot
+++ b/redfish/systems/eventlog/test_esel.robot
@@ -167,7 +167,7 @@
[Documentation] Run the IPMI command and return the output.
[Arguments] ${args}
${output_1}= Execute Command /tmp/ipmitool -I dbus raw ${args}
- [Return] ${output_1}
+ RETURN ${output_1}
Check IPMI OEMpartialadd Reject
@@ -176,7 +176,7 @@
Login To OS Host ${OS_HOST} ${OS_USERNAME} ${OS_PASSWORD}
${stdout} ${stderr} ${output_2}= Execute Command ipmitool raw ${args}
... return_stdout=True return_stderr=True return_rc=True
- [Return] ${stderr}
+ RETURN ${stderr}
Test Setup Execution
@@ -213,7 +213,7 @@
${stdout} ${stderr} ${output_3}= Execute Command ipmitool raw ${args}
... return_stdout=True return_stderr=True return_rc=True
Should Be Equal ${output_3} ${0} msg=${stderr}
- [Return] ${stderr}
+ RETURN ${stderr}
Event Log Should Exist
diff --git a/redfish/systems/eventlog/test_event_logging.robot b/redfish/systems/eventlog/test_event_logging.robot
index 498f943..8aa676b 100644
--- a/redfish/systems/eventlog/test_event_logging.robot
+++ b/redfish/systems/eventlog/test_event_logging.robot
@@ -435,7 +435,7 @@
Append To List ${error_ids} ${error_id}
END
- [Return] ${error_ids}
+ RETURN ${error_ids}
Event Log Should Not Exist
diff --git a/redfish/systems/test_powersubsystem_settings.robot b/redfish/systems/test_powersubsystem_settings.robot
index bb45fd0..c38dbe1 100755
--- a/redfish/systems/test_powersubsystem_settings.robot
+++ b/redfish/systems/test_powersubsystem_settings.robot
@@ -121,7 +121,7 @@
# {'@odata.id': '/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply1'}
# {'@odata.id': '/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply2'}
# {'@odata.id': '/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply3'}
- [Return] ${total_num_powersupplies}
+ RETURN ${total_num_powersupplies}
Set and Verify Power Mode Switches
diff --git a/redfish/systems/test_sensor_monitoring.robot b/redfish/systems/test_sensor_monitoring.robot
index bea0a57..f3a1bfe 100644
--- a/redfish/systems/test_sensor_monitoring.robot
+++ b/redfish/systems/test_sensor_monitoring.robot
@@ -137,7 +137,7 @@
Append To List ${sensor_name_list} ${sensor_info['MemberId']}
END
- [Return] ${sensor_name_list}
+ RETURN ${sensor_name_list}
Check Sensor Status And Reading Via Sensor Name
diff --git a/redfish/systems/test_systems_inventory.robot b/redfish/systems/test_systems_inventory.robot
index 0ec05c8..c3e24e2 100755
--- a/redfish/systems/test_systems_inventory.robot
+++ b/redfish/systems/test_systems_inventory.robot
@@ -175,7 +175,7 @@
${total_cores}= Redfish.Get Attribute ${processor} TotalCores
Return From Keyword If ${total_cores} is ${NONE} ${0}
- [Return] ${total_cores}
+ RETURN ${total_cores}
GPU State Check
@@ -212,7 +212,7 @@
${power_supplies}= Redfish.Get Attribute
... ${REDFISH_CHASSIS_URI}${CHASSIS_ID}/Power PowerSupplies
- [Return] ${cpu_info} ${gpu_info} ${power_supplies}
+ RETURN ${cpu_info} ${gpu_info} ${power_supplies}
Verify FRU Inventory Minimums