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 14*** Variables *** 15 16${SYSTEM_SHUTDOWN_TIME} ${5} 17 18# Strings to check from journald. 19${REBOOT_REGEX} ^\-- Reboot -- 20 21*** Test Cases *** 22 23Verify Redfish BMC Firmware Version 24 [Documentation] Get firmware version from BMC manager. 25 [Tags] Verify_Redfish_BMC_Firmware_Version 26 27 Redfish.Login 28 ${resp}= Redfish.Get /redfish/v1/Managers/bmc 29 Should Be Equal As Strings ${resp.status} ${HTTP_OK} 30 ${bmc_version}= Get BMC Version 31 Should Be Equal As Strings 32 ... ${resp.dict["FirmwareVersion"]} ${bmc_version.strip('"')} 33 34 35Verify Redfish BMC Manager Properties 36 [Documentation] Verify BMC managers resource properties. 37 [Tags] Verify_Redfish_BMC_Manager_Properties 38 39 Redfish.Login 40 ${resp}= Redfish.Get /redfish/v1/Managers/bmc 41 Should Be Equal As Strings ${resp.status} ${HTTP_OK} 42 # Example: 43 # "Description": "Baseboard Management Controller" 44 # "Id": "bmc" 45 # "Model": "OpenBmc", 46 # "Name": "OpenBmc Manager", 47 # "UUID": "xxxxxxxx-xxx-xxx-xxx-xxxxxxxxxxxx" 48 # "PowerState": "On" 49 50 Should Be Equal As Strings 51 ... ${resp.dict["Description"]} Baseboard Management Controller 52 Should Be Equal As Strings ${resp.dict["Id"]} bmc 53 Should Be Equal As Strings ${resp.dict["Model"]} OpenBmc 54 Should Be Equal As Strings ${resp.dict["Name"]} OpenBmc Manager 55 Should Not Be Empty ${resp.dict["UUID"]} 56 Should Be Equal As Strings ${resp.dict["PowerState"]} On 57 58 59Redfish BMC Manager GracefulRestart When Host Off 60 [Documentation] BMC graceful restart when host is powered off. 61 [Tags] Redfish_BMC_Manager_GracefulRestart_When_Host_Off 62 63 # "Actions": { 64 # "#Manager.Reset": { 65 # "ResetType@Redfish.AllowableValues": [ 66 # "GracefulRestart" 67 # ], 68 # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset" 69 # } 70 71 ${test_file_path}= Set Variable /tmp/before_bmcreboot 72 BMC Execute Command touch ${test_file_path} 73 74 Redfish OBMC Reboot (off) 75 76 BMC Execute Command if [ -f ${test_file_path} ] ; then false ; fi 77 Verify BMC RTC And UTC Time Drift 78 79 # Check for journald persistency post reboot. 80 Check For Regex In Journald ${REBOOT_REGEX} error_check=${1} 81 82 83Redfish BMC Manager GracefulRestart When Host Booted 84 [Documentation] BMC graceful restart when host is running. 85 [Tags] Redfish_BMC_Manager_GracefulRestart_When_Host_Booted 86 87 Redfish OBMC Reboot (run) 88 89 # TODO: Replace OCC state check with redfish property when available. 90 Verify OCC State 91 92 93*** Keywords *** 94 95Test Setup Execution 96 [Documentation] Do test case setup tasks. 97 98 redfish.Login 99 100 101Test Teardown Execution 102 [Documentation] Do the post test teardown. 103 104 FFDC On Test Case Fail 105 redfish.Logout 106