George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 1 | *** Settings *** |
George Keishing | 2db7bca | 2019-02-14 13:03:08 -0600 | [diff] [blame] | 2 | Resource ../../lib/resource.robot |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 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 | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 7 | Test Setup Test Setup Execution |
| 8 | Test Teardown Redfish.Logout |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 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 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 16 | Redfish.Login |
| 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('"')} |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 22 | |
| 23 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 24 | Verify Redfish BMC Manager Properties |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 25 | [Documentation] Verify BMC managers resource properties. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 26 | [Tags] Verify_Redfish_BMC_Manager_Properties |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 27 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 28 | Redfish.Login |
| 29 | ${resp}= Redfish.Get /redfish/v1/Managers/bmc |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 30 | Should Be Equal As Strings ${resp.status} ${HTTP_OK} |
| 31 | # Example: |
| 32 | # "Description": "Baseboard Management Controller" |
| 33 | # "Id": "bmc" |
| 34 | # "Model": "OpenBmc", |
| 35 | # "Name": "OpenBmc Manager", |
| 36 | # "UUID": "xxxxxxxx-xxx-xxx-xxx-xxxxxxxxxxxx" |
| 37 | # "PowerState": "On" |
| 38 | |
| 39 | Should Be Equal As Strings |
| 40 | ... ${resp.dict["Description"]} Baseboard Management Controller |
| 41 | Should Be Equal As Strings ${resp.dict["Id"]} bmc |
| 42 | Should Be Equal As Strings ${resp.dict["Model"]} OpenBmc |
| 43 | Should Be Equal As Strings ${resp.dict["Name"]} OpenBmc Manager |
| 44 | Should Not Be Empty ${resp.dict["UUID"]} |
| 45 | Should Be Equal As Strings ${resp.dict["PowerState"]} On |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 46 | |
| 47 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 48 | Test Redfish BMC Manager GracefulRestart |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 49 | [Documentation] BMC graceful restart. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 50 | [Tags] Test_Redfish_BMC_Manager_GracefulRestart |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 51 | |
| 52 | # Example: |
| 53 | # "Actions": { |
| 54 | # "#Manager.Reset": { |
| 55 | # "ResetType@Redfish.AllowableValues": [ |
| 56 | # "GracefulRestart" |
| 57 | # ], |
| 58 | # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset" |
| 59 | # } |
| 60 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 61 | Redfish.Login |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 62 | ${payload}= Create Dictionary ResetType=GracefulRestart |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 63 | ${resp}= Redfish.Post Managers/bmc/Actions/Manager.Reset body=&{payload} |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 64 | Should Be Equal As Strings ${resp.status} ${HTTP_OK} |
| 65 | |
| 66 | # TODO: Add logic to ping and check BMC online state |
| 67 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 68 | *** Keywords *** |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 69 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 70 | Test Setup Execution |
| 71 | [Documentation] Do test case setup tasks. |
| 72 | |
| 73 | redfish.Login |
| 74 | |
| 75 | |
| 76 | Test Teardown Execution |
| 77 | [Documentation] Do the post test teardown. |
| 78 | |
| 79 | FFDC On Test Case Fail |
| 80 | redfish.Logout |
George Keishing | 22872e5 | 2019-01-30 22:44:04 -0600 | [diff] [blame] | 81 | |