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/network/test_bmc_dhcp_conf.robot b/network/test_bmc_dhcp_conf.robot
index d44dbb8..06e341b 100644
--- a/network/test_bmc_dhcp_conf.robot
+++ b/network/test_bmc_dhcp_conf.robot
@@ -89,7 +89,7 @@
${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
@{network_configurations}= Get From Dictionary ${resp.dict} IPv4StaticAddresses
- [Return] @{network_configurations}
+ RETURN @{network_configurations}
Apply Ethernet Config
[Documentation] Set the given Ethernet config property.
diff --git a/network/test_network_nping.robot b/network/test_network_nping.robot
index f9d0874..7155cc9 100644
--- a/network/test_network_nping.robot
+++ b/network/test_network_nping.robot
@@ -59,7 +59,7 @@
${rc} ${output} Run And Return RC And Output ${cmd_buff}
Should Be Equal As Integers ${rc} 0 msg=Command execution failed.
${packet_loss} Get Packet Loss ${host} ${output}
- [Return] ${packet_loss}
+ RETURN ${packet_loss}
Get Packet Loss
[Documentation] Check packet loss percentage.
@@ -84,4 +84,4 @@
${summary}= Get Lines Containing String ${traffic_details} Rcvd:
Log To Console \nPacket loss summary on ${host}\n*********************
- [Return] ${summary}
+ RETURN ${summary}
diff --git a/network/test_vlan_network.robot b/network/test_vlan_network.robot
index 57972c3..8feb2fb 100644
--- a/network/test_vlan_network.robot
+++ b/network/test_vlan_network.robot
@@ -335,7 +335,7 @@
... /sbin/ip addr | grep @eth0 | cut -f1 -d@ | cut -f2 -d.
${vlan_ids}= Split String ${vlan_ids}
- [Return] @{vlan_ids}
+ RETURN @{vlan_ids}
Get VLAN URI For IP
@@ -362,7 +362,7 @@
${uris}= Get Dictionary Keys ${vlan_record}
Return From Keyword If @{uris} == @{EMPTY}
- [Return] ${uris[${0}]}
+ RETURN ${uris[${0}]}
Verify Existence Of VLAN