| 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 |  | 
| Matt Fischer | 6fb70d9 | 2023-10-24 19:06:33 -0600 | [diff] [blame] | 14 | Test Tags    Firmware_Property | 
| George Keishing | 504a371 | 2022-07-22 09:41:28 -0500 | [diff] [blame] | 15 |  | 
| George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 16 | *** Test Cases *** | 
 | 17 |  | 
 | 18 | Verify Firmware Update ApplyTime Immediate | 
 | 19 |     [Documentation]  Verify supported apply time "Immediate" property. | 
 | 20 |     [Tags]  Verify_Firmware_Update_ApplyTime_Immediate | 
 | 21 |  | 
 | 22 |     # Example: | 
| George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 23 |     # /redfish/v1/UpdateService | 
 | 24 |     # "HttpPushUriOptions": { | 
 | 25 |     #    "HttpPushUriApplyTime": { | 
 | 26 |     #        "ApplyTime": "Immediate" | 
 | 27 |     #    } | 
| George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 28 |     # } | 
 | 29 |  | 
| George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 30 |     Redfish.Patch  ${REDFISH_BASE_URI}UpdateService | 
 | 31 |     ...  body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'Immediate'}}} | 
| George Keishing | 8cda5c3 | 2025-04-09 19:43:12 +0530 | [diff] [blame] | 32 |     ...  valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}] | 
| George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 33 |  | 
| George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 34 |     ${http_push_uri_options}=  Redfish.Get Attribute  ${REDFISH_BASE_URI}UpdateService  HttpPushUriOptions | 
 | 35 |     Rprint Vars  http_push_uri_options | 
 | 36 |     Valid Value  http_push_uri_options["HttpPushUriApplyTime"]["ApplyTime"]  ['Immediate'] | 
| George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 37 |  | 
 | 38 |  | 
 | 39 | Verify Firmware Update ApplyTime OnReset | 
 | 40 |     [Documentation]  Verify supported apply time "OnReset" property. | 
 | 41 |     [Tags]  Verify_Firmware_Update_ApplyTime_OnReset | 
 | 42 |  | 
 | 43 |     # Example: | 
| George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 44 |     # /redfish/v1/UpdateService | 
 | 45 |     # "HttpPushUriOptions": { | 
 | 46 |     #    "HttpPushUriApplyTime": { | 
 | 47 |     #        "ApplyTime": "OnReset" | 
 | 48 |     #    } | 
| George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 49 |     # } | 
 | 50 |  | 
| George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 51 |     Redfish.Patch  ${REDFISH_BASE_URI}UpdateService | 
 | 52 |     ...  body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'OnReset'}}} | 
| George Keishing | 8cda5c3 | 2025-04-09 19:43:12 +0530 | [diff] [blame] | 53 |     ...  valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}] | 
| George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 54 |  | 
| George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 55 |     ${http_push_uri_options}=  Redfish.Get Attribute  ${REDFISH_BASE_URI}UpdateService  HttpPushUriOptions | 
 | 56 |     Rprint Vars  http_push_uri_options | 
 | 57 |     Valid Value  http_push_uri_options["HttpPushUriApplyTime"]["ApplyTime"]  ['OnReset'] | 
| George Keishing | 5367079 | 2019-07-04 23:46:43 -0500 | [diff] [blame] | 58 |  | 
 | 59 |  | 
 | 60 | Verify Firmware Update ApplyTime Invalid | 
 | 61 |     [Documentation]  Verify supported apply time returns error on invalid value. | 
 | 62 |     [Tags]  Verify_Firmware_Update_ApplyTime_Invalid | 
 | 63 |  | 
| George Keishing | 99ffe43 | 2019-09-26 02:33:36 -0500 | [diff] [blame] | 64 |     Redfish.Patch  ${REDFISH_BASE_URI}UpdateService | 
 | 65 |     ...  body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'Invalid'}}} | 
 | 66 |     ...  valid_status_codes=[${HTTP_BAD_REQUEST}] |