1*** Settings *** 2Documentation Test BMC Manager functionality. 3Resource ../../lib/resource.robot 4Resource ../../lib/bmc_redfish_resource.robot 5Resource ../../lib/common_utils.robot 6Resource ../../lib/openbmc_ffdc.robot 7Resource ../../lib/boot_utils.robot 8Resource ../../lib/open_power_utils.robot 9 10Test Setup Test Setup Execution 11Test Teardown Test Teardown Execution 12 13*** Test Cases *** 14 15Verify Redfish BMC Firmware Version 16 [Documentation] Get firmware version from BMC manager. 17 [Tags] Verify_Redfish_BMC_Firmware_Version 18 19 Redfish.Login 20 ${resp}= Redfish.Get /redfish/v1/Managers/bmc 21 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('"')} 25 26 27Verify Redfish BMC Manager Properties 28 [Documentation] Verify BMC managers resource properties. 29 [Tags] Verify_Redfish_BMC_Manager_Properties 30 31 Redfish.Login 32 ${resp}= Redfish.Get /redfish/v1/Managers/bmc 33 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 49 50 51Redfish 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 54 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 OBMC Reboot (off) 64 65 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 72 # TODO: Replace OCC state check with redfish property when available. 73 Verify OCC State 74 75 76*** Keywords *** 77 78Test 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 89