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/openpower/ext_interfaces/test_client_identifier.robot b/openpower/ext_interfaces/test_client_identifier.robot
index 6f80365..194be6a 100644
--- a/openpower/ext_interfaces/test_client_identifier.robot
+++ b/openpower/ext_interfaces/test_client_identifier.robot
@@ -154,7 +154,7 @@
Append To List ${session_list} ${resp}
END
- [Return] ${session_list}
+ RETURN ${session_list}
Verify A Non Admin Session Created With ClientID
diff --git a/openpower/ext_interfaces/test_discovery.robot b/openpower/ext_interfaces/test_discovery.robot
index 59d8b84..9854eeb 100644
--- a/openpower/ext_interfaces/test_discovery.robot
+++ b/openpower/ext_interfaces/test_discovery.robot
@@ -138,7 +138,7 @@
Print Timen Exception message is ${exc_msg}
Should Not Be Empty ${bmc_list}
Rprint Vars bmc_list
- [Return] ${bmc_list}
+ RETURN ${bmc_list}
Verify Existence Of BMC Record From List
diff --git a/openpower/ext_interfaces/test_lock_management.robot b/openpower/ext_interfaces/test_lock_management.robot
index c96789a..9fe0b70 100644
--- a/openpower/ext_interfaces/test_lock_management.robot
+++ b/openpower/ext_interfaces/test_lock_management.robot
@@ -358,7 +358,7 @@
Set To Dictionary ${session_info} SessionIDs ${session['Id']}
Set To Dictionary ${session_info} ClientID ${session["Context"]}
- [Return] ${session_info}
+ RETURN ${session_info}
RW General Dictionary
@@ -378,7 +378,7 @@
Set To Dictionary ${request_dict} ResourceID ${res_id}
- [Return] ${request_dict}
+ RETURN ${request_dict}
Return Description Of Response
@@ -395,7 +395,7 @@
${message}= Evaluate json.loads('''${resp_text}''') json
- [Return] ${message}
+ RETURN ${message}
Verify Redfish Session Deleted
@@ -469,7 +469,7 @@
... ELSE
... Run Keyword And Return Return Description Of Response ${resp.content}
- [Return] ${resp}
+ RETURN ${resp}
Redfish Post Acquire List Lock
@@ -492,7 +492,7 @@
... ELSE
... Run Keyword And Return Return Description Of Response ${resp.content}
- [Return] ${resp}
+ RETURN ${resp}
Redfish Post Acquire Invalid Lock
@@ -512,7 +512,7 @@
Run Keyword If '${message}' != '${EMPTY}'
... Valid Value message ['${resp.content}']
- [Return] ${resp}
+ RETURN ${resp}
Redfish Post Acquire Invalid Lock With Invalid Data Type Of Resource ID
@@ -530,7 +530,7 @@
... /ibm/v1/HMC/LockService/Actions/LockService.AcquireLock data=${lock_dict_param}
Should Be Equal As Strings ${resp.status_code} ${status_code}
- [Return] ${resp}
+ RETURN ${resp}
Form Data To Acquire Lock
@@ -547,7 +547,7 @@
${temp_list}= Create List ${resp}
${lock_request_dict}= Create Dictionary Request=${temp_list}
- [Return] ${lock_request_dict}
+ RETURN ${lock_request_dict}
Create Data To Acquire List Of Lock
@@ -569,7 +569,7 @@
${lock_request_dict}= Create Dictionary Request=${temp_list}
- [Return] ${lock_request_dict}
+ RETURN ${lock_request_dict}
Form Data To Acquire Invalid Lock With Invalid Data Type Of Resource ID
@@ -586,7 +586,7 @@
${temp_list}= Create List ${resp}
${lock_request_dict}= Create Dictionary Request=${temp_list}
- [Return] ${lock_request_dict}
+ RETURN ${lock_request_dict}
Form Data To Acquire Invalid Lock
@@ -603,7 +603,7 @@
${temp_list}= Create List ${resp}
${lock_request_dict}= Create Dictionary Request=${temp_list}
- [Return] ${lock_request_dict}
+ RETURN ${lock_request_dict}
Get Locks List On Resource
@@ -619,7 +619,7 @@
... data=${data}
${locks}= Evaluate json.loads('''${resp.text}''') json
- [Return] ${locks["Records"]}
+ RETURN ${locks["Records"]}
Verify Lock On Resource
@@ -694,7 +694,7 @@
Append To List ${tran_ids} ${item['TransactionID']}
END
- [Return] ${tran_ids}
+ RETURN ${tran_ids}
Release Locks On Resource
@@ -1237,7 +1237,7 @@
${session_id_list}= Evaluate json.dumps(${session_id_list}) json
- [Return] ${session_id_list}
+ RETURN ${session_id_list}
Get Locks List On Resource With Session List
@@ -1253,7 +1253,7 @@
Should Be Equal As Strings ${resp.status_code} ${exp_status_code}
${locks}= Evaluate json.loads('''${resp.text}''') json
- [Return] ${locks}
+ RETURN ${locks}
Verify List Of Session Lock On Resource
diff --git a/openpower/ext_interfaces/test_savearea_management.robot b/openpower/ext_interfaces/test_savearea_management.robot
index c251093..5493d62 100644
--- a/openpower/ext_interfaces/test_savearea_management.robot
+++ b/openpower/ext_interfaces/test_savearea_management.robot
@@ -411,7 +411,7 @@
Return From Keyword If '${status}' == 'False' ${resp_text}
${message}= Evaluate json.loads('''${resp_text}''') json
- [Return] ${message["Description"]}
+ RETURN ${message["Description"]}
Upload Partition File To BMC
@@ -631,7 +631,7 @@
Set To Dictionary ${content_dict} ${conf_file} ${content-${index}}
END
- [Return] &{content_dict}
+ RETURN &{content_dict}
Redfish Read Partition File
@@ -747,7 +747,7 @@
FOR ${count} IN RANGE ${range}
Append To List ${file_name_list} 1KB-file${count}
END
- [Return] ${file_name_list}
+ RETURN ${file_name_list}
Redfish Upload Partition File With Range
diff --git a/openpower/ext_interfaces/test_vmi.robot b/openpower/ext_interfaces/test_vmi.robot
index a7be41d..f036d5f 100644
--- a/openpower/ext_interfaces/test_vmi.robot
+++ b/openpower/ext_interfaces/test_vmi.robot
@@ -523,7 +523,7 @@
${value}= Set Variable If '${parameter}' != 'DHCPEnabled' ${ip_resp["${parameter}"]}
... ${ip_resp["DHCPv4"]["${parameter}"]}
- [Return] ${value}
+ RETURN ${value}
Switch VMI IPv4 Origin And Verify Details
diff --git a/openpower/ext_interfaces/test_vmicert_management.robot b/openpower/ext_interfaces/test_vmicert_management.robot
index 05de1d2..b5927ae 100644
--- a/openpower/ext_interfaces/test_vmicert_management.robot
+++ b/openpower/ext_interfaces/test_vmicert_management.robot
@@ -590,7 +590,7 @@
${output}= Run ${ssl_cmd} ${ssl_sub}
${csr}= OperatingSystem.Get File ${CSR_FILE}
- [Return] ${csr}
+ RETURN ${csr}
Send CSR To VMI And Get Signed
@@ -619,7 +619,7 @@
... timeout=${read_timeout} expected_status=any
Log to console ${resp.content}
- [Return] ${resp}
+ RETURN ${resp}
Get Root Certificate
@@ -669,7 +669,7 @@
... ELSE
... Run openssl x509 -in ${file_name} -text -noout | grep Subject:
- [Return] ${subject}
+ RETURN ${subject}
Get Public Key
@@ -683,7 +683,7 @@
${PublicKey}= Run Keyword If ${is_csr_file} Run openssl req -in ${file_name} -noout -pubkey
... ELSE Run openssl x509 -in ${file_name} -noout -pubkey
- [Return] ${PublicKey}
+ RETURN ${PublicKey}
Get Certificate Signed By VMI