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/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.