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_dbus.robot b/lib/bmc_dbus.robot
index 0256dfe..007c840 100644
--- a/lib/bmc_dbus.robot
+++ b/lib/bmc_dbus.robot
@@ -5,7 +5,7 @@
Library OperatingSystem
Library Collections
-*** Variable ***
+*** Variables ***
${BUSCTL_TREE_COMMAND} busctl tree | less
${BUSCTL_INTROSPECT_COMMAND} busctl introspect
@@ -45,7 +45,7 @@
Append To List ${dbus_uri_list} ${dbus_uri}
END
- [Return] ${dbus_uri_list[1:]}
+ RETURN ${dbus_uri_list[1:]}
Fetch DBUS URI List Without Unicode
@@ -65,7 +65,7 @@
Append To List ${dbus_list} ${item}
END
- [Return] ${dbus_list}
+ RETURN ${dbus_list}
Execute DBUS Introspect Command
@@ -80,4 +80,4 @@
${cmd}= Catenate ${BUSCTL_INTROSPECT_COMMAND} ${dbus_command}
${resp}= BMC Execute Command ${cmd}
- [Return] ${resp[0]}
+ RETURN ${resp[0]}
diff --git a/lib/bmc_ipv6_utils.robot b/lib/bmc_ipv6_utils.robot
index 1d20c71..be26b4b 100644
--- a/lib/bmc_ipv6_utils.robot
+++ b/lib/bmc_ipv6_utils.robot
@@ -37,7 +37,7 @@
Append To List ${ipv6_data} ${ip_n_prefix}
END
- [Return] ${ipv6_data}
+ RETURN ${ipv6_data}
Verify IPv6 On BMC
@@ -86,4 +86,4 @@
${cmd_output} ${stderr} ${rc}= BMC Execute Command
... /sbin/ip -6 route
- [Return] ${cmd_output}
+ RETURN ${cmd_output}
diff --git a/lib/bmc_ldap_utils.robot b/lib/bmc_ldap_utils.robot
index 867c37d..248eac7 100644
--- a/lib/bmc_ldap_utils.robot
+++ b/lib/bmc_ldap_utils.robot
@@ -11,7 +11,7 @@
# ldap_type The LDAP type ("ActiveDirectory" or "LDAP").
${ldap_config}= Redfish.Get Properties ${REDFISH_BASE_URI}AccountService
- [Return] ${ldap_config["${ldap_type}"]}
+ RETURN ${ldap_config["${ldap_type}"]}
Get LDAP Privilege And Group Name Via Redfish
@@ -57,7 +57,7 @@
Append To List ${ldap_group_names} ${ldap_config["RemoteRoleMapping"][${i}]["RemoteGroup"]}
END
- [Return] ${ldap_group_names}
+ RETURN ${ldap_group_names}
Create LDAP Configuration
diff --git a/lib/bmc_network_security_utils.robot b/lib/bmc_network_security_utils.robot
index fe3bc37..9e71638 100644
--- a/lib/bmc_network_security_utils.robot
+++ b/lib/bmc_network_security_utils.robot
@@ -28,7 +28,7 @@
${cmd_buf}= Set Variable --delay ${delay} ${host} -c ${num} --${packet_type} ${cmd_suffix}
${nping_result}= Nping ${cmd_buf}
- [Return] ${nping_result['percent_lost']}
+ RETURN ${nping_result['percent_lost']}
Send Network Packets With Flags And Verify Stability
diff --git a/lib/bmc_network_utils.robot b/lib/bmc_network_utils.robot
index 3d32fbd..26100e9 100644
--- a/lib/bmc_network_utils.robot
+++ b/lib/bmc_network_utils.robot
@@ -81,7 +81,7 @@
Append To List ${ip_data} ${ip_n_prefix}
END
- [Return] ${ip_data}
+ RETURN ${ip_data}
Get BMC Route Info
[Documentation] Get system route info.
@@ -95,7 +95,7 @@
${cmd_output} ${stderr} ${rc}= BMC Execute Command
... /sbin/ip route
- [Return] ${cmd_output}
+ RETURN ${cmd_output}
# TODO: openbmc/openbmc-test-automation#1331
Get BMC MAC Address
@@ -117,7 +117,7 @@
@{words}= Split String ${cmd_output}
- [Return] ${words[1]}
+ RETURN ${words[1]}
Get BMC MAC Address List
@@ -141,7 +141,7 @@
Append To List ${mac_list} ${words[1]}
END
- [Return] ${mac_list}
+ RETURN ${mac_list}
Get BMC Hostname
[Documentation] Get BMC hostname.
@@ -151,7 +151,7 @@
${output} ${stderr} ${rc}= BMC Execute Command hostname
- [Return] ${output}
+ RETURN ${output}
Get FW_Env MAC Address
[Documentation] Get FW_Env MAC address.
@@ -173,7 +173,7 @@
@{words}= Split String ${cmd_output} =
- [Return] ${words[1]}
+ RETURN ${words[1]}
Get List Of IP Address Via REST
@@ -195,7 +195,7 @@
Append To List ${ip_list} ${ip_addr}
END
- [Return] @{ip_list}
+ RETURN @{ip_list}
Delete IP And Object
[Documentation] Delete IP and object.
@@ -321,7 +321,7 @@
END
${user_new_mac_string}= Evaluate ":".join(${user_new_mac_list})
- [Return] ${user_new_mac_string}
+ RETURN ${user_new_mac_string}
Truncate MAC Bits
[Documentation] Truncates user provided MAC address byte to bits.
@@ -333,7 +333,7 @@
${user_mac_addr_int}= Convert To List ${user_mac_addr_byte}
${user_mac_addr_byte}= Get Slice From List ${user_mac_addr_int} 0 2
${user_mac_addr_byte_string}= Evaluate "".join(${user_mac_addr_byte})
- [Return] ${user_mac_addr_byte_string}
+ RETURN ${user_mac_addr_byte_string}
Run Build Net
@@ -402,7 +402,7 @@
${cmd_output} ${stderr} ${rc}= BMC Execute Command
... cat /etc/resolv.conf
- [Return] ${cmd_output}
+ RETURN ${cmd_output}
CLI Get Nameservers
@@ -416,7 +416,7 @@
... egrep nameserver /etc/resolv.conf | cut -f2- -d ' '
${nameservers}= Split String ${stdout}
- [Return] ${nameservers}
+ RETURN ${nameservers}
CLI Get and Verify Name Servers
[Documentation] Get and Verify the nameserver IPs from /etc/resolv.conf and compare with redfish nameserver.
@@ -474,7 +474,7 @@
... ${REDFISH_NW_ETH_IFACE}${active_channel_config['${network_active_channel}']['name']}
@{network_configurations}= Get From Dictionary ${resp.dict} IPv4StaticAddresses
- [Return] @{network_configurations}
+ RETURN @{network_configurations}
Add IP Address
@@ -674,7 +674,7 @@
# [3]: dev
# [4]: eth1
- [Return] ${default_gw[2]}
+ RETURN ${default_gw[2]}
Validate Hostname On BMC
@@ -697,7 +697,7 @@
${valid_channel_number_interface_names}= Convert To Dictionary ${valid_channel_number_interface_names}
- [Return] ${valid_channel_number_interface_names}
+ RETURN ${valid_channel_number_interface_names}
Get Valid Channel Number
[Documentation] Get Valid Channel Number.
@@ -713,7 +713,7 @@
... Set To Dictionary ${valid_channel_number_interface_name} ${key} ${values}
END
- [Return] ${valid_channel_number_interface_name}
+ RETURN ${valid_channel_number_interface_name}
Get Invalid Channel Number List
[Documentation] Get Invalid Channel and return as list.
@@ -727,7 +727,7 @@
... Append To List ${invalid_channel_number_list} ${channel_number}
END
- [Return] ${invalid_channel_number_list}
+ RETURN ${invalid_channel_number_list}
Get Channel Number For Valid Ethernet Interface
@@ -746,7 +746,7 @@
... Append To List ${channel_number_list} ${channel_number}
END
- [Return] ${channel_number_list}
+ RETURN ${channel_number_list}
Get Current Channel Name List
@@ -762,7 +762,7 @@
... Run Keyword Append To List ${channel_list} ${channel_number}
END
- [Return] ${channel_list}
+ RETURN ${channel_list}
Get Active Ethernet Channel List
@@ -780,7 +780,7 @@
${channel_number_list}= Get Current Channel Name List
... ${channel_number_list} ${valid_channel_number_interface_names}
- [Return] ${channel_number_list}
+ RETURN ${channel_number_list}
Update IP Address
[Documentation] Update and verify IP address of BMC.
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}
diff --git a/lib/certificate_utils.robot b/lib/certificate_utils.robot
index e8faf5d..56046a3 100755
--- a/lib/certificate_utils.robot
+++ b/lib/certificate_utils.robot
@@ -41,7 +41,7 @@
Delete All Sessions
- [Return] ${cert_id}
+ RETURN ${cert_id}
Get Certificate Content From BMC Via Openssl
@@ -56,7 +56,7 @@
${result}= Fetch From Left
... ${output} -----END CERTIFICATE-----
${result}= Fetch From Right ${result} -----BEGIN CERTIFICATE-----
- [Return] ${result}
+ RETURN ${result}
Get Certificate File Content From BMC
@@ -69,7 +69,7 @@
${certificate} ${stderr} ${rc}= Run Keyword If '${cert_type}' == 'Client'
... BMC Execute Command cat /etc/nslcd/certs/cert.pem
- [Return] ${certificate}
+ RETURN ${certificate}
Generate Certificate File Via Openssl
@@ -127,7 +127,7 @@
${cert_name}= Catenate SEPARATOR= ${random_name} .pem
Create File ${cert_dir_name}/${cert_name} ${cert_data}
- [Return] ${EXECDIR}${/}${cert_dir_name}${/}${cert_name}
+ RETURN ${EXECDIR}${/}${cert_dir_name}${/}${cert_name}
Get Certificate Content From File
@@ -140,7 +140,7 @@
${file_content}= OperatingSystem.Get File ${cert_file_path}
${result}= Fetch From Left ${file_content} -----END CERTIFICATE-----
${result}= Fetch From Right ${result} -----BEGIN CERTIFICATE-----
- [Return] ${result}
+ RETURN ${result}
Check If Openssl Tool Exist
@@ -290,7 +290,7 @@
... ${certificate_uri}/${cert_id} CertificateString
Run Keyword If '${expected_status}' == 'ok' Should Contain ${cert_file_content} ${bmc_cert_content}
- [Return] ${cert_id}
+ RETURN ${cert_id}
Modify BMC Date
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
diff --git a/lib/common_utils.robot b/lib/common_utils.robot
index 18f77a1..94860d2 100755
--- a/lib/common_utils.robot
+++ b/lib/common_utils.robot
@@ -100,7 +100,7 @@
... test_mode=0
Should Be Empty ${stderr}
Should Not Be Empty ${bmc_model} msg=BMC model is empty.
- [Return] ${bmc_model}
+ RETURN ${bmc_model}
Verify BMC System Model
@@ -114,7 +114,7 @@
${tmp_bmc_model}= Fetch From Left ${tmp_bmc_model} .
${ret}= Run Keyword And Return Status Should Contain ${bmc_model}
... ${tmp_bmc_model} ignore_case=True
- [Return] ${ret}
+ RETURN ${ret}
Wait For Host To Ping
@@ -274,7 +274,7 @@
${alive}= Run Keyword and Return Status
... Open Connection And Log In
Return From Keyword If '${alive}' == '${False}' ${False}
- [Return] ${True}
+ RETURN ${True}
Initialize DBUS cmd
@@ -307,7 +307,7 @@
${cmd}= Catenate ${ssh_pw_file_path} ${OPENBMC_PASSWORD} -p ${HOST_SOL_PORT}
... -o "StrictHostKeyChecking no" ${OPENBMC_USERNAME}@${OPENBMC_HOST} ${OPENBMC_CONSOLE_CLIENT}
- [Return] ${cmd.strip()}
+ RETURN ${cmd.strip()}
Get SOL Console Pid
@@ -382,7 +382,7 @@
... Cmd Fnc cat ${log_file_path} 2>/dev/null quiet=${loc_quiet}
... print_output=${0} show_err=${0}
- [Return] ${output}
+ RETURN ${output}
Start SOL Console Logging
@@ -423,13 +423,13 @@
Wait Until Keyword Succeeds 10 seconds 0 seconds
... Get SOL Console Pid ${1} ${log_file_path}
- [Return] ${log_output}
+ RETURN ${log_output}
Get Time Stamp
[Documentation] Get the current time stamp data
${cur_time}= Get Current Date result_format=%Y%m%d%H%M%S%f
- [Return] ${cur_time}
+ RETURN ${cur_time}
Start Journal Log
@@ -484,7 +484,7 @@
Execute Command rm ${file_path}-${LOG_TIME}
- [Return] ${journal_log}
+ RETURN ${journal_log}
Mac Address To Hex String
@@ -501,7 +501,7 @@
# i_macaddress The MAC address.
${mac_hex}= Catenate 0x${i_macaddress.replace(':', ' 0x')}
- [Return] ${mac_hex}
+ RETURN ${mac_hex}
IP Address To Hex String
@@ -524,7 +524,7 @@
END
${ip_hex}= Catenate @{ip}
- [Return] ${ip_hex}
+ RETURN ${ip_hex}
BMC CPU Performance Check
@@ -615,7 +615,7 @@
${url_list}= Read Properties ${openbmc_url}list quiet=${1}
Sort List ${url_list}
- [Return] ${url_list}
+ RETURN ${url_list}
Check Zombie Process
@@ -656,7 +656,7 @@
# Run the appropriate keyword.
${currentPolicy}= Run Keyword @{cmd_buf}
- [Return] ${currentPolicy}
+ RETURN ${currentPolicy}
Set BMC Reset Reference Time
@@ -681,7 +681,7 @@
... return_stderr=True
Should Be Empty ${stderr}
${btime}= Convert To Integer ${output}
- [Return] ${btime}
+ RETURN ${btime}
Enable Core Dump On BMC
@@ -696,7 +696,7 @@
Open Connection And Log In
${num_of_core_dump}= Execute Command
... ls /tmp/core* 2>/dev/null | wc -l
- [Return] ${num_of_core_dump}
+ RETURN ${num_of_core_dump}
Set Core Dump File Size Unlimited
@@ -774,7 +774,7 @@
... AND
... Set Global Variable ${BOOT_COUNT} ${BOOT_COUNT + 1}
- [Return] ${BOOT_COUNT}
+ RETURN ${BOOT_COUNT}
Set BMC Boot Count
@@ -820,14 +820,14 @@
${cmd}= Set Variable grep ^VERSION_ID= /etc/os-release | cut -f 2 -d '='
${output} ${stderr} ${rc}= BMC Execute Command ${cmd}
- [Return] ${output}
+ RETURN ${output}
Get PNOR Version
[Documentation] Returns the PNOR version from the BMC.
${pnor_attrs}= Get PNOR Attributes
- [Return] ${pnor_attrs['version']}
+ RETURN ${pnor_attrs['version']}
Get PNOR Attributes
@@ -840,7 +840,7 @@
... cat /var/lib/phosphor-software-manager/pnor/ro/pnor.toc
${pnor_attrs}= Key Value Outbuf To Dict ${outbuf} delim==
- [Return] ${pnor_attrs}
+ RETURN ${pnor_attrs}
GET BMC PNOR Version
@@ -853,20 +853,20 @@
Log ${pnor_version}
Rprint Vars pnor_version
- [Return] ${bmc_version} ${pnor_version}
+ RETURN ${bmc_version} ${pnor_version}
Redfish Get BMC Version
[Documentation] Get BMC version via Redfish.
${output}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/${MANAGER_ID} FirmwareVersion
- [Return] ${output}
+ RETURN ${output}
Redfish Get Host Version
[Documentation] Get host version via Redfish.
${output}= Redfish.Get Attribute ${REDFISH_BASE_URI}Systems/${SYSTEM_ID} BiosVersion
- [Return] ${output}
+ RETURN ${output}
Copy Address Translation Utils To HOST OS
@@ -967,7 +967,7 @@
${cmd}= Set Variable
... systemctl -p ${option} show ${servicename} | cut -d = -f2
${attr} ${stderr} ${rc}= BMC Execute Command ${cmd}
- [Return] ${attr}
+ RETURN ${attr}
Verify Watchdog Enabled
@@ -1015,7 +1015,7 @@
${kernel_panic_cmd_file}= Set Variable /bin/sh -c "echo c > /proc/sysrq-trigger"
${status}= Run Keyword And Return Status BMC Execute Command ${kernel_panic_cmd_file} time_out=20
- [Return] ${status}
+ RETURN ${status}
Get Property Value Of Systemd Service In BMC
@@ -1032,4 +1032,4 @@
${stdout} ${stderr} ${rc}= BMC Execute Command
... systemctl show --property ${property_name} --value ${service_name}
- [Return] ${stdout}
+ RETURN ${stdout}
diff --git a/lib/dmtf_redfishtool_utils.robot b/lib/dmtf_redfishtool_utils.robot
index 089bab3..caf7f31 100644
--- a/lib/dmtf_redfishtool_utils.robot
+++ b/lib/dmtf_redfishtool_utils.robot
@@ -27,7 +27,7 @@
${rc} ${cmd_output}= Run and Return RC and Output ${cmd}
Run Keyword If ${rc} != 0 Is HTTP error Expected ${cmd_output} ${expected_error}
- [Return] ${cmd_output}
+ RETURN ${cmd_output}
Redfishtool Patch
@@ -46,7 +46,7 @@
${rc} ${cmd_output}= Run and Return RC and Output ${cmd}
Run Keyword If ${rc} != 0 Is HTTP error Expected ${cmd_output} ${expected_error}
- [Return] ${cmd_output}
+ RETURN ${cmd_output}
Redfishtool Post
@@ -66,7 +66,7 @@
${rc} ${cmd_output}= Run and Return RC and Output ${cmd}
Run Keyword If ${rc} != 0 Is HTTP error Expected ${cmd_output} ${expected_error}
- [Return] ${cmd_output}
+ RETURN ${cmd_output}
Redfishtool Delete
@@ -84,7 +84,7 @@
${rc} ${cmd_output}= Run and Return RC and Output ${cmd}
Run Keyword If ${rc} != 0 Is HTTP error Expected ${cmd_output} ${expected_error}
- [Return] ${cmd_output}
+ RETURN ${cmd_output}
Is HTTP error Expected
diff --git a/lib/dmtf_tools_utils.robot b/lib/dmtf_tools_utils.robot
index 2404dee..c379bf3 100644
--- a/lib/dmtf_tools_utils.robot
+++ b/lib/dmtf_tools_utils.robot
@@ -35,7 +35,7 @@
${rc} ${output}= Shell Cmd ${command_string} ignore_err=${check_error}
Log ${output}
- [Return] ${rc} ${output}
+ RETURN ${rc} ${output}
Redfish Service Validator Result
diff --git a/lib/dump_utils.robot b/lib/dump_utils.robot
index 02b203c..b2ce90c 100644
--- a/lib/dump_utils.robot
+++ b/lib/dump_utils.robot
@@ -61,7 +61,7 @@
Wait Until Keyword Succeeds 3 min 15 sec Check Dump Existence
... ${dump_id}
- [Return] ${dump_id}
+ RETURN ${dump_id}
Check For Too Many Dumps
@@ -93,7 +93,7 @@
${status}= Run Keyword If ${too_many_dumps} Set Variable ${EMPTY}
... ELSE Fail msg=${exception}.
- [Return] ${status}
+ RETURN ${status}
Verify No Dump In Progress
@@ -180,7 +180,7 @@
${resp}= Redfish.Get ${REDFISH_SYSTEM_DUMP}
- [Return] ${resp.dict}
+ RETURN ${resp.dict}
Get Redfish BMC Dump Log Entries
@@ -188,7 +188,7 @@
${resp}= Redfish.Get ${REDFISH_DUMP_URI}
- [Return] ${resp.dict}
+ RETURN ${resp.dict}
Redfish Delete All System Dumps
@@ -258,7 +258,7 @@
... Set Global Variable ${DUMP_ENTRY_URI} /xyz/openbmc_project/dump/entry/
${dump_entries}= Get URL List ${DUMP_ENTRY_URI}
- [Return] ${dump_entries}
+ RETURN ${dump_entries}
Trigger Core Dump
[Documentation] Trigger core dump.
@@ -287,7 +287,7 @@
# "TaskState": "Running",
# "TaskStatus": "OK"
- [Return] ${resp.dict['Id']}
+ RETURN ${resp.dict['Id']}
Create User Initiated BMC Dump Via Redfish
[Documentation] Generate user initiated BMC dump via Redfish and return the dump id number (e.g., "5").
@@ -332,7 +332,7 @@
# "TargetUri": "/redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Actions/LogService.CollectDiagnosticData"
# }
- [Return] ${task_dict["Payload"]["HttpHeaders"][-1].split("/")[-1]}
+ RETURN ${task_dict["Payload"]["HttpHeaders"][-1].split("/")[-1]}
Auto Generate BMC Dump
[Documentation] Auto generate BMC dump.
@@ -341,7 +341,7 @@
... /xyz/openbmc_project/dump/bmc xyz.openbmc_project.Dump.Create CreateDump a{sv} 0
${stdout} ${stderr} ${rc}=
... BMC Execute Command ${cmd}
- [Return] ${stdout} ${stderr} ${rc}
+ RETURN ${stdout} ${stderr} ${rc}
Get Dump Size
[Documentation] Get dump size.
@@ -367,7 +367,7 @@
Log ${dump_uri}
${dump_data}= Redfish.Get Properties ${dump_uri}
- [Return] ${dump_data["data"]["Size"]}
+ RETURN ${dump_data["data"]["Size"]}
Get Dump ID
[Documentation] Return dump ID.
@@ -395,7 +395,7 @@
${task_dict}= Redfish.Get Properties /redfish/v1/TaskService/Tasks/${task_id}
${key} ${value}= Set Variable ${task_dict["Payload"]["HttpHeaders"][-1].split(":")}
Run Keyword If '${key}' != 'Location' Fail
- [Return] ${value.strip('/').split('/')[-1]}
+ RETURN ${value.strip('/').split('/')[-1]}
Get Task Status
[Documentation] Return task status.
@@ -405,7 +405,7 @@
# task_id Task ID.
${resp}= Redfish.Get Properties /redfish/v1/TaskService/Tasks/${task_id}
- [Return] ${resp['TaskState']}
+ RETURN ${resp['TaskState']}
Check Task Completion
[Documentation] Check if the task is complete.
@@ -426,7 +426,7 @@
Wait Until Keyword Succeeds 10 min 15 sec Check Task Completion ${task_id}
${dump_id}= Get Dump ID ${task_id}
- [Return] ${dump_id} Completed
+ RETURN ${dump_id} Completed
Create BMC User Dump
@@ -494,7 +494,7 @@
# s "xyz.openbmc_project.Common.Progress.OperationStatus.Completed".
${status}= Set Variable ${stdout.split('.')[-1].strip('"')}
- [Return] ${status}
+ RETURN ${status}
Verify Dump Status In BMC
[Documentation] Verify Dump Status in BMC.
diff --git a/lib/energy_scale_utils.robot b/lib/energy_scale_utils.robot
index c6bd94f..668adc3 100755
--- a/lib/energy_scale_utils.robot
+++ b/lib/energy_scale_utils.robot
@@ -26,7 +26,7 @@
${power_limit_watts}= Redfish.Get Attribute ${power_cap_uri} PowerLimitWatts
- [return] ${power_limit_watts}
+ RETURN ${power_limit_watts}
DCMI Power Get Limits
@@ -49,7 +49,7 @@
${output}= Remove String ${output} milliseconds
${output}= Remove String ${output} seconds
&{limits}= Key Value Outbuf To Dict ${output}
- [Return] &{limits}
+ RETURN &{limits}
Get DCMI Power Limit
@@ -58,7 +58,7 @@
&{limits}= DCMI Power Get Limits
${power_setting}= Get From Dictionary ${limits} power_limit
- [Return] ${power_setting}
+ RETURN ${power_setting}
Set DCMI Power Limit And Verify
@@ -114,7 +114,7 @@
... watts setting using REST interface.
${power_limit}= Read Attribute ${CONTROL_HOST_URI}power_cap PowerCap
- [Return] ${power_limit}
+ RETURN ${power_limit}
Set DCMI Power Limit Via REST
@@ -172,7 +172,7 @@
${power_activation_setting}= Read Attribute
... ${CONTROL_HOST_URI}power_cap PowerCapEnable
- [Return] ${power_activation_setting}
+ RETURN ${power_activation_setting}
OCC Tool Upload Setup
diff --git a/lib/esel_utils.robot b/lib/esel_utils.robot
index 5423a66..5af58dd 100755
--- a/lib/esel_utils.robot
+++ b/lib/esel_utils.robot
@@ -37,7 +37,7 @@
${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
${count}= Get Length ${resp.json()["data"]}
- [Return] ${count}
+ RETURN ${count}
Verify eSEL Entries
diff --git a/lib/event_notification_utils.robot b/lib/event_notification_utils.robot
index 3bfe5a7..6ea613d 100644
--- a/lib/event_notification_utils.robot
+++ b/lib/event_notification_utils.robot
@@ -23,7 +23,7 @@
Append To List ${subscription_ids}
... ${subscription['@odata.id'].split("/redfish/v1/EventService/Subscriptions/")[-1]}
END
- [Return] ${subscription_ids}
+ RETURN ${subscription_ids}
Get Destination IPs Of Event Subscriptions
[Documentation] Get all subscribed server IPs as a list from event subscriptions.
@@ -37,7 +37,7 @@
${dest_ip}= Get Regexp Matches ${destination} .*://(.*):.* 1
${server_ips}= Combine Lists ${server_ips} ${dest_ip}
END
- [Return] ${server_ips}
+ RETURN ${server_ips}
Delete Event Subscription Of Unpingable Destination IPs
[Documentation] Delete event subscription with non-pinging destination IPs.
diff --git a/lib/external_intf/management_console_utils.robot b/lib/external_intf/management_console_utils.robot
index 5b1c0ac..f7ab82b 100644
--- a/lib/external_intf/management_console_utils.robot
+++ b/lib/external_intf/management_console_utils.robot
@@ -59,7 +59,7 @@
Set To Dictionary ${session_info} SessionToken ${XAUTH_TOKEN}
Set To Dictionary ${session_info} SessionResp ${session_resp}
- [Return] ${session_info}
+ RETURN ${session_info}
Create Session With List Of ClientID
@@ -78,7 +78,7 @@
Append To List ${session_dict_list} ${session_dict}
END
- [Return] ${session_dict_list}
+ RETURN ${session_dict_list}
Verify A Session Created With ClientID
@@ -126,5 +126,5 @@
... json.load(open('${code_base_dir_path}data/resource_lock_table.json')) modules=json
Rprint Vars resource_lock_json
- [Return] ${resource_lock_json}
+ RETURN ${resource_lock_json}
diff --git a/lib/external_intf/vmi_utils.robot b/lib/external_intf/vmi_utils.robot
index 7532b3d..f0c6e86 100644
--- a/lib/external_intf/vmi_utils.robot
+++ b/lib/external_intf/vmi_utils.robot
@@ -145,7 +145,7 @@
... IPv4_Address=${ip_resp["IPv4Addresses"]} Name=${ip_resp["Name"]}
... InterfaceEnabled=${${ip_resp["InterfaceEnabled"]}}
- [Return] &{vmi_ip}
+ RETURN &{vmi_ip}
Get VMI Interfaces
@@ -168,7 +168,7 @@
Append To List ${interface_list} ${interface_value}
END
- [Return] @{interface_list}
+ RETURN @{interface_list}
Verify VMI EthernetInterfaces
@@ -208,4 +208,4 @@
Set Static IPv4 Address To VMI And Verify ${vmi_ip} ${bmc_ip_data[0]['Gateway']}
... ${bmc_ip_data[0]['SubnetMask']} ${valid_status_code} ${interface}
- [Return] ${vmi_ip} ${bmc_ip_data}
+ RETURN ${vmi_ip} ${bmc_ip_data}
diff --git a/lib/fan_utils.robot b/lib/fan_utils.robot
index 9d2d615..f09320e 100755
--- a/lib/fan_utils.robot
+++ b/lib/fan_utils.robot
@@ -23,7 +23,7 @@
${water_cooled}= Read Attribute
... ${HOST_INVENTORY_URI}system/chassis WaterCooled
- [Return] ${water_cooled}
+ RETURN ${water_cooled}
Get Fan Names
@@ -47,7 +47,7 @@
Append To List ${fan_names} ${fan_name}
END
- [Return] ${fan_names}
+ RETURN ${fan_names}
Verify System Error Indication Due To Fans
@@ -114,7 +114,7 @@
${max_target}= Run Keyword If ${target_speed} > ${max_target}
... Set Variable ${target_speed} ELSE Set Variable ${max_target}
END
- [Return] ${max_target}
+ RETURN ${max_target}
Get Target And Blade Speeds
@@ -139,7 +139,7 @@
${response}= OpenBMC Get Request ${path}
${fan_counterclockwise_speed}= Set Variable ${response.json()["data"]["Value"]}
- [Return] ${target_speed} ${fan_clockwise_speed}
+ RETURN ${target_speed} ${fan_clockwise_speed}
... ${fan_counterclockwise_speed}
@@ -157,7 +157,7 @@
... ${clockwise_speed} > ${counterclockwise_speed}
... Set Variable ${clockwise_speed} ELSE
... Set Variable ${counterclockwise_speed}
- [Return] ${target_speed} ${blade_speed}
+ RETURN ${target_speed} ${blade_speed}
Set Fan Daemon State
@@ -235,7 +235,7 @@
${number_of_fans}= Get Length ${fan_names}
- [Return] ${number_of_fans} ${fan_names}
+ RETURN ${number_of_fans} ${fan_names}
diff --git a/lib/ipmi_client.robot b/lib/ipmi_client.robot
index c37a2af..783198f 100755
--- a/lib/ipmi_client.robot
+++ b/lib/ipmi_client.robot
@@ -47,7 +47,7 @@
... ELSE IF '${IPMI_COMMAND}' == 'Dbus'
... Run Dbus IPMI RAW Command ${command}
... ELSE Fail msg=Invalid IPMI Command type provided: ${IPMI_COMMAND}
- [Return] ${resp}
+ RETURN ${resp}
Run IPMI Standard Command
@@ -71,7 +71,7 @@
... ELSE IF '${IPMI_COMMAND}' == 'Dbus'
... Run Dbus IPMI Standard Command ${command}
... ELSE Fail msg=Invalid IPMI Command type provided : ${IPMI_COMMAND}
- [Return] ${resp}
+ RETURN ${resp}
Run Dbus IPMI RAW Command
@@ -93,7 +93,7 @@
... ${IPMITOOL_PATH} -I dbus ${command} return_stdout=True
... return_stderr= True return_rc=True
Should Be Equal ${output} ${0} msg=${stderr}
- [Return] ${stdout}
+ RETURN ${stdout}
Run Inband IPMI Raw Command
@@ -116,7 +116,7 @@
${stdout} ${stderr}= Execute Command ${ipmi_cmd} return_stderr=True
Return From Keyword If ${fail_on_err} == ${0} ${stderr}
Should Be Empty ${stderr} msg=${stdout}
- [Return] ${stdout}
+ RETURN ${stdout}
Run Inband IPMI Standard Command
@@ -142,7 +142,7 @@
${stdout} ${stderr}= Execute Command ${ipmi_cmd} return_stderr=True
Return From Keyword If ${fail_on_err} == ${0} ${stderr}
Should Be Empty ${stderr} msg=${stdout}
- [Return] ${stdout}
+ RETURN ${stdout}
Run External IPMI Standard Command
@@ -167,7 +167,7 @@
${rc} ${output}= Run And Return RC and Output ${ipmi_cmd}
Return From Keyword If ${fail_on_err} == ${0} ${output}
Should Be Equal ${rc} ${expected_rc} msg=${output}
- [Return] ${output}
+ RETURN ${output}
Run External IPMI Raw Command
@@ -181,7 +181,7 @@
${output}= Run External IPMI Standard Command
... raw ${command} ${fail_on_err} &{options}
- [Return] ${output}
+ RETURN ${output}
Check If IPMI Tool Exist
@@ -228,7 +228,7 @@
# Logging SOL output for debug purpose.
Log ${output}
- [Return] ${output}
+ RETURN ${output}
Byte Conversion
@@ -274,7 +274,7 @@
# Equivalent dbus-send argument for smaller IPMI raw command:
# byte:0x00 byte:0x06 byte:0x00 byte:0x36
Run Keyword if ${argLength} == 9 Return from Keyword ${valueinBytesWithoutArray}
- [Return] ${valueinBytesWithArray}
+ RETURN ${valueinBytesWithArray}
Set NetFn Byte
@@ -367,7 +367,7 @@
Should Not Contain ${output} Error
${output}= Fetch From Right ${output} ${SPACE}
- [Return] ${output}
+ RETURN ${output}
Set BMC Network From Host
@@ -435,7 +435,7 @@
${random_userid}= Find Free User Id
IPMI Create User ${random_userid} ${random_username}
Wait And Confirm New User Entry ${random_username}
- [Return] ${random_userid} ${random_username}
+ RETURN ${random_userid} ${random_username}
Find Free User Id
@@ -453,7 +453,7 @@
Exit For Loop If ${is_empty} == ${True}
END
- [Return] ${random_userid}
+ RETURN ${random_userid}
Check Enabled User Count
@@ -559,7 +559,7 @@
Sleep 5s
- [Return] ${resp}
+ RETURN ${resp}
Fetch One Threshold Sensor From Sensor List
@@ -582,7 +582,7 @@
${random_sensor_name}= Evaluate random.choice(${sensor_name_list}) random
- [Return] ${random_sensor_name}
+ RETURN ${random_sensor_name}
Fetch Sensor Details From SDR
[Documentation] Identify the sensors from sdr get and fetch sensor details required.
@@ -602,7 +602,7 @@
... case-insensitive
${setting_status}= Fetch From Right ${setting_line} :${SPACE}
- [Return] ${setting_status}
+ RETURN ${setting_status}
Get Bytes From SDR Sensor
@@ -618,7 +618,7 @@
${sensor_hex}= Replace String ${sensor_detail[1]} ) ${EMPTY}
${sensor_hex}= Zfill Data ${sensor_hex} 2
- [Return] ${sensor_hex}
+ RETURN ${sensor_hex}
Get Current Date from BMC
@@ -640,7 +640,7 @@
# Convert the date to specified format, default:%m/%d/%Y %H:%M:%S
${date}= Convert Date ${date} date_format=%b %d %H:%M:%S %Y result_format=${date_format} exclude_millis=True
- [Return] ${date}
+ RETURN ${date}
Get SEL Info Via IPMI
@@ -661,7 +661,7 @@
... ${IPMI_RAW_CMD['SEL_entry']['SEL_info'][0]}
${resp}= Split String ${resp}
- [Return] ${resp}
+ RETURN ${resp}
Verify Invalid IPMI Command
@@ -705,4 +705,4 @@
# ${hex1} will contains the data to write for fru in list.
# ${hex2} will contains the data to verify fru after write operation completed.
- [Return] ${hex1} ${hex2}
+ RETURN ${hex1} ${hex2}
diff --git a/lib/list_utils.robot b/lib/list_utils.robot
index 63384d3..ae477ef 100644
--- a/lib/list_utils.robot
+++ b/lib/list_utils.robot
@@ -23,7 +23,7 @@
${new_list}= Combine Lists @{lists}
- [Return] ${new_list}
+ RETURN ${new_list}
Intersect Lists
@@ -51,7 +51,7 @@
@{intersected_list}= Remove Duplicates ${intersected_list}
- [Return] @{intersected_list}
+ RETURN @{intersected_list}
Subtract Lists
@@ -71,4 +71,4 @@
... Append To List ${diff_list} ${item}
END
- [Return] ${diff_list}
+ RETURN ${diff_list}
diff --git a/lib/logging_utils.robot b/lib/logging_utils.robot
index bc77fc4..0059f08 100644
--- a/lib/logging_utils.robot
+++ b/lib/logging_utils.robot
@@ -33,7 +33,7 @@
${all_event_list}= Get Redfish Event Logs
Remove Values From List ${all_event_list} ${expected_event}
- [Return] ${all_event_list}
+ RETURN ${all_event_list}
Get Logging Entry List
@@ -51,7 +51,7 @@
# Logging entries list.
# ['/xyz/openbmc_project/logging/entry/14',
# '/xyz/openbmc_project/logging/entry/15']
- [Return] ${entry_list}
+ RETURN ${entry_list}
Logging Entry Should Exist
@@ -103,7 +103,7 @@
${num_filter_struct_args}= Get Length ${filter_struct_args}
Return From Keyword If '${num_filter_struct_args}' == '${0}' ${error_logs}
${filtered_error_logs}= Filter Struct ${error_logs} &{filter_struct_args}
- [Return] ${filtered_error_logs}
+ RETURN ${filtered_error_logs}
Get IPMI SEL Setting
@@ -118,7 +118,7 @@
... case-insensitive
${setting_status}= Fetch From Right ${setting_line} :${SPACE}
- [Return] ${setting_status}
+ RETURN ${setting_status}
Verify Watchdog Errorlog Content
@@ -216,7 +216,7 @@
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
... msg=Failed to get error logs.
${count}= Get Length ${resp.json()["data"]}
- [Return] ${count}
+ RETURN ${count}
Verify Test Error Log
[Documentation] Verify test error log entries.
@@ -272,7 +272,7 @@
#}
${members}= Redfish.Get Attribute ${EVENT_LOG_URI}Entries Members
- [Return] ${members}
+ RETURN ${members}
Get Redfish Event Logs
@@ -296,7 +296,7 @@
Return From Keyword If '${num_filter_struct_args}' == '${0}' &{packed_dict}
${filtered_error_logs}= Filter Struct ${packed_dict} &{filter_struct_args}
- [Return] ${filtered_error_logs}
+ RETURN ${filtered_error_logs}
Get Event Logs Not Ok
@@ -304,7 +304,7 @@
${members}= Get Event Logs
${severe_logs}= Evaluate [elog for elog in $members if elog['Severity'] != 'OK']
- [Return] ${severe_logs}
+ RETURN ${severe_logs}
Get Number Of Event Logs
@@ -312,7 +312,7 @@
${members}= Get Event Logs
${num_members}= Get Length ${members}
- [Return] ${num_members}
+ RETURN ${num_members}
Redfish Purge Event Log
@@ -364,4 +364,4 @@
${members}= Redfish.Get Attribute /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/Entries Members
... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
- [Return] ${members}
+ RETURN ${members}
diff --git a/lib/open_power_utils.robot b/lib/open_power_utils.robot
index 21a0901..3366159 100644
--- a/lib/open_power_utils.robot
+++ b/lib/open_power_utils.robot
@@ -28,7 +28,7 @@
${occ_list}= Get Endpoint Paths ${OPENPOWER_CONTROL} occ*
- [Return] ${occ_list}
+ RETURN ${occ_list}
Get OCC Active State
@@ -47,7 +47,7 @@
# The command returns format 'b true'
Return From Keyword If '${cmd_output.split(' ')[-1]}' == 'true' ${1}
- [Return] ${0}
+ RETURN ${0}
Count Object Entries
@@ -62,7 +62,7 @@
${object_list}= Get Endpoint Paths
... ${object_base_uri_path} ${object_name}
${list_count}= Get Length ${object_list}
- [Return] ${list_count}
+ RETURN ${list_count}
Read Object Attribute
@@ -77,7 +77,7 @@
${resp}= OpenBMC Get Request
... ${object_base_uri_path}/attr/${attribute_name} quiet=${1}
Return From Keyword If ${resp.status_code} != ${HTTP_OK}
- [Return] ${resp.json()["data"]}
+ RETURN ${resp.json()["data"]}
Get Functional Processor Count
@@ -92,7 +92,7 @@
${functional_cpu_count} = Evaluate ${functional_cpu_count} + 1
END
- [Return] ${functional_cpu_count}
+ RETURN ${functional_cpu_count}
Get Active OCC State Count
@@ -113,7 +113,7 @@
${active_occ_count} = Evaluate ${active_occ_count} + 1
END
- [Return] ${active_occ_count}
+ RETURN ${active_occ_count}
Match OCC And CPU State Count
@@ -194,7 +194,7 @@
FOR ${entry} IN @{resp}
Append To List ${power_sensors_value_list} ${entry[1]}
END
- [Return] ${power_sensors_value_list}
+ RETURN ${power_sensors_value_list}
Get Sensors Aggregation URL List
@@ -235,7 +235,7 @@
Run Keyword If 'maximum' in '${entry}' Append To List ${power_supply_max_list} ${entry}
END
- [Return] ${power_supply_avg_list} ${power_supply_max_list}
+ RETURN ${power_supply_avg_list} ${power_supply_max_list}
REST Verify No Gard Records
@@ -342,7 +342,7 @@
# [xyz.openbmc_project.VirtualSensor]:
# [0]: /xyz/openbmc_project/sensors/temperature/Ambient_Virtual_Temp
- [Return] ${sensors_dbus_tree_dict}
+ RETURN ${sensors_dbus_tree_dict}
Get Populated Sensors Dbus List
@@ -364,7 +364,7 @@
END
END
- [Return] ${valid_dbus_list}
+ RETURN ${valid_dbus_list}
Verify Runtime Sensors Dbus List
@@ -430,7 +430,7 @@
Should Be True ${rc} == 0 msg=No Fan control config JSON file is generated.
${fan_json}= Evaluate json.loads('''${json_string}''') json
- [return] ${fan_json}
+ RETURN ${fan_json}
Get Fan Attribute Value
@@ -460,4 +460,4 @@
Should Not Be Empty ${value_list} msg=${key_value} key attribute not found.
- [Return] ${value_list[0]}
+ RETURN ${value_list[0]}
diff --git a/lib/openbmc_ffdc_methods.robot b/lib/openbmc_ffdc_methods.robot
index 06b1a7e..0a3b1ea 100755
--- a/lib/openbmc_ffdc_methods.robot
+++ b/lib/openbmc_ffdc_methods.robot
@@ -58,7 +58,7 @@
Run Key U SSHLibrary.Close All Connections
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Method Call Keyword List
@@ -97,7 +97,7 @@
${ffdc_file_list}= Smart Combine Lists ${ffdc_file_list} ${ffdc_file_sub_list}
END
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Execute Keyword Method
@@ -124,7 +124,7 @@
... ${ffdc_file_list}
${status} ${ffdc_file_list}= Run Key ${keyword_name} ignore=1
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
BMC FFDC Cleanup
@@ -148,7 +148,7 @@
Iterate BMC Command List Pairs ${index}
END
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Iterate BMC Command List Pairs
@@ -189,7 +189,7 @@
... ERROR output:${\n}${stderr}${\n}Output:${\n}${stdout}${\n}
... ${logpath}
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
# Method : BMC FFDC Files #
@@ -218,7 +218,7 @@
BMC Execute Command rm -rf /tmp/BMC_*
scp.Close Connection
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Create File and Write Data
@@ -239,7 +239,7 @@
${ffdc_file_list}= Smart Combine Lists ${ffdc_file_list} ${ffdc_file_sub_list}
END
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
# Method : Log Test Case Status #
@@ -301,7 +301,7 @@
Append To List ${ffdc_file_list} ${logpath}
END
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Log FFDC Get Redfish Requests
@@ -325,7 +325,7 @@
Append To List ${ffdc_file_list} ${logpath}
END
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
BMC FFDC Get Requests
@@ -344,7 +344,7 @@
${ffdc_file_list}= Smart Combine Lists ${ffdc_file_list} ${ffdc_file_sub_list}
END
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
BMC FFDC Get Redfish Requests
@@ -363,7 +363,7 @@
${ffdc_file_list}= Smart Combine Lists ${ffdc_file_list} ${ffdc_file_sub_list}
END
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Log OS All distros FFDC
@@ -386,7 +386,7 @@
${ffdc_file_list}= Smart Combine Lists ${ffdc_file_list} ${ffdc_file_sub_list}
END
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Log OS SPECIFIC DISTRO FFDC
@@ -435,7 +435,7 @@
# Add the file location to the ffdc_file_list.
Append To List ${ffdc_file_list} ${local_sosreport_file_path}
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
OS FFDC Files
@@ -491,7 +491,7 @@
OS Execute Command rm -rf /tmp/OS_* /tmp/sosreport*FFDC* ignore_err=${True}
scp.Close Connection
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
System Inventory Files
@@ -517,7 +517,7 @@
Run Keyword and Ignore Error Remove Files ${globex}
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
SCP Coredump Files
@@ -548,7 +548,7 @@
END
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
SCP Dump Files
@@ -557,7 +557,7 @@
# Check if dumps exist
${ffdc_file_list}= Scp Dumps ${FFDC_DIR_PATH} ${FFDC_PREFIX}
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Collect Dump Log
@@ -629,7 +629,7 @@
Append To List ${ffdc_file_list} ${logpath}
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Enumerate Redfish OEM Resources
@@ -659,7 +659,7 @@
Append To List ${ffdc_file_list} ${logpath}
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Collect eSEL Log
@@ -702,7 +702,7 @@
Convert eSEL To Elog Format ${logpath}
Append To List ${ffdc_file_list} ${logpath}.txt
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Convert eSEL To Elog Format
@@ -735,7 +735,7 @@
# If linux distro doesn't have os-release, check for uname.
${stdout} ${stderr} ${rc}= OS Execute Command uname ignore_err=${0}
- [Return] ${stdout}
+ RETURN ${stdout}
Get OS Distro Release Info
@@ -748,4 +748,4 @@
# If linux distro doesn't have os-release, check for uname.
${stdout} ${stderr} ${rc}= OS Execute Command uname ignore_err=${0}
- [Return] ${stdout}
+ RETURN ${stdout}
diff --git a/lib/openbmc_ffdc_utils.robot b/lib/openbmc_ffdc_utils.robot
index ed2034c..62d951f 100644
--- a/lib/openbmc_ffdc_utils.robot
+++ b/lib/openbmc_ffdc_utils.robot
@@ -32,7 +32,7 @@
${suite_name}= Catenate SEPARATOR= ${FFDC_TIME}_ ${suite_name}
${test_name}= Get strip string ${TEST_NAME}
${test_name}= Catenate SEPARATOR= ${FFDC_TIME}_ ${test_name}
- [Return] ${suite_name} ${test_name}
+ RETURN ${suite_name} ${test_name}
Create FFDC Directory
@@ -58,7 +58,7 @@
[Documentation] Get the current time stamp data
${cur_time}= Get Current Date result_format=%Y-%m-%d %H:%M:%S:%f
${cur_time}= Get strip string ${cur_time}
- [Return] ${cur_time}
+ RETURN ${cur_time}
Header Message
@@ -100,7 +100,7 @@
END
Write Data To File ${MSG_DETAIL}
- [Return] ${ffdc_file_list}
+ RETURN ${ffdc_file_list}
Write Cmd Output to FFDC File
diff --git a/lib/os_utilities.robot b/lib/os_utilities.robot
index d224d6f..6e82858 100755
--- a/lib/os_utilities.robot
+++ b/lib/os_utilities.robot
@@ -98,7 +98,7 @@
${running}= Set Variable If
... "Currently running" in """${status}""" ${True} ${False}
- [Return] ${running}
+ RETURN ${running}
Write Log Data To File
@@ -176,7 +176,7 @@
${cmd}= Catenate lscpu | grep min | tr -dc '0-9.\n'
${cpu_freq} ${stderr} ${rc}= OS Execute Command ${cmd}
- [Return] ${cpu_freq}
+ RETURN ${cpu_freq}
Get CPU Min Frequency
@@ -190,7 +190,7 @@
${cmd}= Catenate ppc64_cpu --frequency -t 10 | grep min
... | cut -f 2 | cut -d ' ' -f 1 | tr -dc '0-9\n'
${cpu_freq} ${stderr} ${rc}= OS Execute Command ${cmd}
- [Return] ${cpu_freq}
+ RETURN ${cpu_freq}
Get CPU Max Frequency Limit
@@ -201,7 +201,7 @@
${cmd}= Catenate lscpu | grep max | tr -dc '0-9.\n'
${cpu_freq} ${stderr} ${rc}= OS Execute Command ${cmd}
- [Return] ${cpu_freq}
+ RETURN ${cpu_freq}
Get CPU Max Frequency
@@ -215,7 +215,7 @@
${cmd}= Catenate ppc64_cpu --frequency -t 10 | grep max
... | cut -f 2 | cut -d ' ' -f 1 | tr -dc '0-9\n'
${cpu_freq} ${stderr} ${rc}= OS Execute Command ${cmd}
- [Return] ${cpu_freq}
+ RETURN ${cpu_freq}
Get CPU Max Temperature
@@ -232,7 +232,7 @@
... [ x['Value'] for x in $cpu_temperatuture_objs.values() ]
${cpu_max_temp} Evaluate int(max(map(int, $cpu_temperatures))/1000)
- [Return] ${cpu_max_temp}
+ RETURN ${cpu_max_temp}
Get CPU Min Temperature
@@ -249,7 +249,7 @@
... [ x['Value'] for x in $cpu_temperatuture_objs.values() ]
${cpu_min_temp} Evaluate int(min(map(int, $cpu_temperatures))/1000)
- [Return] ${cpu_min_temp}
+ RETURN ${cpu_min_temp}
Check For Errors On OS Dmesg Log
@@ -323,7 +323,7 @@
# Allow for sensor overshoot. That is, max power reported for
# a GPU could be a few watts above the limit.
${power_max}= Evaluate ${nvidia_out}+${7.00}
- [Return] ${power_max}
+ RETURN ${power_max}
Get GPU Max Power
@@ -339,7 +339,7 @@
${cmd}= Catenate nvidia-smi --query-gpu=power.draw
... --format=csv | cut -f 1 -d ' ' | sort -n -u | tail -n 1
${nvidia_out} ${stderr} ${rc}= OS Execute Command ${cmd}
- [Return] ${nvidia_out}
+ RETURN ${nvidia_out}
Get GPU Min Power
@@ -349,7 +349,7 @@
${cmd}= Catenate nvidia-smi --query-gpu=power.draw --format=csv |
... grep -v 'power.draw' | cut -f 1 -d ' ' | sort -n -u | head -1
${gpu_min_power} ${stderr} ${rc}= OS Execute Command ${cmd}
- [Return] ${gpu_min_power}
+ RETURN ${gpu_min_power}
Get GPU Temperature Limit
@@ -364,7 +364,7 @@
${cmd}= Catenate nvidia-smi -q -d TEMPERATURE | grep "GPU Max"
... | cut -f 2 -d ":" | tr -dc '0-9\n' | sort -n -u | tail -n 1
${nvidia_out} ${stderr} ${rc}= OS Execute Command ${cmd}
- [Return] ${nvidia_out}
+ RETURN ${nvidia_out}
Get GPU Min Temperature
@@ -373,7 +373,7 @@
${cmd}= Catenate nvidia-smi --query-gpu=temperature.gpu
... --format=csv | grep -v 'temperature.gpu' | sort -n -u | head -1
${nvidia_out} ${stderr} ${rc}= OS Execute Command ${cmd}
- [Return] ${nvidia_out}
+ RETURN ${nvidia_out}
Get GPU Max Temperature
@@ -388,7 +388,7 @@
${cmd}= Catenate nvidia-smi --query-gpu=temperature.gpu
... --format=csv | sort -n -u | tail -n 1
${nvidia_out} ${stderr} ${rc}= OS Execute Command ${cmd}
- [Return] ${nvidia_out}
+ RETURN ${nvidia_out}
Get GPU Temperature Via REST
@@ -412,7 +412,7 @@
${max_gpu_temperature}= Evaluate
... int(max(map(int, $gpu_temperatures))/1000)
- [Return] ${max_gpu_temperature}
+ RETURN ${max_gpu_temperature}
Get GPU Clock Limit
@@ -427,7 +427,7 @@
${cmd}= Catenate nvidia-smi --query-gpu=clocks.max.gr
... --format=csv | cut -f 1 -d ' ' | sort -n -u | tail -n 1
${nvidia_out} ${stderr} ${rc}= OS Execute Command ${cmd}
- [Return] ${nvidia_out}
+ RETURN ${nvidia_out}
Get GPU Clock
@@ -442,7 +442,7 @@
${cmd}= Catenate nvidia-smi --query-gpu=clocks.gr
... --format=csv | cut -f 1 -d ' ' | sort -n -u | tail -n 1
${nvidia_out} ${stderr} ${rc}= OS Execute Command ${cmd}
- [Return] ${nvidia_out}
+ RETURN ${nvidia_out}
Count GPUs From BMC
@@ -469,7 +469,7 @@
${num_bmc_gpus}= Run Keyword If ${present} and ${state}
... Evaluate ${num_bmc_gpus}+${1}
END
- [Return] ${num_bmc_gpus}
+ RETURN ${num_bmc_gpus}
Create Default MDT Profile
@@ -627,7 +627,7 @@
# class Device class to retrieve with lshw.
${output} ${stderr} ${rc}= OS Execute Command lshw -c ${class} -json
${output}= Verify JSON string ${output}
- [Return] ${output}
+ RETURN ${output}
Verify JSON String
@@ -637,7 +637,7 @@
# unver_string JSON String we will be checking for lshw comma errors.
${unver_string}= Convert to String ${unver_string}
${ver_string}= Replace String Using Regexp ${unver_string} }\\s*{ },{
- [Return] ${ver_string}
+ RETURN ${ver_string}
Clean Up String
@@ -650,7 +650,7 @@
${trimmed_string}= Get Substring ${clean_string} 0 -1
${clean_string}= Set Variable If '${last_char}' == ','
... ${trimmed_string} ${clean_string}
- [Return] ${clean_string}
+ RETURN ${clean_string}
Get OS Network Interface Names
@@ -658,7 +658,7 @@
${stdout} ${stderr} ${rc}= OS Execute Command ls /sys/class/net
@{interface_names}= Split String ${stdout}
- [Return] @{interface_names}
+ RETURN @{interface_names}
Run Soft Bootme
diff --git a/lib/os_utils_config.robot b/lib/os_utils_config.robot
index 38e7c01..c70d60f 100755
--- a/lib/os_utils_config.robot
+++ b/lib/os_utils_config.robot
@@ -12,14 +12,14 @@
... return_stderr=True
Should Be Empty ${stderr}
Log ${\n}version: ${version} console=yes
- [Return] ${version}
+ RETURN ${version}
Get Inventory
[Documentation] Get system inventory.
${inventory} ${stderr}= Execute Command lshw -short return_stderr=True
Should Be Empty ${stderr}
Log ${\n}inventory: ${inventory} console=yes
- [Return] ${inventory}
+ RETURN ${inventory}
Get Memory Count
[Documentation] Get Memory Count.
@@ -27,7 +27,7 @@
... Execute Command lshw -short | grep memory | wc -l return_stderr=True
Should Be Empty ${stderr}
Log ${\n}memory count: ${memory_count} console=yes
- [Return] ${memory_count}
+ RETURN ${memory_count}
Verify Memory Count
[Documentation] Verify memory count.
@@ -43,7 +43,7 @@
... return_stderr=True
Should Be Empty ${stderr}
Log ${\n}dimm_count: ${dimm_count} console=yes
- [Return] ${dimm_count}
+ RETURN ${dimm_count}
Verify Dimm Count
[Documentation] Verify DIMM count.
diff --git a/lib/ras/host_utils.robot b/lib/ras/host_utils.robot
index 6a15248..673fa42 100755
--- a/lib/ras/host_utils.robot
+++ b/lib/ras/host_utils.robot
@@ -21,7 +21,7 @@
# -c|--chip <chip-id> <addr>
${output} ${stderr} ${rc}= OS Execute Command getscom ${input_cmd}
- [Return] ${output}
+ RETURN ${output}
Gard Operations On OS
[Documentation] Executes opal-gard command on OS with the given
@@ -31,7 +31,7 @@
# input_cmd list/clear all/show <gard_record_id>
${output} ${stderr} ${rc}= OS Execute Command opal-gard ${input_cmd}
- [Return] ${output}
+ RETURN ${output}
Putscom Operations On OS
[Documentation] Executes putscom command on OS with the given
@@ -66,7 +66,7 @@
# Example output:
# 00000008
- [Return] ${proc_id}
+ RETURN ${proc_id}
Get Core IDs From OS
[Documentation] Get Core IDs corresponding to the input processor chip ID.
@@ -80,7 +80,7 @@
${core_ids}= Split String ${output}
# Example output:
# ['2', '3', '4', '5', '6']
- [Return] ${core_ids}
+ RETURN ${core_ids}
FIR Address Translation Through HOST
[Documentation] Do FIR address translation through host for given FIR,
@@ -97,7 +97,7 @@
${translated_addr}= Split String ${output} :${SPACE}0x
# Example output:
# 0x10010c00
- [Return] ${translated_addr[1]}
+ RETURN ${translated_addr[1]}
Inject Error Through HOST
[Documentation] Inject checkstop on multiple targets like
@@ -164,7 +164,7 @@
# Example output from prior command:
# opal-prd.service enabled
- [Return] ${opal_prd_state[1]}
+ RETURN ${opal_prd_state[1]}
Enable Opal-PRD Service On HOST
[Documentation] Enable Opal-PRD service on host.
diff --git a/lib/redfish_code_update_utils.robot b/lib/redfish_code_update_utils.robot
index a2e1235..2703fae 100644
--- a/lib/redfish_code_update_utils.robot
+++ b/lib/redfish_code_update_utils.robot
@@ -38,7 +38,7 @@
... '${image_info["Description"]}' == 'BMC image' or '${image_info["Description"]}' == 'BMC update'
... Run Keyword And Return Find Active Software Image ${image_id}
- [Return] ${functional}
+ RETURN ${functional}
Find Active Software Image
@@ -61,7 +61,7 @@
... Should Be Equal As Strings ${image_id} ${active_id}
# Returns True if matched else False.
- [Return] ${matched_functional}
+ RETURN ${matched_functional}
Get Software Inventory State
@@ -111,7 +111,7 @@
Set To Dictionary ${sw_inv_dict} ${uri_path.split("/")[-1]} ${tmp_dict}
END
- [Return] &{sw_inv_dict}
+ RETURN &{sw_inv_dict}
Get Software Inventory State By Version
@@ -140,7 +140,7 @@
Return From Keyword If ${num_records} == ${0} ${EMPTY}
# Return the first list entry.
- [Return] ${software_inventory}[0]
+ RETURN ${software_inventory}[0]
Get BMC Functional Firmware
@@ -149,7 +149,7 @@
${sw_inv}= Get Functional Firmware BMC update
${sw_inv}= Get Non Functional Firmware ${sw_inv} True
- [Return] ${sw_inv}
+ RETURN ${sw_inv}
Get Functional Firmware
@@ -162,7 +162,7 @@
${software_inventory}= Get Software Inventory State
${bmc_inv}= Get BMC Firmware ${image_type} ${software_inventory}
- [Return] ${bmc_inv}
+ RETURN ${bmc_inv}
Get Non Functional Firmware
@@ -181,7 +181,7 @@
${list_inv_dict}= Get Dictionary Values ${resp}
- [Return] ${list_inv_dict}[0]
+ RETURN ${list_inv_dict}[0]
Get Non Functional Firmware List
@@ -199,7 +199,7 @@
... Append To List ${list_inv} ${sw_inv['${key}']}
END
- [Return] ${list_inv}
+ RETURN ${list_inv}
Get Redfish Update Service URI
@@ -209,7 +209,7 @@
Log To Console Firmware update URI: ${update_url}
- [Return] ${update_url}
+ RETURN ${update_url}
Redfish Upload Image And Check Progress State
@@ -248,7 +248,7 @@
... ${REDFISH_BASE_URI}Systems/${SYSTEM_ID} PowerState
Rqprint Vars state
- [Return] ${state}
+ RETURN ${state}
Check Host Power State
@@ -283,7 +283,7 @@
... ${sys_firmware_dict} FirmwareVersion ${firmware_version} BiosVersion ${bios_version}
Rprint Vars sys_firmware_dict
- [Return] &{sys_firmware_dict}
+ RETURN &{sys_firmware_dict}
Switch Backup Firmware Image To Functional
@@ -315,7 +315,7 @@
Append To List ${task_list} ${task_dict['@odata.id']}
END
- [Return] ${task_list}
+ RETURN ${task_list}
Create Initiated Task State Dict
@@ -338,7 +338,7 @@
Set To Dictionary ${task_inv} TaskState ${task_obj['TaskState']}
Set To Dictionary ${task_inv} TaskStatus ${task_obj['TaskStatus']}
- [Return] ${task_inv}
+ RETURN ${task_inv}
Get Task Inventory
@@ -358,7 +358,7 @@
${task_inv}= Create Initiated Task State Dict ${task_payload}
- [Return] ${task_inv}
+ RETURN ${task_inv}
Match Target URI
@@ -390,7 +390,7 @@
${task_inv}= Match Target URI ${task_list} ${target_uri}
- [Return] ${task_inv}
+ RETURN ${task_inv}
Verify Task Progress State
diff --git a/lib/redfish_request.robot b/lib/redfish_request.robot
index 670df01..027df29 100644
--- a/lib/redfish_request.robot
+++ b/lib/redfish_request.robot
@@ -28,7 +28,7 @@
${resp}= Request_Login headers=None url=${uri} credential=${data}
Should Be Equal As Strings ${resp.status_code} ${HTTP_CREATED}
- [Return] ${resp}
+ RETURN ${resp}
Redfish Generic Session Request
@@ -53,4 +53,4 @@
Set Global Variable ${active_session_info} ${session_dict}
Append To List ${session_dict_list} ${session_dict}
- [Return] ${session_dict}
+ RETURN ${session_dict}
diff --git a/lib/remote_logging_utils.robot b/lib/remote_logging_utils.robot
index 4ed1479..c1cfc37 100644
--- a/lib/remote_logging_utils.robot
+++ b/lib/remote_logging_utils.robot
@@ -106,7 +106,7 @@
... &{remote_dict}
${stdout} ${stderr}= Execute Command ${command} return_stderr=True
Should Be Empty ${stderr}
- [Return] ${stdout}
+ RETURN ${stdout}
Get Remote Log Server Configured
diff --git a/lib/resource.robot b/lib/resource.robot
index 49ddc4c..c12f52a 100755
--- a/lib/resource.robot
+++ b/lib/resource.robot
@@ -184,14 +184,14 @@
Get Inventory Schema
[Documentation] Get inventory schema.
[Arguments] ${machine}
- [Return] &{INVENTORY}[${machine}]
+ RETURN &{INVENTORY}[${machine}]
Get Inventory Items Schema
[Documentation] Get inventory items schema.
[Arguments] ${machine}
- [Return] &{INVENTORY_ITEMS}[${machine}]
+ RETURN &{INVENTORY_ITEMS}[${machine}]
Get Sensor Schema
[Documentation] Get sensors schema.
[Arguments] ${machine}
- [Return] &{SENSORS}[${machine}]
+ RETURN &{SENSORS}[${machine}]
diff --git a/lib/rest_client.robot b/lib/rest_client.robot
index 8d5792e..89288b7 100644
--- a/lib/rest_client.robot
+++ b/lib/rest_client.robot
@@ -50,7 +50,7 @@
${resp}= GET On Session openbmc ${base_uri} &{kwargs} timeout=${timeout} expected_status=any
Run Keyword If '${quiet}' == '${0}' Log Response ${resp}
Delete All Sessions
- [Return] ${resp}
+ RETURN ${resp}
OpenBMC Post Request
[Documentation] Do REST POST request and return the result.
@@ -77,7 +77,7 @@
${ret}= POST On Session openbmc ${base_uri} &{kwargs} timeout=${timeout}
Run Keyword If '${quiet}' == '${0}' Log Response ${ret}
Delete All Sessions
- [Return] ${ret}
+ RETURN ${ret}
OpenBMC Put Request
[Documentation] Do REST PUT request on the resource identified by the URI.
@@ -100,7 +100,7 @@
${resp}= PUT On Session openbmc ${base_uri} json=${kwargs["data"]} headers=${headers}
Log Response ${resp}
Delete All Sessions
- [Return] ${resp}
+ RETURN ${resp}
OpenBMC Delete Request
[Documentation] Do REST request to delete the resource identified by the
@@ -126,7 +126,7 @@
${ret}= DELETE On Session openbmc ${base_uri} &{kwargs} timeout=${timeout}
Run Keyword If '${quiet}' == '${0}' Log Response ${ret}
Delete All Sessions
- [Return] ${ret}
+ RETURN ${ret}
Initialize OpenBMC
[Documentation] Do a REST login connection within specified time.
@@ -266,7 +266,7 @@
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
Run Keyword If '${expected_value}' != '${EMPTY}'
... Should Be Equal As Strings ${expected_value} ${resp.json()["data"]}
- [Return] ${resp.json()["data"]}
+ RETURN ${resp.json()["data"]}
Write Attribute
@@ -323,7 +323,7 @@
${resp}= OpenBMC Get Request ${uri} timeout=${timeout} quiet=${quiet}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
- [Return] ${resp.json()["data"]}
+ RETURN ${resp.json()["data"]}
Call Method
[Documentation] Invoke the specific REST service method.
@@ -338,7 +338,7 @@
${base_uri}= Catenate SEPARATOR= ${DBUS_PREFIX} ${uri}
${resp}= OpenBmc Post Request ${base_uri}action/${method}
... timeout=${timeout} quiet=${quiet} &{kwargs}
- [Return] ${resp}
+ RETURN ${resp}
Upload Image To BMC
@@ -372,7 +372,7 @@
Valid Value ret.status_code ${valid_status_codes}
Delete All Sessions
- [Return] ${ret}
+ RETURN ${ret}
Redfish Login
@@ -401,7 +401,7 @@
Set Global Variable ${XAUTH_TOKEN} ${resp.headers["X-Auth-Token"]}
- [Return] ${resp.json()}
+ RETURN ${resp.json()}
Redfish Get Request
@@ -425,7 +425,7 @@
${resp}= GET On Session redfish ${base_uri} &{kwargs} timeout=${timeout}
Run Keyword If '${quiet}' == '${0}' Log Response ${resp}
- [Return] ${resp}
+ RETURN ${resp}
Redfish Post Request
@@ -449,4 +449,4 @@
${resp}= POST On Session redfish ${base_uri} &{kwargs} timeout=${timeout} expected_status=any
Run Keyword If '${quiet}' == '${0}' Log Response ${resp}
- [Return] ${resp}
+ RETURN ${resp}
diff --git a/lib/snmp/redfish_snmp_utils.robot b/lib/snmp/redfish_snmp_utils.robot
index 57424aa..9045143 100644
--- a/lib/snmp/redfish_snmp_utils.robot
+++ b/lib/snmp/redfish_snmp_utils.robot
@@ -60,7 +60,7 @@
Append To List ${snmp_mgr_list} ${snmp_mgr}
END
- [Return] ${snmp_mgr_list}
+ RETURN ${snmp_mgr_list}
Configure SNMP Manager Via Redfish
@@ -139,7 +139,7 @@
# Get the list of child URIs.
@{snmp_mgr_uris}= Redfish.Get Members List ${subscription_uri} filter=snmp
- [Return] ${snmp_mgr_uris}
+ RETURN ${snmp_mgr_uris}
Delete SNMP Manager Via Redfish
@@ -228,7 +228,7 @@
Verify SNMP Trap ${snmp_trap} ${expected_error}
- [Return] ${snmp_trap}
+ RETURN ${snmp_trap}
Verify SNMP Trap
@@ -299,7 +299,7 @@
Verify SNMP Trap ${snmp_trap} ${expected_error}
- [Return] ${snmp_trap}
+ RETURN ${snmp_trap}
Start SNMP Manager On Specific Port
@@ -355,5 +355,5 @@
Verify SNMP Trap ${snmp_trap} ${expected_error}
- [Return] ${snmp_trap}
+ RETURN ${snmp_trap}
diff --git a/lib/snmp/snmp_utils.robot b/lib/snmp/snmp_utils.robot
index d78122d..d94cb8f 100644
--- a/lib/snmp/snmp_utils.robot
+++ b/lib/snmp/snmp_utils.robot
@@ -17,7 +17,7 @@
@{snmp_uri_list}= Read Properties ${SNMP_MANAGER_URI}
- [Return] @{snmp_uri_list}
+ RETURN @{snmp_uri_list}
Configure SNMP Manager On BMC
[Documentation] Configure SNMP manager on BMC.
@@ -64,7 +64,7 @@
Append To List ${ip_and_port_list} ${ip} ${port}
END
- [Return] @{ip_and_port_list}
+ RETURN @{ip_and_port_list}
Verify SNMP Manager
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}
diff --git a/lib/utils.robot b/lib/utils.robot
index e0fd04f..925b148 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -142,7 +142,7 @@
SSHLibrary.Open Connection ${os_host}
${resp}= SSHLibrary.Login ${os_username} ${os_password}
- [Return] ${resp}
+ RETURN ${resp}
Initiate Auto Reboot
@@ -220,7 +220,7 @@
${turbo_setting}= Read Attribute
... ${CONTROL_HOST_URI}turbo_allowed TurboAllowed
- [Return] ${turbo_setting}
+ RETURN ${turbo_setting}
Set Turbo Setting Via REST
@@ -260,7 +260,7 @@
${state}= Read Attribute ${OPENBMC_BASE_URI}sensors/host/BootProgress
... value quiet=${quiet}
- [Return] ${state}
+ RETURN ${state}
Set Boot Progress Method
@@ -342,7 +342,7 @@
... ELSE
... Old Get Boot Progress quiet=${quiet}
- [Return] ${state}
+ RETURN ${state}
New Get Boot Progress
@@ -355,41 +355,42 @@
${state}= Read Attribute ${HOST_STATE_URI} BootProgress quiet=${quiet}
- [Return] ${state.rsplit('.', 1)[1]}
+ RETURN ${state.rsplit('.', 1)[1]}
New Get Power Policy
[Documentation] Returns the BMC power policy (new method).
${currentPolicy}= Read Attribute ${POWER_RESTORE_URI} PowerRestorePolicy
- [Return] ${currentPolicy}
+ RETURN ${currentPolicy}
Old Get Power Policy
[Documentation] Returns the BMC power policy (old method).
${currentPolicy}= Read Attribute ${HOST_SETTING} power_policy
- [Return] ${currentPolicy}
+ RETURN ${currentPolicy}
Redfish Get Power Restore Policy
[Documentation] Returns the BMC power restore policy.
${power_restore_policy}= Redfish.Get Attribute /redfish/v1/Systems/${SYSTEM_ID} PowerRestorePolicy
- [Return] ${power_restore_policy}
+ RETURN ${power_restore_policy}
+
Get Auto Reboot
[Documentation] Returns auto reboot setting.
${setting}= Read Attribute ${CONTROL_HOST_URI}/auto_reboot AutoReboot
- [Return] ${setting}
+ RETURN ${setting}
Redfish Get Auto Reboot
[Documentation] Returns auto reboot setting.
${resp}= Redfish.Get Attribute /redfish/v1/Systems/${SYSTEM_ID} Boot
- [Return] ${resp["AutomaticRetryConfig"]}
+ RETURN ${resp["AutomaticRetryConfig"]}
Trigger Warm Reset
@@ -423,7 +424,7 @@
... data=${args} quiet=${quiet}
Should be equal as strings ${resp.status_code} ${HTTP_OK}
- [Return] ${resp.json()["data"]}
+ RETURN ${resp.json()["data"]}
Clear BMC Gard Record
@@ -456,7 +457,7 @@
[Documentation] Returns the status of the flash BIOS API as a string. For
... example 'Flashing', 'Flash Done', etc
${data}= Read Properties /org/openbmc/control/flash/bios
- [Return] ${data['status']}
+ RETURN ${data['status']}
Is PNOR Flashing
@@ -493,7 +494,7 @@
${log_file_path}= Set Variable If '${log_file_path}' == '${EMPTY}'
... ${default_file_path} ${log_file_path}
- [Return] ${log_file_path}
+ RETURN ${log_file_path}
Get Endpoint Paths
@@ -522,7 +523,7 @@
# any digit or lower case character.
${resp}= Get Matches ${list} regexp=^.*[0-9a-z_].${endpoint}\[_0-9a-z]*$ case_insensitive=${True}
- [Return] ${resp}
+ RETURN ${resp}
Set BMC Power Policy
@@ -578,7 +579,7 @@
${url_list}= Read Properties /xyz/openbmc_project/logging/entry/
Sort List ${url_list}
- [Return] ${url_list}
+ RETURN ${url_list}
Get BMC Flash Chip Boot Side
@@ -591,7 +592,7 @@
${boot_side} ${stderr} ${rc}= BMC Execute Command
... cat /sys/class/watchdog/watchdog1/bootstatus
- [Return] ${boot_side}
+ RETURN ${boot_side}
Watchdog Object Should Exist
@@ -610,7 +611,7 @@
# led_name System LED name (e.g. heartbeat, identify, beep).
${state}= Read Attribute ${LED_PHYSICAL_URI}${led_name} State
- [Return] ${state.rsplit('.', 1)[1]}
+ RETURN ${state.rsplit('.', 1)[1]}
Verify LED State
@@ -633,7 +634,7 @@
${state}= Read Attribute ${LED_GROUPS_URI}${led_name} Asserted
# Returns the state of the LED, either On or Off.
- [Return] ${state}
+ RETURN ${state}
Verify Identify LED State
@@ -789,7 +790,7 @@
[Documentation] Returns BMC date time from date command.
${bmc_time_via_date} ${stderr} ${rc}= BMC Execute Command date +"%Y-%m-%d %H:%M:%S" print_err=1
- [Return] ${bmc_time_via_date}
+ RETURN ${bmc_time_via_date}
Update Root Password
@@ -829,7 +830,7 @@
... json.load(open('${code_base_dir_path}data/applytime_table.json')) modules=json
Rprint Vars post_code_update_actions
- [Return] ${post_code_update_actions}
+ RETURN ${post_code_update_actions}
Get Task State From File
@@ -858,7 +859,7 @@
... json.load(open('${code_base_dir_path}data/task_state.json')) modules=json
Rprint Vars task_state
- [Return] ${task_state}
+ RETURN ${task_state}
Redfish Set Boot Default
@@ -906,7 +907,7 @@
# },
${status}= Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID} Status
- [Return] ${status["State"]}
+ RETURN ${status["State"]}
Redfish Verify BMC State
@@ -935,7 +936,7 @@
# },
${chassis}= Redfish.Get Properties /redfish/v1/Chassis/${CHASSIS_ID}
- [Return] ${chassis["PowerState"]} ${chassis["Status"]["State"]}
+ RETURN ${chassis["PowerState"]} ${chassis["Status"]["State"]}
Redfish Get Boot Progress
@@ -951,7 +952,7 @@
Return From Keyword If "${PLATFORM_ARCH_TYPE}" == "x86"
... NA ${boot_progress["Status"]["State"]}
- [Return] ${boot_progress["BootProgress"]["LastState"]} ${boot_progress["Status"]["State"]}
+ RETURN ${boot_progress["BootProgress"]["LastState"]} ${boot_progress["Status"]["State"]}
Redfish Get States
@@ -976,7 +977,7 @@
# test is run in loops.
#Log ${states}
- [Return] ${states}
+ RETURN ${states}
Is BMC Not Quiesced
@@ -1121,7 +1122,7 @@
${systems}= Redfish_Utils.Get Member List /redfish/v1/Systems
${bios_attr_dict}= Redfish.Get Attribute ${systems[0]}/Bios Attributes
- [Return] ${bios_attr_dict}
+ RETURN ${bios_attr_dict}
Set BIOS Attribute
@@ -1185,7 +1186,7 @@
# attribute_name Valid BIOS attribute name e.g ("fw_boot_side")
${pldm_output}= pldmtool bios GetBIOSAttributeCurrentValueByHandle -a ${attribute_name}
- [Return] ${pldm_output}
+ RETURN ${pldm_output}
Verify Host Power State
diff --git a/lib/xcat/xcat_utils.robot b/lib/xcat/xcat_utils.robot
index 4e3fd3c..40e8eea 100644
--- a/lib/xcat/xcat_utils.robot
+++ b/lib/xcat/xcat_utils.robot
@@ -36,7 +36,7 @@
${stdout} ${stderr}= Execute Command ${xcat_cmd} return_stderr=True
Should Be Empty ${stderr}
- [Return] ${stdout}
+ RETURN ${stdout}
Get List Of BMC Nodes
@@ -52,7 +52,7 @@
File Should Not Be Empty ${node_cfg_file_path} msg=Empty config file.
${bmc_list}= OperatingSystem.Get File ${node_cfg_file_path}
- [Return] ${bmc_list}
+ RETURN ${bmc_list}
Add Nodes To XCAT
[Documentation] Add nodes to XCAT configuration.
@@ -111,7 +111,7 @@
... ${XCAT_DIR_PATH}/rpower ${node} state return_stderr=True
Should Be Empty ${stderr}
- [Return] ${stdout}
+ RETURN ${stdout}
Add Nodes To Group
[Documentation] Add BMC nodes to group.
@@ -141,7 +141,7 @@
... ${XCAT_DIR_PATH}/nodels ${group} return_stderr=True
Should Be Empty ${stderr}
- [Return] ${stdout}
+ RETURN ${stdout}
Validate Node Added In Group
[Documentation] Validate whether node is added in group.
@@ -167,4 +167,4 @@
${stdout} ${stderr}= Execute Command ${cmd_buf} return_stderr=True
Should Be Empty ${stderr}
- [Return] ${stdout}
+ RETURN ${stdout}