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 |
George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 7 | Library ../../lib/gen_robot_valid.py |
George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 8 | |
| 9 | Suite Setup Redfish.Login |
| 10 | Suite Teardown Redfish.Logout |
| 11 | Test Setup Printn |
| 12 | Test Teardown FFDC On Test Case Fail |
| 13 | |
| 14 | *** Test Cases *** |
| 15 | |
| 16 | Verify Firmware Update ApplyTime Immediate |
| 17 | [Documentation] Verify supported apply time "Immediate" property. |
| 18 | [Tags] Verify_Firmware_Update_ApplyTime_Immediate |
| 19 | |
| 20 | # Example: |
George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 21 | # /redfish/v1/UpdateService |
| 22 | # "HttpPushUriOptions": { |
| 23 | # "HttpPushUriApplyTime": { |
| 24 | # "ApplyTime": "Immediate" |
| 25 | # } |
George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 26 | # } |
| 27 | |
George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 28 | Redfish.Patch ${REDFISH_BASE_URI}UpdateService |
| 29 | ... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'Immediate'}}} |
George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 30 | |
George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 31 | ${http_push_uri_options}= Redfish.Get Attribute ${REDFISH_BASE_URI}UpdateService HttpPushUriOptions |
| 32 | Rprint Vars http_push_uri_options |
| 33 | Valid Value http_push_uri_options["HttpPushUriApplyTime"]["ApplyTime"] ['Immediate'] |
George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 34 | |
| 35 | |
| 36 | Verify Firmware Update ApplyTime OnReset |
| 37 | [Documentation] Verify supported apply time "OnReset" property. |
| 38 | [Tags] Verify_Firmware_Update_ApplyTime_OnReset |
| 39 | |
| 40 | # Example: |
George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 41 | # /redfish/v1/UpdateService |
| 42 | # "HttpPushUriOptions": { |
| 43 | # "HttpPushUriApplyTime": { |
| 44 | # "ApplyTime": "OnReset" |
| 45 | # } |
George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 46 | # } |
| 47 | |
George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 48 | Redfish.Patch ${REDFISH_BASE_URI}UpdateService |
| 49 | ... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'OnReset'}}} |
George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 50 | |
George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 51 | ${http_push_uri_options}= Redfish.Get Attribute ${REDFISH_BASE_URI}UpdateService HttpPushUriOptions |
| 52 | Rprint Vars http_push_uri_options |
| 53 | Valid Value http_push_uri_options["HttpPushUriApplyTime"]["ApplyTime"] ['OnReset'] |
George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 54 | |
| 55 | |
| 56 | Verify Firmware Update ApplyTime Invalid |
| 57 | [Documentation] Verify supported apply time returns error on invalid value. |
| 58 | [Tags] Verify_Firmware_Update_ApplyTime_Invalid |
| 59 | |
George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 60 | Redfish.Patch ${REDFISH_BASE_URI}UpdateService |
| 61 | ... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'Invalid'}}} |
| 62 | ... valid_status_codes=[${HTTP_BAD_REQUEST}] |