George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Resource ../../lib/resource.txt |
| 3 | Resource ../../lib/bmc_redfish_resource.robot |
| 4 | Resource ../../lib/common_utils.robot |
George Keishing | 3298d5c | 2019-02-12 06:59:25 -0600 | [diff] [blame] | 5 | Resource ../../lib/openbmc_ffdc.robot |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 6 | |
George Keishing | 3298d5c | 2019-02-12 06:59:25 -0600 | [diff] [blame] | 7 | Test Teardown FFDC On Test Case Fail |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 8 | Suite Teardown redfish.Logout |
| 9 | |
| 10 | *** Test Cases *** |
| 11 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 12 | Verify Redfish BMC Firmware Version |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 13 | [Documentation] Get firmware version from BMC manager. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 14 | [Tags] Verify_Redfish_BMC_Firmware_Version |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 15 | |
| 16 | redfish.Login |
George Keishing | 3a813a9 | 2019-02-01 20:34:47 -0600 | [diff] [blame] | 17 | ${resp}= redfish.Get /redfish/v1/Managers/bmc |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 18 | Should Be Equal As Strings ${resp.status} ${HTTP_OK} |
| 19 | ${bmc_version}= Get BMC Version |
| 20 | Should Be Equal As Strings |
| 21 | ... ${resp.dict["FirmwareVersion"]} ${bmc_version.strip('"')} |
| 22 | redfish.Logout |
| 23 | |
| 24 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 25 | Verify Redfish BMC Manager Properties |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 26 | [Documentation] Verify BMC managers resource properties. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 27 | [Tags] Verify_Redfish_BMC_Manager_Properties |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 28 | |
| 29 | redfish.Login |
George Keishing | 3a813a9 | 2019-02-01 20:34:47 -0600 | [diff] [blame] | 30 | ${resp}= redfish.Get /redfish/v1/Managers/bmc |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 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 | redfish.Logout |
| 48 | |
| 49 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 50 | Test Redfish BMC Manager GracefulRestart |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 51 | [Documentation] BMC graceful restart. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 52 | [Tags] Test_Redfish_BMC_Manager_GracefulRestart |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 53 | |
| 54 | # Example: |
| 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.Login |
| 64 | ${payload}= Create Dictionary ResetType=GracefulRestart |
| 65 | ${resp}= redfish.Post Managers/bmc/Actions/Manager.Reset body=&{payload} |
| 66 | Should Be Equal As Strings ${resp.status} ${HTTP_OK} |
| 67 | |
| 68 | # TODO: Add logic to ping and check BMC online state |
| 69 | |
| 70 | |
| 71 | |