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 8 9Test Setup Test Setup Execution 10Test Teardown Redfish.Logout 11 12*** Test Cases *** 13 14Verify Redfish BMC Firmware Version 15 [Documentation] Get firmware version from BMC manager. 16 [Tags] Verify_Redfish_BMC_Firmware_Version 17 18 Redfish.Login 19 ${resp}= Redfish.Get /redfish/v1/Managers/bmc 20 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('"')} 24 25 26Verify Redfish BMC Manager Properties 27 [Documentation] Verify BMC managers resource properties. 28 [Tags] Verify_Redfish_BMC_Manager_Properties 29 30 Redfish.Login 31 ${resp}= Redfish.Get /redfish/v1/Managers/bmc 32 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 48 49 50Redfish 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 53 54 # "Actions": { 55 # "#Manager.Reset": { 56 # "ResetType@Redfish.AllowableValues": [ 57 # "GracefulRestart" 58 # ], 59 # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset" 60 # } 61 62 Redfish OBMC Reboot (off) 63 64 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 71 72*** Keywords *** 73 74Test 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 85