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/bmc_redfish_utils.robot b/lib/bmc_redfish_utils.robot
index fbac104..1e8bb10 100644
--- a/lib/bmc_redfish_utils.robot
+++ b/lib/bmc_redfish_utils.robot
@@ -170,7 +170,7 @@
... Append To List ${client_id_sessions} ${session}
END
- [Return] ${client_id_sessions}
+ RETURN ${client_id_sessions}
Get Valid FRUs
@@ -186,7 +186,7 @@
... /redfish/v1/Systems/${SYSTEM_ID}/${fru_type} return_json=0
${fru_records}= Filter Struct ${fru_records} [('State', 'Enabled'), ('Health', 'OK')]
- [Return] ${fru_records}
+ RETURN ${fru_records}
Get Num Valid FRUs
@@ -199,7 +199,7 @@
${fru_records}= Get Valid FRUs ${fru_type}
${num_valid_frus}= Get length ${fru_records}
- [Return] ${num_valid_frus}
+ RETURN ${num_valid_frus}
Verify Valid Records
@@ -238,7 +238,7 @@
... [('Health', '^OK$'), ('State', '^Enabled$'), ('${reading_type}', '')] regex=1 invert=1
Valid Length invalid_records max_length=0
- [Return] ${records}
+ RETURN ${records}
Redfish Create User
@@ -282,7 +282,7 @@
${role_config}= Redfish_Utils.Get Attribute
... ${REDFISH_ACCOUNTS_URI}${user_name} RoleId
- [Return] ${role_config}
+ RETURN ${role_config}
Create Users With Different Roles
@@ -378,4 +378,4 @@
${last_reset_time}= Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID} LastResetTime
- [Return] ${last_reset_time}
+ RETURN ${last_reset_time}