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/code_update_utils.robot b/lib/code_update_utils.robot
index 26afb9f..4bb04b6 100644
--- a/lib/code_update_utils.robot
+++ b/lib/code_update_utils.robot
@@ -45,7 +45,7 @@
Append To List ${host_list} ${index}
END
- [Return] ${host_list}
+ RETURN ${host_list}
Read Software Attribute
@@ -60,7 +60,7 @@
${resp}= OpenBMC Get Request ${software_object}/attr/${attribute_name}
... quiet=${1}
Return From Keyword If ${resp.status_code} != ${HTTP_OK}
- [Return] ${resp.json()["data"]}
+ RETURN ${resp.json()["data"]}
Get Software Objects Id
@@ -79,7 +79,7 @@
FOR ${index} IN @{sw_list}
Append To List ${sw_id_list} ${index.rsplit('/', 1)[1]}
END
- [Return] ${sw_id_list}
+ RETURN ${sw_id_list}
Get Host Software Property
@@ -91,7 +91,7 @@
# (e.g. "/xyz/openbmc_project/software/f3b29aa8").
${sw_attributes}= Read Properties ${host_object}
- [return] ${sw_attributes}
+ RETURN ${sw_attributes}
Get Host Software Objects Details
[Documentation] Return software object details as a list of dictionaries.
@@ -104,7 +104,7 @@
${resp}= OpenBMC Get Request ${pnor} quiet=${1}
Append To List ${software} ${resp.json()["data"]}
END
- [Return] ${software}
+ RETURN ${software}
Set Host Software Property
[Documentation] Set the host software properties of a given object.
@@ -265,7 +265,7 @@
Wait Until Keyword Succeeds 10 sec 5 sec
... Check Software Object Attribute ${version_id} Priority ${0}
- [Return] ${version_id}
+ RETURN ${version_id}
Attempt To Reboot BMC During Image Activation
@@ -427,7 +427,7 @@
END
${min_value}= Min List Value ${priority_value_list}
- [Return] ${min_value}
+ RETURN ${min_value}
Enable Field Mode And Verify Unmount
@@ -532,7 +532,7 @@
Return From Keyword If '${image_id}' != '${EMPTY}' ${image_id}
${image_id}= Get Image Id Updating
- [Return] ${image_id}
+ RETURN ${image_id}
Check Image Update Progress State
@@ -572,7 +572,7 @@
${num_records}= Get Length ${task_inventory}
Return From Keyword If ${num_records} == ${0} ${EMPTY}
- [Return] ${task_inventory}
+ RETURN ${task_inventory}
Get Task Objects
@@ -598,7 +598,7 @@
Set To Dictionary ${task_inv_dict} ${task_id.split("/")[-1]} ${tmp_dict}
END
- [Return] ${task_inv_dict}
+ RETURN ${task_inv_dict}
Check Task Attribute
@@ -625,7 +625,7 @@
... ${tmp_dict}
END
- [Return] ${EMPTY}
+ RETURN ${EMPTY}
Check Task Progress State
@@ -671,7 +671,7 @@
... ${sw_member.split('/')[-1]}
END
- [Return] None
+ RETURN None
Get Image Update Progress State
@@ -690,7 +690,7 @@
${status}= Redfish.Get Attribute /redfish/v1/UpdateService/FirmwareInventory/${image_id} Status
Rprint Vars status
- [Return] ${status["State"]}
+ RETURN ${status["State"]}
Get Firmware Image Version
@@ -705,7 +705,7 @@
${version}= Redfish.Get Attribute /redfish/v1/UpdateService/FirmwareInventory/${image_id} Version
Rprint Vars version
- [Return] ${version}
+ RETURN ${version}
Get ApplyTime
@@ -717,7 +717,7 @@
${system_applytime}= Redfish.Get Attribute ${REDFISH_BASE_URI}UpdateService HttpPushUriOptions
- [Return] ${system_applytime["HttpPushUriApplyTime"]["ApplyTime"]}
+ RETURN ${system_applytime["HttpPushUriApplyTime"]["ApplyTime"]}
Verify Get ApplyTime
@@ -758,7 +758,7 @@
${version}= Get Version Tar tftp_image.tar
OperatingSystem.Remove File tftp_image.tar
- [Return] ${version}
+ RETURN ${version}
Redfish Update Firmware