blob: cde19a4a813dea6c29eb94c60e09b99329d29847 [file] [log] [blame]
George Keishinge62d8b02018-11-29 12:01:56 -06001*** Settings ***
2Resource ../lib/resource.txt
3Resource ../lib/bmc_redfish_resource.robot
4
5Suite 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
17Test GET Call Request
18 [Documentation] Do the GET operation.
19
20 ${resp}= redfish.Get Systems/1
21 Log To Console ${resp}
22
23Test List Request
24 [Documentation] Do the GET list operation.
25
26 ${resp}= redfish.List Request ${EMPTY}
27 Log To Console ${resp}
28
29Test Enumerate Request
30 [Documentation] Do the GET enumerate operation.
31
32 ${resp}= redfish.Enumerate Request ${EMPTY}
33 Log To Console ${resp}
34
35Test Power On Call Request
36 [Documentation] Do the power on operations.
37
38 Boot Action GracefulShutdown
39
40
41*** Keywords ***
42
43Boot 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