blob: b64cf5adc6b27ce15216ad5f6a56d2df388c383a [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
George Keishing3298d5c2019-02-12 06:59:25 -06005Resource ../../lib/openbmc_ffdc.robot
George Keishing22872e52019-01-30 22:44:04 -06006
George Keishing3298d5c2019-02-12 06:59:25 -06007Test Teardown FFDC On Test Case Fail
George Keishing22872e52019-01-30 22:44:04 -06008Suite Teardown redfish.Logout
9
10*** Test Cases ***
11
George Keishing5ee33d92019-02-02 12:33:25 -060012Verify Redfish BMC Firmware Version
George Keishing22872e52019-01-30 22:44:04 -060013 [Documentation] Get firmware version from BMC manager.
George Keishing5ee33d92019-02-02 12:33:25 -060014 [Tags] Verify_Redfish_BMC_Firmware_Version
George Keishing22872e52019-01-30 22:44:04 -060015
16 redfish.Login
George Keishing3a813a92019-02-01 20:34:47 -060017 ${resp}= redfish.Get /redfish/v1/Managers/bmc
George Keishing22872e52019-01-30 22:44:04 -060018 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
19 ${bmc_version}= Get BMC Version
20 Should Be Equal As Strings
21 ... ${resp.dict["FirmwareVersion"]} ${bmc_version.strip('"')}
22 redfish.Logout
23
24
George Keishing5ee33d92019-02-02 12:33:25 -060025Verify Redfish BMC Manager Properties
George Keishing22872e52019-01-30 22:44:04 -060026 [Documentation] Verify BMC managers resource properties.
George Keishing5ee33d92019-02-02 12:33:25 -060027 [Tags] Verify_Redfish_BMC_Manager_Properties
George Keishing22872e52019-01-30 22:44:04 -060028
29 redfish.Login
George Keishing3a813a92019-02-01 20:34:47 -060030 ${resp}= redfish.Get /redfish/v1/Managers/bmc
George Keishing22872e52019-01-30 22:44:04 -060031 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
32 # Example:
33 # "Description": "Baseboard Management Controller"
34 # "Id": "bmc"
35 # "Model": "OpenBmc",
36 # "Name": "OpenBmc Manager",
37 # "UUID": "xxxxxxxx-xxx-xxx-xxx-xxxxxxxxxxxx"
38 # "PowerState": "On"
39
40 Should Be Equal As Strings
41 ... ${resp.dict["Description"]} Baseboard Management Controller
42 Should Be Equal As Strings ${resp.dict["Id"]} bmc
43 Should Be Equal As Strings ${resp.dict["Model"]} OpenBmc
44 Should Be Equal As Strings ${resp.dict["Name"]} OpenBmc Manager
45 Should Not Be Empty ${resp.dict["UUID"]}
46 Should Be Equal As Strings ${resp.dict["PowerState"]} On
47 redfish.Logout
48
49
George Keishing5ee33d92019-02-02 12:33:25 -060050Test Redfish BMC Manager GracefulRestart
George Keishing22872e52019-01-30 22:44:04 -060051 [Documentation] BMC graceful restart.
George Keishing5ee33d92019-02-02 12:33:25 -060052 [Tags] Test_Redfish_BMC_Manager_GracefulRestart
George Keishing22872e52019-01-30 22:44:04 -060053
54 # Example:
55 # "Actions": {
56 # "#Manager.Reset": {
57 # "ResetType@Redfish.AllowableValues": [
58 # "GracefulRestart"
59 # ],
60 # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
61 # }
62
63 redfish.Login
64 ${payload}= Create Dictionary ResetType=GracefulRestart
65 ${resp}= redfish.Post Managers/bmc/Actions/Manager.Reset body=&{payload}
66 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
67
68 # TODO: Add logic to ping and check BMC online state
69
70
71