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/__init__.robot b/redfish/__init__.robot
index 626ab78..84c805c 100644
--- a/redfish/__init__.robot
+++ b/redfish/__init__.robot
@@ -5,7 +5,7 @@
Suite Setup Get System Environment
-*** Keyword ***
+*** Keywords ***
Get System Environment
[Documentation] System environment details.
diff --git a/redfish/account_service/test_ipmi_redfish_user.robot b/redfish/account_service/test_ipmi_redfish_user.robot
index 02a95c9..9edc497 100644
--- a/redfish/account_service/test_ipmi_redfish_user.robot
+++ b/redfish/account_service/test_ipmi_redfish_user.robot
@@ -285,7 +285,7 @@
Run Keyword If '${privilege}' != '0'
... Set Channel Access ${random_userid} ipmi=on privilege=${privilege}
- [Return] ${random_username} ${random_userid}
+ RETURN ${random_username} ${random_userid}
Delete Users Via Redfish
@@ -336,4 +336,4 @@
Exit For Loop If ${is_empty} == ${True}
END
Run Keyword If '${jj}' == '299' Fail msg=A free user ID could not be found.
- [Return] ${random_userid}
+ RETURN ${random_userid}
diff --git a/redfish/account_service/test_ldap_configuration.robot b/redfish/account_service/test_ldap_configuration.robot
index d484900..28119e2 100644
--- a/redfish/account_service/test_ldap_configuration.robot
+++ b/redfish/account_service/test_ldap_configuration.robot
@@ -697,7 +697,7 @@
# ldap_type The LDAP type ("ActiveDirectory" or "LDAP").
${ldap_config}= Redfish.Get Properties ${REDFISH_BASE_URI}AccountService
- [Return] ${ldap_config["${ldap_type}"]}
+ RETURN ${ldap_config["${ldap_type}"]}
Update LDAP Configuration with LDAP User Role And Group
@@ -725,7 +725,7 @@
${num_list_entries}= Get Length ${ldap_config["RemoteRoleMapping"]}
Return From Keyword If ${num_list_entries} == ${0} @{EMPTY}
- [Return] ${ldap_config["RemoteRoleMapping"][0]["LocalRole"]}
+ RETURN ${ldap_config["RemoteRoleMapping"][0]["LocalRole"]}
Restore LDAP Privilege
diff --git a/redfish/account_service/test_redfish_privilege_registry.robot b/redfish/account_service/test_redfish_privilege_registry.robot
index 88ceceb..5225162 100644
--- a/redfish/account_service/test_redfish_privilege_registry.robot
+++ b/redfish/account_service/test_redfish_privilege_registry.robot
@@ -195,7 +195,7 @@
... /redfish/v1/Registries/PrivilegeRegistry/
@{location}= Get From Dictionary ${resp.dict} Location
${uri}= Set Variable ${location[0]['Uri']}
- [Return] ${uri}
+ RETURN ${uri}
Create And Verify Various Privilege Users
[Documentation] Create and verify admin, test, operator, and readonly users.
diff --git a/redfish/account_service/test_user_account.robot b/redfish/account_service/test_user_account.robot
index 5c50698..40d82b1 100644
--- a/redfish/account_service/test_user_account.robot
+++ b/redfish/account_service/test_user_account.robot
@@ -622,7 +622,7 @@
Run Keyword And Ignore Error Redfish.Logout
${status}= Run Keyword And Return Status Redfish.Login ${username} ${password}
- [Return] ${status}
+ RETURN ${status}
Redfish Create And Verify User
diff --git a/redfish/dmtf_tools/Redfish_Interop_Validator.robot b/redfish/dmtf_tools/Redfish_Interop_Validator.robot
index 3609c3a..8dc3718 100644
--- a/redfish/dmtf_tools/Redfish_Interop_Validator.robot
+++ b/redfish/dmtf_tools/Redfish_Interop_Validator.robot
@@ -23,7 +23,7 @@
... --debugging
${branch_name} main
-*** Test Case ***
+*** Test Cases ***
Test BMC Redfish Using Redfish Interop Validator
[Documentation] Check conformance based on the OpenBMC Interoperability profile.
diff --git a/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot b/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot
index fdba6ae..8f72736 100644
--- a/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot
+++ b/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot
@@ -16,7 +16,7 @@
${branch_name} main
-*** Test Case ***
+*** Test Cases ***
Test BMC Redfish Using Redfish JsonSchema ResponseValidator
[Documentation] Check OpenBMC conformance with JsonSchema files at the DMTF site.
diff --git a/redfish/dmtf_tools/Redfish_Reference_Checker.robot b/redfish/dmtf_tools/Redfish_Reference_Checker.robot
index 1911171..92f2c3b 100644
--- a/redfish/dmtf_tools/Redfish_Reference_Checker.robot
+++ b/redfish/dmtf_tools/Redfish_Reference_Checker.robot
@@ -20,7 +20,7 @@
${branch_name} main
-*** Test Case ***
+*** Test Cases ***
Test BMC Redfish Reference
[Documentation] Checks for valid reference URLs in CSDL XML files.
diff --git a/redfish/dmtf_tools/Redfish_Service_Validator.robot b/redfish/dmtf_tools/Redfish_Service_Validator.robot
index fa06cb5..acbba0a 100644
--- a/redfish/dmtf_tools/Redfish_Service_Validator.robot
+++ b/redfish/dmtf_tools/Redfish_Service_Validator.robot
@@ -18,7 +18,7 @@
... -p ${OPENBMC_PASSWORD} --logdir ${EXECDIR}${/}logs${/} --debugging
${branch_name} main
-*** Test Case ***
+*** Test Cases ***
Test BMC Redfish Using Redfish Service Validator
[Documentation] Check conformance with a Redfish service interface.
diff --git a/redfish/dmtf_tools/Redfish_Usecase_Checkers.robot b/redfish/dmtf_tools/Redfish_Usecase_Checkers.robot
index df989ac..78c5b77 100644
--- a/redfish/dmtf_tools/Redfish_Usecase_Checkers.robot
+++ b/redfish/dmtf_tools/Redfish_Usecase_Checkers.robot
@@ -31,7 +31,7 @@
${state_change_timeout} 3 mins
${branch_name} main
-*** Test Case ***
+*** Test Cases ***
Test BMC Redfish Account Management
[Documentation] Check Account Management with a Redfish interface.
diff --git a/redfish/dmtf_tools/test_redfishtool_certificate.robot b/redfish/dmtf_tools/test_redfishtool_certificate.robot
index 7930a96..3437a3e 100644
--- a/redfish/dmtf_tools/test_redfishtool_certificate.robot
+++ b/redfish/dmtf_tools/test_redfishtool_certificate.robot
@@ -363,7 +363,7 @@
Delete All Sessions
- [Return] ${cert_id}
+ RETURN ${cert_id}
Verify Redfishtool Replace Certificate
@@ -435,7 +435,7 @@
${cmd_output}= Convert String to JSON ${cmd_output}
- [Return] ${cmd_output["CertificateString"]}
+ RETURN ${cmd_output["CertificateString"]}
Suite Setup Execution
diff --git a/redfish/dmtf_tools/test_redfishtool_local_user.robot b/redfish/dmtf_tools/test_redfishtool_local_user.robot
index c6913ab..6e380cd 100644
--- a/redfish/dmtf_tools/test_redfishtool_local_user.robot
+++ b/redfish/dmtf_tools/test_redfishtool_local_user.robot
@@ -247,7 +247,7 @@
${status}= Run Keyword And Return Status redfishtool Get
... /redfish/v1/AccountService/Accounts/${user_name}
- [return] ${status}
+ RETURN ${status}
Suite Setup Execution
diff --git a/redfish/events/test_bmc_snmp_config.robot b/redfish/events/test_bmc_snmp_config.robot
index 377567b..4cef11c 100644
--- a/redfish/events/test_bmc_snmp_config.robot
+++ b/redfish/events/test_bmc_snmp_config.robot
@@ -210,7 +210,7 @@
Should Match Regexp ${SNMP_TRAP}[4] SNMPv2-SMI::enterprises.49871.1.0.1.3 = INTEGER: \[0-9]
Should Be Equal ${SNMP_TRAP}[5] SNMPv2-SMI::enterprises.49871.1.0.1.4 = STRING: "${expected_error}"
- [Return] ${SNMP_TRAP}
+ RETURN ${SNMP_TRAP}
Generate Error And Verify System Up Time
@@ -247,4 +247,4 @@
Should Be Equal As Integers ${bmc_uptime_in_minutes} ${sysuptime_in_minutes}
- [Return] ${sysuptime_in_minutes}
+ RETURN ${sysuptime_in_minutes}
diff --git a/redfish/events/test_bmc_snmp_trap.robot b/redfish/events/test_bmc_snmp_trap.robot
index 2c78093..d7d7854 100644
--- a/redfish/events/test_bmc_snmp_trap.robot
+++ b/redfish/events/test_bmc_snmp_trap.robot
@@ -338,4 +338,4 @@
Should Be Equal As Integers ${bmc_uptime_in_minutes} ${sysuptime_in_minutes}
- [Return] ${sysuptime_in_minutes}
+ RETURN ${sysuptime_in_minutes}
diff --git a/redfish/extended/redfish_bmc_code_update.robot b/redfish/extended/redfish_bmc_code_update.robot
index 187d462..4da0f55 100644
--- a/redfish/extended/redfish_bmc_code_update.robot
+++ b/redfish/extended/redfish_bmc_code_update.robot
@@ -226,7 +226,7 @@
# Convert from dict to list.
${software_info}= Get Dictionary Values ${software_info}
- [Return] ${software_info[0]['Priority']}
+ RETURN ${software_info[0]['Priority']}
Set BMC Image Priority To Least
diff --git a/redfish/extended/test_websocket.robot b/redfish/extended/test_websocket.robot
index 3495630..a454f86 100755
--- a/redfish/extended/test_websocket.robot
+++ b/redfish/extended/test_websocket.robot
@@ -127,7 +127,7 @@
# There may be more than one pid returned if there is an instance
# of a monitory_pgm running from a previous run.
@{pid_list}= Split String ${pid}
- [Return] ${pid_list}
+ RETURN ${pid_list}
Kill Websocket Monitor
diff --git a/redfish/managers/test_bmc_dumps.robot b/redfish/managers/test_bmc_dumps.robot
index 756dadc..78cac89 100644
--- a/redfish/managers/test_bmc_dumps.robot
+++ b/redfish/managers/test_bmc_dumps.robot
@@ -488,7 +488,7 @@
Create Binary File BMC_dump.tar.gz ${ret.content}
${downloaded_dump_size}= Get File Size BMC_dump.tar.gz
Should Be Equal ${downloaded_dump_size} ${redfish_bmc_dump_size}
- [Return] BMC_dump.tar.gz
+ RETURN BMC_dump.tar.gz
Extract BMC Dump
@@ -518,7 +518,7 @@
${cnt}= Get length ${bmc_extraction_folders}
should be equal as numbers ${cnt} 1
- [Return] ${bmc_extraction_folders}[0]
+ RETURN ${bmc_extraction_folders}[0]
Get BMC Dump Entries
@@ -532,7 +532,7 @@
Append To List ${dump_ids} ${dump_id}
END
- [Return] ${dump_ids}
+ RETURN ${dump_ids}
Is BMC Dump Available
@@ -557,7 +557,7 @@
${usage_output}= Fetch From Left ${usage_output} /
${usage_output}= Convert To Integer ${usage_output}
- [return] ${usage_output}
+ RETURN ${usage_output}
Test Teardown Execution
diff --git a/redfish/managers/test_bmc_ipv6.robot b/redfish/managers/test_bmc_ipv6.robot
index 2ddaacd..04853cf 100644
--- a/redfish/managers/test_bmc_ipv6.robot
+++ b/redfish/managers/test_bmc_ipv6.robot
@@ -193,7 +193,7 @@
${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${active_channel_config['${CHANNEL_NUMBER}']['name']}
@{ipv6_network_configurations}= Get From Dictionary ${resp.dict} IPv6StaticAddresses
- [Return] @{ipv6_network_configurations}
+ RETURN @{ipv6_network_configurations}
Verify IPv6 And PrefixLength
diff --git a/redfish/managers/test_managers_bmc_time.robot b/redfish/managers/test_managers_bmc_time.robot
index 37c52bc..e7b01d2 100644
--- a/redfish/managers/test_managers_bmc_time.robot
+++ b/redfish/managers/test_managers_bmc_time.robot
@@ -205,7 +205,7 @@
[Documentation] Returns BMC Datetime value from Redfish.
${date_time}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/${MANAGER_ID} DateTime
- [Return] ${date_time}
+ RETURN ${date_time}
Redfish Set DateTime
diff --git a/redfish/managers/test_multiple_interfaces.robot b/redfish/managers/test_multiple_interfaces.robot
index 90bd68d..011cd04 100644
--- a/redfish/managers/test_multiple_interfaces.robot
+++ b/redfish/managers/test_multiple_interfaces.robot
@@ -195,7 +195,7 @@
${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
@{network_configurations}= Get From Dictionary ${resp.dict} IPv4StaticAddresses
- [Return] @{network_configurations}
+ RETURN @{network_configurations}
Suite Setup Execution
@@ -255,7 +255,7 @@
${rc} ${output}= Run And Return Rc And Output ${cmd_prefix} -H ${host} ${sub_cmd}
Should Be Equal As Strings ${rc} 0
- [Return] ${output}
+ RETURN ${output}
Install Certificate Via Redfish And Verify
@@ -293,4 +293,4 @@
${bmc_cert_content}= Run Keyword If '${expected_status}' == 'ok' redfish_utils.Get Attribute
... ${certificate_uri}/${cert_id} CertificateString
Run Keyword If '${expected_status}' == 'ok' Should Contain ${cert_file_content} ${bmc_cert_content}
- [Return] ${cert_id}
+ RETURN ${cert_id}
diff --git a/redfish/managers/test_multiple_interfaces_dhcp.robot b/redfish/managers/test_multiple_interfaces_dhcp.robot
index 2064dbd..af9b85d 100644
--- a/redfish/managers/test_multiple_interfaces_dhcp.robot
+++ b/redfish/managers/test_multiple_interfaces_dhcp.robot
@@ -222,7 +222,7 @@
${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
@{network_configurations}= Get From Dictionary ${resp.dict} IPv4StaticAddresses
- [Return] @{network_configurations}
+ RETURN @{network_configurations}
Suite Setup Execution
[Documentation] Do suite setup task.
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
diff --git a/redfish/task_service/test_tasks_service.robot b/redfish/task_service/test_tasks_service.robot
index 73d959b..27f7e53 100644
--- a/redfish/task_service/test_tasks_service.robot
+++ b/redfish/task_service/test_tasks_service.robot
@@ -275,4 +275,4 @@
# Convert the date format to %m/%d/%Y %H:%M:%S
${date}= Convert Date ${date} date_format=%b %d %H:%M:%S %Y result_format=%m/%d/%Y %H:%M:%S exclude_millis=True
- [Return] ${date}
+ RETURN ${date}
diff --git a/redfish/update_service/test_redfish_bmc_code_update.robot b/redfish/update_service/test_redfish_bmc_code_update.robot
index c072d4b..162a6c0 100644
--- a/redfish/update_service/test_redfish_bmc_code_update.robot
+++ b/redfish/update_service/test_redfish_bmc_code_update.robot
@@ -243,7 +243,7 @@
Log To Console Firmware update URI: ${update_url}
- [Return] ${update_url}
+ RETURN ${update_url}
Redfish Multiple Upload Image And Check Progress State
@@ -380,7 +380,7 @@
${active_image}= Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID} Links
Rprint Vars active_image
- [Return] ${active_image}
+ RETURN ${active_image}
Get New Image ID
@@ -388,7 +388,7 @@
${image_id}= Get Image Id Updating
- [Return] ${image_id}
+ RETURN ${image_id}
Verify Redfish Code Update With Different Interrupted Operation