George Keishing | e62d8b0 | 2018-11-29 12:01:56 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Resource ../lib/resource.txt |
| 3 | Resource ../lib/bmc_redfish_resource.robot |
| 4 | |
| 5 | Suite Teardown redfish.Logout |
| 6 | |
| 7 | *** Variables *** |
| 8 | |
| 9 | ${POWER_ON} On |
| 10 | ${POWER_GRACEFULL_OFF} GracefulShutdown |
| 11 | ${POWER_FORCE_OFF} ForceOff |
| 12 | |
| 13 | ${REDFISH_POWER_URI} Systems/1/Actions/ComputerSystem.Reset |
| 14 | |
| 15 | *** Test Cases *** |
| 16 | |
| 17 | Test GET Call Request |
| 18 | [Documentation] Do the GET operation. |
| 19 | |
| 20 | ${resp}= redfish.Get Systems/1 |
| 21 | Log To Console ${resp} |
| 22 | |
| 23 | Test List Request |
| 24 | [Documentation] Do the GET list operation. |
| 25 | |
| 26 | ${resp}= redfish.List Request ${EMPTY} |
| 27 | Log To Console ${resp} |
| 28 | |
| 29 | Test Enumerate Request |
| 30 | [Documentation] Do the GET enumerate operation. |
| 31 | |
| 32 | ${resp}= redfish.Enumerate Request ${EMPTY} |
| 33 | Log To Console ${resp} |
| 34 | |
| 35 | Test Power On Call Request |
| 36 | [Documentation] Do the power on operations. |
| 37 | |
| 38 | Boot Action GracefulShutdown |
| 39 | |
| 40 | |
| 41 | *** Keywords *** |
| 42 | |
| 43 | Boot Action |
| 44 | [Documentation] Host boot to power on, off or reboot. |
| 45 | [Arguments] ${boot_option} |
| 46 | |
| 47 | # Description of argument(s): |
| 48 | # boot_option Type of allowed boot |
| 49 | # (e.g. "On", "ForceOff", "GracefulShutdown", "GracefulRestart"). |
| 50 | |
| 51 | ${payload}= Create Dictionary ResetType=${boot_option} |
| 52 | ${resp}= redfish.Post ${REDFISH_POWER_URI} body=&{payload} |
| 53 | Log To Console ${resp} |
| 54 | |