blob: 7f67df01037853afb5d41f921f37e97a11b01d4b [file] [log] [blame]
Sridevi Ramesh0047de82019-02-01 06:33:08 -06001*** Settings ***
2Documentation BMC redfish utils.
3
George Keishing2db7bca2019-02-14 13:03:08 -06004Resource resource.robot
Sridevi Ramesh0047de82019-02-01 06:33:08 -06005Resource bmc_redfish_resource.robot
6
7
8*** Keywords ***
9
10Redfish Power Operation
11 [Documentation] Do Redfish power operation.
12 [Arguments] ${reset_type}
13 # Description of arguments:
14 # reset_type Type of power operation.
15 # (e.g. On/ForceOff/GracefulRestart/GracefulShutdown)
16
17 # Example:
18 # "Actions": {
19 # "#ComputerSystem.Reset": {
20 # "ResetType@Redfish.AllowableValues": [
21 # "On",
22 # "ForceOff",
23 # "GracefulRestart",
24 # "GracefulShutdown"
25 # ],
26 # "target": "/redfish/v1/Systems/motherboard/Actions/ComputerSystem.Reset"
27 # }}
28
29 redfish.Login
30 ${payload}= Create Dictionary ResetType=${reset_type}
31 ${resp}= redfish.Post Systems/1/Actions/ComputerSystem.Reset body=&{payload}
32 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
33 redfish.Logout
34
35
36