blob: f7d72c7e2837118a3952ce6e23b4573409509fc1 [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 Keishing22872e52019-01-30 22:44:04 -06008
George Keishing97c93942019-03-04 12:45:07 -06009Test Setup Test Setup Execution
George Keishing49f46332019-03-26 08:13:05 -050010Test Teardown Test Teardown Execution
George Keishing22872e52019-01-30 22:44:04 -060011
12*** Test Cases ***
13
George Keishing5ee33d92019-02-02 12:33:25 -060014Verify Redfish BMC Firmware Version
George Keishing22872e52019-01-30 22:44:04 -060015 [Documentation] Get firmware version from BMC manager.
George Keishing5ee33d92019-02-02 12:33:25 -060016 [Tags] Verify_Redfish_BMC_Firmware_Version
George Keishing22872e52019-01-30 22:44:04 -060017
George Keishing97c93942019-03-04 12:45:07 -060018 Redfish.Login
19 ${resp}= Redfish.Get /redfish/v1/Managers/bmc
George Keishing22872e52019-01-30 22:44:04 -060020 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
21 ${bmc_version}= Get BMC Version
22 Should Be Equal As Strings
23 ... ${resp.dict["FirmwareVersion"]} ${bmc_version.strip('"')}
George Keishing22872e52019-01-30 22:44:04 -060024
25
George Keishing5ee33d92019-02-02 12:33:25 -060026Verify Redfish BMC Manager Properties
George Keishing22872e52019-01-30 22:44:04 -060027 [Documentation] Verify BMC managers resource properties.
George Keishing5ee33d92019-02-02 12:33:25 -060028 [Tags] Verify_Redfish_BMC_Manager_Properties
George Keishing22872e52019-01-30 22:44:04 -060029
George Keishing97c93942019-03-04 12:45:07 -060030 Redfish.Login
31 ${resp}= Redfish.Get /redfish/v1/Managers/bmc
George Keishing22872e52019-01-30 22:44:04 -060032 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
33 # Example:
34 # "Description": "Baseboard Management Controller"
35 # "Id": "bmc"
36 # "Model": "OpenBmc",
37 # "Name": "OpenBmc Manager",
38 # "UUID": "xxxxxxxx-xxx-xxx-xxx-xxxxxxxxxxxx"
39 # "PowerState": "On"
40
41 Should Be Equal As Strings
42 ... ${resp.dict["Description"]} Baseboard Management Controller
43 Should Be Equal As Strings ${resp.dict["Id"]} bmc
44 Should Be Equal As Strings ${resp.dict["Model"]} OpenBmc
45 Should Be Equal As Strings ${resp.dict["Name"]} OpenBmc Manager
46 Should Not Be Empty ${resp.dict["UUID"]}
47 Should Be Equal As Strings ${resp.dict["PowerState"]} On
George Keishing22872e52019-01-30 22:44:04 -060048
49
George Keishingba0441c2019-03-09 22:22:57 -060050Redfish BMC Manager GracefulRestart When Host Off
51 [Documentation] BMC graceful restart when host is powered off.
52 [Tags] Redfish_BMC_Manager_GracefulRestart_When_Host_Off
George Keishing22872e52019-01-30 22:44:04 -060053
George Keishing22872e52019-01-30 22:44:04 -060054 # "Actions": {
55 # "#Manager.Reset": {
56 # "ResetType@Redfish.AllowableValues": [
57 # "GracefulRestart"
58 # ],
59 # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
60 # }
61
George Keishingba0441c2019-03-09 22:22:57 -060062 Redfish OBMC Reboot (off)
George Keishing22872e52019-01-30 22:44:04 -060063
George Keishingba0441c2019-03-09 22:22:57 -060064
65Redfish BMC Manager GracefulRestart When Host Booted
66 [Documentation] BMC graceful restart when host is running.
67 [Tags] Redfish_BMC_Manager_GracefulRestart_When_Host_Booted
68
69 Redfish OBMC Reboot (run)
70
George Keishing22872e52019-01-30 22:44:04 -060071
George Keishing97c93942019-03-04 12:45:07 -060072*** Keywords ***
George Keishing22872e52019-01-30 22:44:04 -060073
George Keishing97c93942019-03-04 12:45:07 -060074Test Setup Execution
75 [Documentation] Do test case setup tasks.
76
77 redfish.Login
78
79
80Test Teardown Execution
81 [Documentation] Do the post test teardown.
82
83 FFDC On Test Case Fail
84 redfish.Logout