blob: b178f55386d19df853c5f1c9fd97cd5723db2c84 [file] [log] [blame]
*** Settings ***
Documentation BMC redfish utils.
Resource resource.txt
Resource bmc_redfish_resource.robot
*** Keywords ***
Redfish Power Operation
[Documentation] Do Redfish power operation.
[Arguments] ${reset_type}
# Description of arguments:
# reset_type Type of power operation.
# (e.g. On/ForceOff/GracefulRestart/GracefulShutdown)
# Example:
# "Actions": {
# "#ComputerSystem.Reset": {
# "ResetType@Redfish.AllowableValues": [
# "On",
# "ForceOff",
# "GracefulRestart",
# "GracefulShutdown"
# ],
# "target": "/redfish/v1/Systems/motherboard/Actions/ComputerSystem.Reset"
# }}
redfish.Login
${payload}= Create Dictionary ResetType=${reset_type}
${resp}= redfish.Post Systems/1/Actions/ComputerSystem.Reset body=&{payload}
Should Be Equal As Strings ${resp.status} ${HTTP_OK}
redfish.Logout