Sridevi Ramesh | 0047de8 | 2019-02-01 06:33:08 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation BMC redfish utils. |
| 3 | |
George Keishing | 2db7bca | 2019-02-14 13:03:08 -0600 | [diff] [blame] | 4 | Resource resource.robot |
Sridevi Ramesh | 0047de8 | 2019-02-01 06:33:08 -0600 | [diff] [blame] | 5 | Resource bmc_redfish_resource.robot |
| 6 | |
| 7 | |
| 8 | *** Keywords *** |
| 9 | |
| 10 | Redfish 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 | |