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