blob: 6d5e35ffa078240376e78a2b257364d1edd20a0e [file] [log] [blame]
George Keishing22872e52019-01-30 22:44:04 -06001*** Settings ***
2Resource ../../lib/resource.txt
3Resource ../../lib/bmc_redfish_resource.robot
4Resource ../../lib/common_utils.robot
5
6Suite Teardown redfish.Logout
7
8*** Test Cases ***
9
10Verify BMC Firmware Version
11 [Documentation] Get firmware version from BMC manager.
12 [Tags] Verify_BMC_Firmware_Version
13
14 redfish.Login
George Keishing3a813a92019-02-01 20:34:47 -060015 ${resp}= redfish.Get /redfish/v1/Managers/bmc
George Keishing22872e52019-01-30 22:44:04 -060016 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
17 ${bmc_version}= Get BMC Version
18 Should Be Equal As Strings
19 ... ${resp.dict["FirmwareVersion"]} ${bmc_version.strip('"')}
20 redfish.Logout
21
22
23Verify BMC Manager Properties
24 [Documentation] Verify BMC managers resource properties.
25 [Tags] Verify_BMC_Manager_Properties
26
27 redfish.Login
George Keishing3a813a92019-02-01 20:34:47 -060028 ${resp}= redfish.Get /redfish/v1/Managers/bmc
George Keishing22872e52019-01-30 22:44:04 -060029 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
30 # Example:
31 # "Description": "Baseboard Management Controller"
32 # "Id": "bmc"
33 # "Model": "OpenBmc",
34 # "Name": "OpenBmc Manager",
35 # "UUID": "xxxxxxxx-xxx-xxx-xxx-xxxxxxxxxxxx"
36 # "PowerState": "On"
37
38 Should Be Equal As Strings
39 ... ${resp.dict["Description"]} Baseboard Management Controller
40 Should Be Equal As Strings ${resp.dict["Id"]} bmc
41 Should Be Equal As Strings ${resp.dict["Model"]} OpenBmc
42 Should Be Equal As Strings ${resp.dict["Name"]} OpenBmc Manager
43 Should Not Be Empty ${resp.dict["UUID"]}
44 Should Be Equal As Strings ${resp.dict["PowerState"]} On
45 redfish.Logout
46
47
48Test BMC Manager GracefulRestart
49 [Documentation] BMC graceful restart.
50 [Tags] Test_BMC_Manager_GracefulRestart
51
52 # Example:
53 # "Actions": {
54 # "#Manager.Reset": {
55 # "ResetType@Redfish.AllowableValues": [
56 # "GracefulRestart"
57 # ],
58 # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
59 # }
60
61 redfish.Login
62 ${payload}= Create Dictionary ResetType=GracefulRestart
63 ${resp}= redfish.Post Managers/bmc/Actions/Manager.Reset body=&{payload}
64 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
65
66 # TODO: Add logic to ping and check BMC online state
67
68
69