Robotframework request package upgrade changes
Current working package version
robotframework-requests 0.7.2
To Test:
pip3 install robotframework-requests -U
or
# Once this commit is merged.
pip3 install -r requirements.txt
Version latest:
robotframework-requests 0.9.3
Refer Documentation:
https://marketsquare.github.io/robotframework-requests/doc/RequestsLibrary.html
What is not changed:
- The test cases under directory tests/ is not modified and is
deprecated but you can continue using it with older package
and configuration using
git clone -b v3.0-stable https://github.com/openbmc/openbmc-test-automation
Tested:
Upstream HW_CI test list, firmware code update and few other
test suite like ipmi, certificate, dumps, ffdc and redfish
test suites.
Note: I have not tested end to end, so it is likely there could be
grey areas where it could fail but should be minor w.r.t
response data format.
Resolves: openbmc/openbmc-test-automation#2105
Change-Id: Ie03b25ff88948bcccb09e9d82f8da86e28c92697
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/certificate_utils.robot b/lib/certificate_utils.robot
index 7f14bf3..9930aac 100755
--- a/lib/certificate_utils.robot
+++ b/lib/certificate_utils.robot
@@ -30,14 +30,13 @@
... X-Auth-Token=${XAUTH_TOKEN}
Set To Dictionary ${kwargs} headers ${headers}
- ${ret}= Post Request openbmc ${uri} &{kwargs}
- ${content_json}= To JSON ${ret.content}
- ${cert_id}= Set Variable If '${ret.status_code}' == '${HTTP_OK}' ${content_json["Id"]} -1
+ ${resp}= POST On Session openbmc ${uri} &{kwargs} expected_status=any
+ ${cert_id}= Set Variable If '${resp.status_code}' == '${HTTP_OK}' ${resp.json()["Id"]} -1
Run Keyword If '${status}' == 'ok'
- ... Should Be Equal As Strings ${ret.status_code} ${HTTP_OK}
+ ... Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
... ELSE IF '${status}' == 'error'
- ... Should Be Equal As Strings ${ret.status_code} ${HTTP_INTERNAL_SERVER_ERROR}
+ ... Should Be Equal As Strings ${resp.status_code} ${HTTP_INTERNAL_SERVER_ERROR}
Delete All Sessions
diff --git a/lib/code_update_utils.robot b/lib/code_update_utils.robot
index 484b66d..c94d56d 100644
--- a/lib/code_update_utils.robot
+++ b/lib/code_update_utils.robot
@@ -60,8 +60,7 @@
${resp}= OpenBMC Get Request ${software_object}/attr/${attribute_name}
... quiet=${1}
Return From Keyword If ${resp.status_code} != ${HTTP_OK}
- ${content}= To JSON ${resp.content}
- [Return] ${content["data"]}
+ [Return] ${resp.json()["data"]}
Get Software Objects Id
@@ -103,8 +102,7 @@
${pnor_details}= Get Software Objects ${VERSION_PURPOSE_HOST}
FOR ${pnor} IN @{pnor_details}
${resp}= OpenBMC Get Request ${pnor} quiet=${1}
- ${json}= To JSON ${resp.content}
- Append To List ${software} ${json["data"]}
+ Append To List ${software} ${resp.json()["data"]}
END
[Return] ${software}
@@ -338,8 +336,7 @@
# Description of argument(s):
# software_object The URI to the software image to delete.
- ${arglist}= Create List
- ${args}= Create Dictionary data=${arglist}
+ ${args}= Set Variable {"data": []}
${resp}= OpenBMC Post Request ${software_object}/action/Delete
... data=${args}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
@@ -374,9 +371,8 @@
Delete All Non Running BMC Images
[Documentation] Delete all BMC images that are not running on the BMC.
- @{datalist}= Create List
- ${data}= Create Dictionary data=@{datalist}
- Call Method ${SOFTWARE_VERSION_URI} DeleteAll data=${data}
+ ${args}= Set Variable {"data": []}
+ Call Method ${SOFTWARE_VERSION_URI} DeleteAll data=${args}
Check Error And Collect FFDC
@@ -497,8 +493,7 @@
FOR ${uri} IN @{installed_images}
${resp}= OpenBMC Get Request ${uri}
- ${json}= To JSON ${resp.content}
- Log ${json["data"]}
+ Log ${resp.json()["data"]}
END
diff --git a/lib/dump_utils.robot b/lib/dump_utils.robot
index fcdd793..85a88cf 100644
--- a/lib/dump_utils.robot
+++ b/lib/dump_utils.robot
@@ -51,9 +51,8 @@
# The "data" field conveys the id number of the created dump.
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
- ${json}= To JSON ${resp.content}
- Run Keyword If ${json["data"]} == ${None}
+ Run Keyword If ${resp.json()["data"]} == ${None}
... Fail Dump id returned null.
${dump_id}= Set Variable ${json["data"]}
@@ -84,8 +83,7 @@
Run Keyword If '${resp.status_code}' == '${HTTP_OK}'
... Run Keyword And Return Get The Dump Id ${resp}
- ${json}= To JSON ${resp.content}
- ${exception}= Set Variable ${json["message"]}
+ ${exception}= Set Variable ${resp.json()["message"]}
${at_capacity}= Set Variable Dump not captured due to a cap
${too_many_dumps}= Evaluate $at_capacity in $exception
Printn
@@ -131,9 +129,9 @@
Run Keyword If '${resp.status_code}' == '${HTTP_NOT_FOUND}'
... Set Global Variable ${DUMP_ENTRY_URI} /xyz/openbmc_project/dump/entry/
- ${data}= Create Dictionary data=@{EMPTY}
+ ${args}= Set Variable {"data": []}
${resp}= OpenBMC Post Request
- ... ${DUMP_ENTRY_URI}${dump_id}/action/Delete data=${data}
+ ... ${DUMP_ENTRY_URI}${dump_id}/action/Delete data=${args}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
@@ -189,8 +187,8 @@
Run Keyword If '${resp.status_code}' == '${HTTP_NOT_FOUND}'
... Set Global Variable ${REST_DUMP_URI} /xyz/openbmc_project/dump/
- ${data}= Create Dictionary data=@{EMPTY}
- ${resp}= Openbmc Post Request ${REST_DUMP_URI}action/DeleteAll data=${data}
+ ${args}= Set Variable {"data": []}
+ ${resp}= Openbmc Post Request ${REST_DUMP_URI}action/DeleteAll data=${args}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
Dump Should Not Exist
diff --git a/lib/esel_utils.robot b/lib/esel_utils.robot
index 754f5f9..5423a66 100755
--- a/lib/esel_utils.robot
+++ b/lib/esel_utils.robot
@@ -36,8 +36,7 @@
[Documentation] Count eSEL entries logged.
${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
- ${jsondata}= To JSON ${resp.content}
- ${count}= Get Length ${jsondata["data"]}
+ ${count}= Get Length ${resp.json()["data"]}
[Return] ${count}
diff --git a/lib/fan_utils.robot b/lib/fan_utils.robot
index d7b6a3c..9d2d615 100755
--- a/lib/fan_utils.robot
+++ b/lib/fan_utils.robot
@@ -110,8 +110,7 @@
${paths}= Get Endpoint Paths ${SENSORS_URI}fan_tach/ 0
FOR ${path} IN @{paths}
${response}= OpenBMC Get Request ${path}
- ${json}= To JSON ${response.content}
- ${target_speed}= Set Variable ${json["data"]["Target"]}
+ ${target_speed}= Set Variable ${response.json()["data"]["Target"]}
${max_target}= Run Keyword If ${target_speed} > ${max_target}
... Set Variable ${target_speed} ELSE Set Variable ${max_target}
END
@@ -132,15 +131,13 @@
# Get the fan target speed and the clockwise blade speed.
${path}= Catenate ${SENSORS_URI}fan_tach/${fan_name}_0
${response}= OpenBMC Get Request ${path}
- ${json}= To JSON ${response.content}
- ${fan_clockwise_speed}= Set Variable ${json["data"]["Value"]}
- ${target_speed}= Set Variable ${json["data"]["Target"]}
+ ${fan_clockwise_speed}= Set Variable ${response.json()["data"]["Value"]}
+ ${target_speed}= Set Variable ${response.json["data"]["Target"]}
# Get the counter-clockwise blade speed.
${path}= Catenate ${SENSORS_URI}fan_tach/${fan_name}_1
${response}= OpenBMC Get Request ${path}
- ${json}= To JSON ${response.content}
- ${fan_counterclockwise_speed}= Set Variable ${json["data"]["Value"]}
+ ${fan_counterclockwise_speed}= Set Variable ${response.json()["data"]["Value"]}
[Return] ${target_speed} ${fan_clockwise_speed}
... ${fan_counterclockwise_speed}
diff --git a/lib/logging_utils.robot b/lib/logging_utils.robot
index 84104a7..9bb9821 100644
--- a/lib/logging_utils.robot
+++ b/lib/logging_utils.robot
@@ -26,9 +26,8 @@
${entry_list}= Create List
${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}list quiet=${1}
Return From Keyword If ${resp.status_code} == ${HTTP_NOT_FOUND}
- ${jsondata}= To JSON ${resp.content}
- FOR ${entry} IN @{jsondata["data"]}
+ FOR ${entry} IN @{resp.json()["data"]}
Continue For Loop If '${entry.rsplit('/', 1)[1]}' == 'callout'
Append To List ${entry_list} ${entry}
END
@@ -200,8 +199,7 @@
${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
... msg=Failed to get error logs.
- ${jsondata}= To JSON ${resp.content}
- ${count}= Get Length ${jsondata["data"]}
+ ${count}= Get Length ${resp.json()["data"]}
[Return] ${count}
Verify Test Error Log
diff --git a/lib/open_power_utils.robot b/lib/open_power_utils.robot
index c6fe106..a3cb470 100644
--- a/lib/open_power_utils.robot
+++ b/lib/open_power_utils.robot
@@ -75,8 +75,7 @@
${resp}= OpenBMC Get Request
... ${object_base_uri_path}/attr/${attribute_name} quiet=${1}
Return From Keyword If ${resp.status_code} != ${HTTP_OK}
- ${content}= To JSON ${resp.content}
- [Return] ${content["data"]}
+ [Return] ${resp.json()["data"]}
Get Functional Processor Count
@@ -225,12 +224,11 @@
# ]
${resp}= OpenBMC Get Request ${object_base_uri_path}list quiet=${1}
- ${content}= To JSON ${resp.content}
${power_supply_avg_list}= Create List
${power_supply_max_list}= Create List
- FOR ${entry} IN @{content["data"]}
+ FOR ${entry} IN @{resp.json()["data"]}
Run Keyword If 'average' in '${entry}' Append To List ${power_supply_avg_list} ${entry}
Run Keyword If 'maximum' in '${entry}' Append To List ${power_supply_max_list} ${entry}
END
diff --git a/lib/openbmc_ffdc_methods.robot b/lib/openbmc_ffdc_methods.robot
index fe68c9f..339bc8e 100755
--- a/lib/openbmc_ffdc_methods.robot
+++ b/lib/openbmc_ffdc_methods.robot
@@ -297,8 +297,7 @@
${resp}= OpenBMC Get Request ${cmd[1]} quiet=${1} timeout=${30}
${status}= Run Keyword and Return Status Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
Run Keyword If '${status}' == '${False}' Continue For Loop
- ${jsondata}= to json ${resp.content} pretty_print=True
- Write Data To File ${\n}${jsondata}${\n} ${logpath}
+ Write Data To File ${\n}${resp.json()}${\n} ${logpath}
Append To List ${ffdc_file_list} ${logpath}
END
diff --git a/lib/pdu/synaccess.robot b/lib/pdu/synaccess.robot
index c76553c..f6eb957 100644
--- a/lib/pdu/synaccess.robot
+++ b/lib/pdu/synaccess.robot
@@ -2,7 +2,7 @@
Documentation Synaccess Protocol Distribution Unit (PDU) library
Resource ../../lib/pdu/pdu.robot
-Library RequestsLibrary.RequestsKeywords
+Library RequestsLibrary
*** Keywords ***
Connect and Login
@@ -15,7 +15,7 @@
Power Cycle
[Documentation] Perform PDU power cycle.
Connect and Login
- ${resp}= Get Request pdu /cmd.cgi?$A4 ${PDU_SLOT_NO}
+ ${resp}= GET On Session pdu /cmd.cgi?$A4 ${PDU_SLOT_NO}
${error_message}= Catenate Power cycle of slot ${PDU_SLOT_NO} failed.
... PDU returned RC=${resp}.
diff --git a/lib/redfish_request.robot b/lib/redfish_request.robot
index 4e66c5c..670df01 100644
--- a/lib/redfish_request.robot
+++ b/lib/redfish_request.robot
@@ -47,9 +47,8 @@
Set To Dictionary ${session_dict} headers ${auth_token}
Set To Dictionary ${session_dict} Location ${session_resp.headers['Location']}
- ${content}= To JSON ${session_resp.content}
- Set To Dictionary ${session_dict} Content ${content}
+ Set To Dictionary ${session_dict} Content ${session_resp.content}
Set Global Variable ${active_session_info} ${session_dict}
Append To List ${session_dict_list} ${session_dict}
diff --git a/lib/resource.robot b/lib/resource.robot
index 50015b3..1e08066 100755
--- a/lib/resource.robot
+++ b/lib/resource.robot
@@ -1,7 +1,7 @@
*** Settings ***
Library Collections
Library String
-Library RequestsLibrary.RequestsKeywords
+Library RequestsLibrary
Library OperatingSystem
Variables ../data/variables.py
diff --git a/lib/rest_client.robot b/lib/rest_client.robot
index d8e9590..649352b 100644
--- a/lib/rest_client.robot
+++ b/lib/rest_client.robot
@@ -1,7 +1,7 @@
*** Settings ***
Library Collections
Library String
-Library RequestsLibrary.RequestsKeywords
+Library RequestsLibrary
Library OperatingSystem
Resource resource.robot
Library disable_warning_urllib.py
@@ -47,10 +47,10 @@
Set To Dictionary ${kwargs} headers ${headers}
Run Keyword If '${quiet}' == '${0}' Log Request method=Get
... base_uri=${base_uri} args=&{kwargs}
- ${ret}= Get Request openbmc ${base_uri} &{kwargs} timeout=${timeout}
- Run Keyword If '${quiet}' == '${0}' Log Response ${ret}
+ ${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] ${ret}
+ [Return] ${resp}
OpenBMC Post Request
[Documentation] Do REST POST request and return the result.
@@ -71,10 +71,10 @@
${base_uri}= Catenate SEPARATOR= ${DBUS_PREFIX} ${uri}
${headers}= Create Dictionary Content-Type=application/json
... X-Auth-Token=${XAUTH_TOKEN}
- set to dictionary ${kwargs} headers ${headers}
+ Set To Dictionary ${kwargs} headers ${headers}
Run Keyword If '${quiet}' == '${0}' Log Request method=Post
... base_uri=${base_uri} args=&{kwargs}
- ${ret}= Post Request openbmc ${base_uri} &{kwargs} timeout=${timeout}
+ ${ret}= POST On Session openbmc ${base_uri} &{kwargs} timeout=${timeout}
Run Keyword If '${quiet}' == '${0}' Log Response ${ret}
Delete All Sessions
[Return] ${ret}
@@ -93,15 +93,14 @@
# ${kwargs}= Create Dictionary allow_redirect=${True}.
Initialize OpenBMC ${timeout}
- ${base_uri}= Catenate SEPARATOR= ${DBUS_PREFIX} ${uri}
- ${headers}= Create Dictionary Content-Type=application/json
+ ${base_uri}= Catenate SEPARATOR= ${DBUS_PREFIX} ${uri}
+ ${headers}= Create Dictionary Content-Type=application/json
... X-Auth-Token=${XAUTH_TOKEN}
- set to dictionary ${kwargs} headers ${headers}
- Log Request method=Put base_uri=${base_uri} args=&{kwargs}
- ${ret}= Put Request openbmc ${base_uri} &{kwargs} timeout=${timeout}
- Log Response ${ret}
+ Log Request method=Put base_uri=${base_uri} args=&{kwargs}
+ ${resp}= PUT On Session openbmc ${base_uri} json=${kwargs["data"]} headers=${headers}
+ Log Response ${resp}
Delete All Sessions
- [Return] ${ret}
+ [Return] ${resp}
OpenBMC Delete Request
[Documentation] Do REST request to delete the resource identified by the
@@ -124,7 +123,7 @@
Set To Dictionary ${kwargs} headers ${headers}
Run Keyword If '${quiet}' == '${0}' Log Request method=Delete
... base_uri=${base_uri} args=&{kwargs}
- ${ret}= Delete Request openbmc ${base_uri} &{kwargs} timeout=${timeout}
+ ${ret}= DELETE On Session openbmc ${base_uri} &{kwargs} timeout=${timeout}
Run Keyword If '${quiet}' == '${0}' Log Response ${ret}
Delete All Sessions
[Return] ${ret}
@@ -167,7 +166,7 @@
${headers}= Create Dictionary Content-Type=application/json
@{credentials}= Create List ${rest_username} ${rest_password}
${data}= Create Dictionary data=@{credentials}
- ${resp}= Post Request openbmc /login data=${data} headers=${headers}
+ ${resp}= POST On Session openbmc /login json=${data} headers=${headers}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
${processed_token_data}=
@@ -197,7 +196,7 @@
${headers}= Create Dictionary Content-Type=application/json
@{credentials}= Create List ${rest_username} ${rest_password}
${data}= create dictionary data=@{credentials}
- ${status} ${resp}= Run Keyword And Ignore Error Post Request openbmc
+ ${status} ${resp}= Run Keyword And Ignore Error POST On Session openbmc
... /login data=${data} headers=${headers}
Should Be Equal ${status} PASS msg=${resp}
@@ -213,12 +212,13 @@
# If there is no active sesion it will throw the following exception
# "Non-existing index or alias 'openbmc'"
- ${resp}= Post Request openbmc
+ ${resp}= POST On Session openbmc
... /logout data=${data} headers=${headers}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
... msg=${resp}
+
Log Request
[Documentation] Log the specific REST URI, method name on the console.
[Arguments] &{kwargs}
@@ -226,17 +226,21 @@
... , method: ${kwargs["method"]} , args: ${kwargs["args"]}
Logging ${msg} console=True
+
Log Response
[Documentation] Log the response code on the console.
[Arguments] ${resp}
+
${msg}= Catenate SEPARATOR= Response code: ${resp.status_code}
... , Content: ${resp.content}
Logging ${msg} console=True
+
Logging
[Documentation] Log the specified message on the console.
[Arguments] ${msg} ${console}=default False
- Log ${msg} console=True
+ Log ${msg} console=True
+
Read Attribute
[Documentation] Retrieve attribute value from URI and return result.
@@ -260,10 +264,9 @@
${resp}= OpenBMC Get Request ${uri}attr/${attr} timeout=${timeout}
... quiet=${quiet}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
- ${content}= To Json ${resp.content}
Run Keyword If '${expected_value}' != '${EMPTY}'
- ... Should Be Equal As Strings ${expected_value} ${content["data"]}
- [Return] ${content["data"]}
+ ... Should Be Equal As Strings ${expected_value} ${resp.json()["data"]}
+ [Return] ${resp.json()["data"]}
Write Attribute
@@ -319,9 +322,8 @@
${resp}= OpenBMC Get Request ${uri} timeout=${timeout} quiet=${quiet}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
- ${content}= To Json Ordered ${resp.content}
- [Return] ${content["data"]}
+ [Return] ${resp.json()["data"]}
Call Method
[Documentation] Invoke the specific REST service method.
@@ -365,7 +367,7 @@
Set To Dictionary ${kwargs} headers ${headers}
Run Keyword If '${quiet}' == '${0}' Log Request method=Post
... base_uri=${base_uri} args=&{kwargs}
- ${ret}= Post Request openbmc ${base_uri} &{kwargs} timeout=${timeout}
+ ${ret}= POST On Session openbmc ${base_uri} &{kwargs} timeout=${timeout}
Run Keyword If '${quiet}' == '${0}' Log Response ${ret}
Valid Value ret.status_code ${valid_status_codes}
Delete All Sessions
@@ -393,15 +395,13 @@
... {"UserName":"${rest_username}", "Password":"${rest_password}"}
... {"UserName":"${rest_username}", "Password":"${rest_password}", ${kwargs}}
- ${resp}= Post Request redfish /redfish/v1/SessionService/Sessions
+ ${resp}= POST On Session redfish /redfish/v1/SessionService/Sessions
... data=${data} headers=${headers}
Should Be Equal As Strings ${resp.status_code} ${HTTP_CREATED}
- ${content}= To JSON ${resp.content}
-
Set Global Variable ${XAUTH_TOKEN} ${resp.headers["X-Auth-Token"]}
- [Return] ${content}
+ [Return] ${resp.json()}
Redfish Get Request
@@ -422,7 +422,7 @@
${headers}= Create Dictionary Content-Type=application/json X-Auth-Token=${XAUTH_TOKEN}
Set To Dictionary ${kwargs} headers ${headers}
Run Keyword If '${quiet}' == '${0}' Log Request method=Post base_uri=${base_uri} args=&{kwargs}
- ${resp}= Get Request redfish ${base_uri} &{kwargs} timeout=${timeout}
+ ${resp}= GET On Session redfish ${base_uri} &{kwargs} timeout=${timeout}
Run Keyword If '${quiet}' == '${0}' Log Response ${resp}
[Return] ${resp}
@@ -446,7 +446,7 @@
${headers}= Create Dictionary Content-Type=application/json X-Auth-Token=${XAUTH_TOKEN}
Set To Dictionary ${kwargs} headers ${headers}
Run Keyword If '${quiet}' == '${0}' Log Request method=Post base_uri=${base_uri} args=&{kwargs}
- ${resp}= Post Request redfish ${base_uri} &{kwargs} timeout=${timeout}
+ ${resp}= POST On Session redfish ${base_uri} &{kwargs} timeout=${timeout} expected_status=any
Run Keyword If '${quiet}' == '${0}' Log Response ${resp}
[Return] ${resp}
diff --git a/lib/utils.robot b/lib/utils.robot
index a306dc5..0c572c2 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -396,7 +396,7 @@
log to console "Triggering warm reset"
${data}= create dictionary data=@{EMPTY}
- ${resp}= openbmc post request
+ ${resp}= Openbmc Post Request
... ${OPENBMC_BASE_URI}control/bmc0/action/warmReset data=${data}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
${session_active}= Check If warmReset is Initiated
@@ -421,9 +421,8 @@
${resp}= Call Method ${OPENBMC_BASE_URI}control/chassis0/ getPowerState
... data=${args} quiet=${quiet}
Should be equal as strings ${resp.status_code} ${HTTP_OK}
- ${content}= to json ${resp.content}
- [Return] ${content["data"]}
+ [Return] ${resp.json()["data"]}
Clear BMC Gard Record
@@ -567,9 +566,9 @@
Delete All Error Logs
[Documentation] Delete all error log entries using "DeleteAll" interface.
- ${data}= Create Dictionary data=@{EMPTY}
+ ${args}= Set Variable {"data": []}
${resp}= Openbmc Post Request ${BMC_LOGGING_URI}action/DeleteAll
- ... data=${data}
+ ... data=${args}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
@@ -803,7 +802,7 @@
${data}= Create Dictionary data=@{password}
${headers}= Create Dictionary Content-Type=application/json X-Auth-Token=${XAUTH_TOKEN}
- ${resp}= Post Request openbmc ${BMC_USER_URI}root/action/SetPassword
+ ${resp}= POST On Session openbmc ${BMC_USER_URI}root/action/SetPassword
... data=${data} headers=${headers}
Valid Value resp.status_code [${HTTP_OK}]