George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Verify that firmware update properties. |
| 3 | |
| 4 | Resource ../../lib/resource.robot |
| 5 | Resource ../../lib/bmc_redfish_resource.robot |
| 6 | Resource ../../lib/openbmc_ffdc.robot |
| 7 | |
| 8 | Suite Setup Redfish.Login |
| 9 | Suite Teardown Redfish.Logout |
| 10 | Test Setup Printn |
| 11 | Test Teardown FFDC On Test Case Fail |
| 12 | |
| 13 | *** Test Cases *** |
| 14 | |
| 15 | Verify Firmware Update ApplyTime Immediate |
| 16 | [Documentation] Verify supported apply time "Immediate" property. |
| 17 | [Tags] Verify_Firmware_Update_ApplyTime_Immediate |
| 18 | |
| 19 | # Example: |
| 20 | # /xyz/openbmc_project/software/apply_time |
| 21 | # { |
| 22 | # "data": { |
| 23 | # "RequestedApplyTime": "xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.Immediate" |
| 24 | # }, |
| 25 | # "message": "200 OK", |
| 26 | # "status": "ok" |
| 27 | # } |
| 28 | |
| 29 | Redfish.Patch ${REDFISH_BASE_URI}UpdateService body={'ApplyTime' : 'Immediate'} |
| 30 | |
| 31 | # TODO: Move to redfish when avialable. |
| 32 | ${apply_time}= Read Attribute ${SOFTWARE_VERSION_URI}apply_time RequestedApplyTime |
Michael Walsh | 39c0051 | 2019-07-17 10:54:06 -0500 | [diff] [blame] | 33 | Rprint Vars apply_time |
George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 34 | Should Be Equal ${apply_time} xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.Immediate |
| 35 | |
| 36 | |
| 37 | Verify Firmware Update ApplyTime OnReset |
| 38 | [Documentation] Verify supported apply time "OnReset" property. |
| 39 | [Tags] Verify_Firmware_Update_ApplyTime_OnReset |
| 40 | |
| 41 | # Example: |
| 42 | # /xyz/openbmc_project/software/apply_time |
| 43 | # { |
| 44 | # "data": { |
| 45 | # "RequestedApplyTime": "xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.OnReset" |
| 46 | # }, |
| 47 | # "message": "200 OK", |
| 48 | # "status": "ok" |
| 49 | # } |
| 50 | |
| 51 | Redfish.Patch ${REDFISH_BASE_URI}UpdateService body={'ApplyTime' : 'OnReset'} |
| 52 | |
| 53 | # TODO: Move to redfish when avialable. |
| 54 | ${apply_time}= Read Attribute ${SOFTWARE_VERSION_URI}apply_time RequestedApplyTime |
Michael Walsh | 39c0051 | 2019-07-17 10:54:06 -0500 | [diff] [blame] | 55 | Rprint Vars apply_time |
George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 56 | Should Be Equal ${apply_time} xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.OnReset |
| 57 | |
| 58 | |
| 59 | Verify Firmware Update ApplyTime Invalid |
| 60 | [Documentation] Verify supported apply time returns error on invalid value. |
| 61 | [Tags] Verify_Firmware_Update_ApplyTime_Invalid |
| 62 | |
| 63 | Redfish.Patch ${REDFISH_BASE_URI}UpdateService body={'ApplyTime' : 'Invalid'} valid_status_codes=[${HTTP_BAD_REQUEST}] |