blob: 127cd55b7bcf6282dfc8f3c1e23785a10b917af1 [file] [log] [blame]
George Keishing22872e52019-01-30 22:44:04 -06001*** Settings ***
George Keishing2db7bca2019-02-14 13:03:08 -06002Resource ../../lib/resource.robot
George Keishing22872e52019-01-30 22:44:04 -06003Resource ../../lib/bmc_redfish_resource.robot
4Resource ../../lib/common_utils.robot
George Keishing3298d5c2019-02-12 06:59:25 -06005Resource ../../lib/openbmc_ffdc.robot
George Keishingba0441c2019-03-09 22:22:57 -06006Resource ../../lib/boot_utils.robot
George Keishing22872e52019-01-30 22:44:04 -06007
George Keishing97c93942019-03-04 12:45:07 -06008Test Setup Test Setup Execution
9Test Teardown Redfish.Logout
George Keishing22872e52019-01-30 22:44:04 -060010
11*** Test Cases ***
12
George Keishing5ee33d92019-02-02 12:33:25 -060013Verify Redfish BMC Firmware Version
George Keishing22872e52019-01-30 22:44:04 -060014 [Documentation] Get firmware version from BMC manager.
George Keishing5ee33d92019-02-02 12:33:25 -060015 [Tags] Verify_Redfish_BMC_Firmware_Version
George Keishing22872e52019-01-30 22:44:04 -060016
George Keishing97c93942019-03-04 12:45:07 -060017 Redfish.Login
18 ${resp}= Redfish.Get /redfish/v1/Managers/bmc
George Keishing22872e52019-01-30 22:44:04 -060019 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
20 ${bmc_version}= Get BMC Version
21 Should Be Equal As Strings
22 ... ${resp.dict["FirmwareVersion"]} ${bmc_version.strip('"')}
George Keishing22872e52019-01-30 22:44:04 -060023
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
George Keishing97c93942019-03-04 12:45:07 -060029 Redfish.Login
30 ${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
George Keishing22872e52019-01-30 22:44:04 -060047
48
George Keishingba0441c2019-03-09 22:22:57 -060049Redfish BMC Manager GracefulRestart When Host Off
50 [Documentation] BMC graceful restart when host is powered off.
51 [Tags] Redfish_BMC_Manager_GracefulRestart_When_Host_Off
George Keishing22872e52019-01-30 22:44:04 -060052
George Keishing22872e52019-01-30 22:44:04 -060053 # "Actions": {
54 # "#Manager.Reset": {
55 # "ResetType@Redfish.AllowableValues": [
56 # "GracefulRestart"
57 # ],
58 # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
59 # }
60
George Keishingba0441c2019-03-09 22:22:57 -060061 Redfish OBMC Reboot (off)
George Keishing22872e52019-01-30 22:44:04 -060062
George Keishingba0441c2019-03-09 22:22:57 -060063
64Redfish BMC Manager GracefulRestart When Host Booted
65 [Documentation] BMC graceful restart when host is running.
66 [Tags] Redfish_BMC_Manager_GracefulRestart_When_Host_Booted
67
68 Redfish OBMC Reboot (run)
69
George Keishing22872e52019-01-30 22:44:04 -060070
George Keishing97c93942019-03-04 12:45:07 -060071*** Keywords ***
George Keishing22872e52019-01-30 22:44:04 -060072
George Keishing97c93942019-03-04 12:45:07 -060073Test Setup Execution
74 [Documentation] Do test case setup tasks.
75
76 redfish.Login
77
78
79Test Teardown Execution
80 [Documentation] Do the post test teardown.
81
82 FFDC On Test Case Fail
83 redfish.Logout
George Keishing22872e52019-01-30 22:44:04 -060084