blob: 3d6c39d8637c4de68bb7c60dc36ec1f47c8f565c [file] [log] [blame]
Sridevi Ramesh0047de82019-02-01 06:33:08 -06001*** Settings ***
George Keishingb10eaca2019-02-24 05:07:30 -06002Documentation BMC and host redfish utility keywords.
Sridevi Ramesh0047de82019-02-01 06:33:08 -06003
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
George Keishingb10eaca2019-02-24 05:07:30 -060011 [Documentation] Do Redfish host power operation.
Sridevi Ramesh0047de82019-02-01 06:33:08 -060012 [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
George Keishingb10eaca2019-02-24 05:07:30 -060036Redfish BMC Reset Operation
37 [Documentation] Do Redfish BMC reset operation.
Sridevi Ramesh0047de82019-02-01 06:33:08 -060038
George Keishingb10eaca2019-02-24 05:07:30 -060039 # Example:
40 # "Actions": {
41 # "#Manager.Reset": {
42 # "ResetType@Redfish.AllowableValues": [
43 # "GracefulRestart"
44 # ],
45 # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
46 # }
47
48 redfish.Login
49 ${payload}= Create Dictionary ResetType=GracefulRestart
50 ${resp}= redfish.Post Managers/bmc/Actions/Manager.Reset body=&{payload}
51 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
52 redfish.Logout