blob: 979333aaa21fecc0944d125afacdf2c404d08da5 [file] [log] [blame]
George Keishing22872e52019-01-30 22:44:04 -06001*** Settings ***
Joy Onyerikwudbfe97d2019-03-11 19:44:56 -05002Documentation Test BMC Manager functionality.
George Keishing2db7bca2019-02-14 13:03:08 -06003Resource ../../lib/resource.robot
George Keishing22872e52019-01-30 22:44:04 -06004Resource ../../lib/bmc_redfish_resource.robot
5Resource ../../lib/common_utils.robot
George Keishing3298d5c2019-02-12 06:59:25 -06006Resource ../../lib/openbmc_ffdc.robot
George Keishingba0441c2019-03-09 22:22:57 -06007Resource ../../lib/boot_utils.robot
George Keishing44f890b2019-04-22 13:32:15 -05008Resource ../../lib/open_power_utils.robot
George Keishing22872e52019-01-30 22:44:04 -06009
George Keishing97c93942019-03-04 12:45:07 -060010Test Setup Test Setup Execution
George Keishing49f46332019-03-26 08:13:05 -050011Test Teardown Test Teardown Execution
George Keishing22872e52019-01-30 22:44:04 -060012
13*** Test Cases ***
14
George Keishing5ee33d92019-02-02 12:33:25 -060015Verify Redfish BMC Firmware Version
George Keishing22872e52019-01-30 22:44:04 -060016 [Documentation] Get firmware version from BMC manager.
George Keishing5ee33d92019-02-02 12:33:25 -060017 [Tags] Verify_Redfish_BMC_Firmware_Version
George Keishing22872e52019-01-30 22:44:04 -060018
George Keishing97c93942019-03-04 12:45:07 -060019 Redfish.Login
20 ${resp}= Redfish.Get /redfish/v1/Managers/bmc
George Keishing22872e52019-01-30 22:44:04 -060021 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
22 ${bmc_version}= Get BMC Version
23 Should Be Equal As Strings
24 ... ${resp.dict["FirmwareVersion"]} ${bmc_version.strip('"')}
George Keishing22872e52019-01-30 22:44:04 -060025
26
George Keishing5ee33d92019-02-02 12:33:25 -060027Verify Redfish BMC Manager Properties
George Keishing22872e52019-01-30 22:44:04 -060028 [Documentation] Verify BMC managers resource properties.
George Keishing5ee33d92019-02-02 12:33:25 -060029 [Tags] Verify_Redfish_BMC_Manager_Properties
George Keishing22872e52019-01-30 22:44:04 -060030
George Keishing97c93942019-03-04 12:45:07 -060031 Redfish.Login
32 ${resp}= Redfish.Get /redfish/v1/Managers/bmc
George Keishing22872e52019-01-30 22:44:04 -060033 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
34 # Example:
35 # "Description": "Baseboard Management Controller"
36 # "Id": "bmc"
37 # "Model": "OpenBmc",
38 # "Name": "OpenBmc Manager",
39 # "UUID": "xxxxxxxx-xxx-xxx-xxx-xxxxxxxxxxxx"
40 # "PowerState": "On"
41
42 Should Be Equal As Strings
43 ... ${resp.dict["Description"]} Baseboard Management Controller
44 Should Be Equal As Strings ${resp.dict["Id"]} bmc
45 Should Be Equal As Strings ${resp.dict["Model"]} OpenBmc
46 Should Be Equal As Strings ${resp.dict["Name"]} OpenBmc Manager
47 Should Not Be Empty ${resp.dict["UUID"]}
48 Should Be Equal As Strings ${resp.dict["PowerState"]} On
George Keishing22872e52019-01-30 22:44:04 -060049
50
George Keishingba0441c2019-03-09 22:22:57 -060051Redfish BMC Manager GracefulRestart When Host Off
52 [Documentation] BMC graceful restart when host is powered off.
53 [Tags] Redfish_BMC_Manager_GracefulRestart_When_Host_Off
George Keishing22872e52019-01-30 22:44:04 -060054
George Keishing22872e52019-01-30 22:44:04 -060055 # "Actions": {
56 # "#Manager.Reset": {
57 # "ResetType@Redfish.AllowableValues": [
58 # "GracefulRestart"
59 # ],
60 # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
61 # }
62
George Keishingba0441c2019-03-09 22:22:57 -060063 Redfish OBMC Reboot (off)
George Keishing22872e52019-01-30 22:44:04 -060064
George Keishingba0441c2019-03-09 22:22:57 -060065
66Redfish BMC Manager GracefulRestart When Host Booted
67 [Documentation] BMC graceful restart when host is running.
68 [Tags] Redfish_BMC_Manager_GracefulRestart_When_Host_Booted
69
70 Redfish OBMC Reboot (run)
71
George Keishing44f890b2019-04-22 13:32:15 -050072 # TODO: Replace OCC state check with redfish property when available.
73 Verify OCC State
74
George Keishing22872e52019-01-30 22:44:04 -060075
George Keishing97c93942019-03-04 12:45:07 -060076*** Keywords ***
George Keishing22872e52019-01-30 22:44:04 -060077
George Keishing97c93942019-03-04 12:45:07 -060078Test Setup Execution
79 [Documentation] Do test case setup tasks.
80
81 redfish.Login
82
83
84Test Teardown Execution
85 [Documentation] Do the post test teardown.
86
87 FFDC On Test Case Fail
88 redfish.Logout