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/lib/state_manager.robot b/lib/state_manager.robot
index 4952482..2dcf39a 100755
--- a/lib/state_manager.robot
+++ b/lib/state_manager.robot
@@ -118,7 +118,7 @@
${state}=
... Read Attribute ${HOST_STATE_URI} ${host_attribute} quiet=${quiet}
- [Return] ${state}
+ RETURN ${state}
Is OS Booted
@@ -175,7 +175,7 @@
${host_state}= Get Host State
${status}= Run Keyword And Return Status Should Be Equal
... ${host_state} Quiesced
- [Return] ${status}
+ RETURN ${status}
Recover Quiesced Host
@@ -194,7 +194,7 @@
${state}=
... Read Attribute ${HOST_STATE_URI} CurrentHostState
... quiet=${quiet}
- [Return] ${state.rsplit('.', 1)[1]}
+ RETURN ${state.rsplit('.', 1)[1]}
Get Host Trans State
[Documentation] Return the transition state of host as a string.
@@ -206,7 +206,7 @@
${state}=
... Read Attribute ${HOST_STATE_URI} RequestedHostTransition
... quiet=${quiet}
- [Return] ${state.rsplit('.', 1)[1]}
+ RETURN ${state.rsplit('.', 1)[1]}
Get Chassis Power State
[Documentation] Return the power state of the Chassis
@@ -216,7 +216,7 @@
${state}=
... Read Attribute ${CHASSIS_STATE_URI} CurrentPowerState
... quiet=${quiet}
- [Return] ${state.rsplit('.', 1)[1]}
+ RETURN ${state.rsplit('.', 1)[1]}
Get BMC State
@@ -225,7 +225,7 @@
# quiet - Suppress REST output logging to console.
${state}=
... Read Attribute ${BMC_STATE_URI} CurrentBMCState quiet=${quiet}
- [Return] ${state.rsplit('.', 1)[1]}
+ RETURN ${state.rsplit('.', 1)[1]}
Put BMC State
@@ -269,7 +269,7 @@
${alive}= Run Keyword and Return Status
... Open Connection And Log In
Return From Keyword If '${alive}' == '${False}' ${False}
- [Return] ${True}
+ RETURN ${True}
Is BMC Ready
[Documentation] Check if BMC state is Ready.
@@ -324,4 +324,4 @@
${powerstate}=
... Redfish.Get Attribute ${REDFISH_CHASSIS_URI}/${CHASSIS_ID} PowerState
- [Return] ${powerstate}
+ RETURN ${powerstate}