George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 1 | *** Settings *** |
Joy Onyerikwu | dbfe97d | 2019-03-11 19:44:56 -0500 | [diff] [blame] | 2 | Documentation Test BMC Manager functionality. |
George Keishing | 2db7bca | 2019-02-14 13:03:08 -0600 | [diff] [blame] | 3 | Resource ../../lib/resource.robot |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 4 | Resource ../../lib/bmc_redfish_resource.robot |
| 5 | Resource ../../lib/common_utils.robot |
George Keishing | 3298d5c | 2019-02-12 06:59:25 -0600 | [diff] [blame] | 6 | Resource ../../lib/openbmc_ffdc.robot |
George Keishing | ba0441c | 2019-03-09 22:22:57 -0600 | [diff] [blame] | 7 | Resource ../../lib/boot_utils.robot |
George Keishing | 44f890b | 2019-04-22 13:32:15 -0500 | [diff] [blame] | 8 | Resource ../../lib/open_power_utils.robot |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 9 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 10 | Test Setup Test Setup Execution |
George Keishing | 49f4633 | 2019-03-26 08:13:05 -0500 | [diff] [blame] | 11 | Test Teardown Test Teardown Execution |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 12 | |
George Keishing | 912094b | 2019-06-07 09:49:03 -0500 | [diff] [blame] | 13 | |
| 14 | *** Variables *** |
| 15 | |
| 16 | ${SYSTEM_SHUTDOWN_TIME} ${5} |
| 17 | |
| 18 | # Strings to check from journald. |
| 19 | ${REBOOT_REGEX} ^\-- Reboot -- |
| 20 | |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 21 | *** Test Cases *** |
| 22 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 23 | Verify Redfish BMC Firmware Version |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 24 | [Documentation] Get firmware version from BMC manager. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 25 | [Tags] Verify_Redfish_BMC_Firmware_Version |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 26 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 27 | Redfish.Login |
| 28 | ${resp}= Redfish.Get /redfish/v1/Managers/bmc |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 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('"')} |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 33 | |
| 34 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 35 | Verify Redfish BMC Manager Properties |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 36 | [Documentation] Verify BMC managers resource properties. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 37 | [Tags] Verify_Redfish_BMC_Manager_Properties |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 38 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 39 | Redfish.Login |
| 40 | ${resp}= Redfish.Get /redfish/v1/Managers/bmc |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 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 |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 57 | |
| 58 | |
George Keishing | ba0441c | 2019-03-09 22:22:57 -0600 | [diff] [blame] | 59 | Redfish 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 |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 62 | |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 63 | # "Actions": { |
| 64 | # "#Manager.Reset": { |
| 65 | # "ResetType@Redfish.AllowableValues": [ |
| 66 | # "GracefulRestart" |
| 67 | # ], |
| 68 | # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset" |
| 69 | # } |
| 70 | |
George Keishing | 912094b | 2019-06-07 09:49:03 -0500 | [diff] [blame] | 71 | ${test_file_path}= Set Variable /tmp/before_bmcreboot |
| 72 | BMC Execute Command touch ${test_file_path} |
| 73 | |
George Keishing | ba0441c | 2019-03-09 22:22:57 -0600 | [diff] [blame] | 74 | Redfish OBMC Reboot (off) |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 75 | |
George Keishing | 912094b | 2019-06-07 09:49:03 -0500 | [diff] [blame] | 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 | |
George Keishing | ba0441c | 2019-03-09 22:22:57 -0600 | [diff] [blame] | 82 | |
George Keishing | e210d59 | 2019-06-11 11:18:35 -0500 | [diff] [blame] | 83 | Verify Boot Count After BMC Reboot |
| 84 | [Documentation] Verify boot count increments on BMC reboot. |
| 85 | [Tags] Verify_Boot_Count_After_BMC_Reboot |
| 86 | |
| 87 | Set BMC Boot Count ${0} |
| 88 | Redfish OBMC Reboot (off) |
| 89 | ${boot_count}= Get BMC Boot Count |
| 90 | Should Be Equal ${boot_count} ${1} msg=Boot count is not incremented. |
| 91 | |
| 92 | |
George Keishing | ba0441c | 2019-03-09 22:22:57 -0600 | [diff] [blame] | 93 | Redfish BMC Manager GracefulRestart When Host Booted |
| 94 | [Documentation] BMC graceful restart when host is running. |
| 95 | [Tags] Redfish_BMC_Manager_GracefulRestart_When_Host_Booted |
| 96 | |
| 97 | Redfish OBMC Reboot (run) |
| 98 | |
George Keishing | 44f890b | 2019-04-22 13:32:15 -0500 | [diff] [blame] | 99 | # TODO: Replace OCC state check with redfish property when available. |
| 100 | Verify OCC State |
| 101 | |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 102 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 103 | *** Keywords *** |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 104 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 105 | Test Setup Execution |
| 106 | [Documentation] Do test case setup tasks. |
| 107 | |
| 108 | redfish.Login |
| 109 | |
| 110 | |
| 111 | Test Teardown Execution |
| 112 | [Documentation] Do the post test teardown. |
| 113 | |
| 114 | FFDC On Test Case Fail |
| 115 | redfish.Logout |