blob: f10a822ed93a60914d777e54972bc7a844e50b3e [file] [log] [blame]
George Keishing53670792019-07-04 23:46:43 -05001*** Settings ***
2Documentation Verify that firmware update properties.
3
4Resource ../../lib/resource.robot
5Resource ../../lib/bmc_redfish_resource.robot
6Resource ../../lib/openbmc_ffdc.robot
George Keishing99ffe432019-09-26 02:33:36 -05007Library ../../lib/gen_robot_valid.py
George Keishing53670792019-07-04 23:46:43 -05008
9Suite Setup Redfish.Login
10Suite Teardown Redfish.Logout
11Test Setup Printn
12Test Teardown FFDC On Test Case Fail
13
Matt Fischer6fb70d92023-10-24 19:06:33 -060014Test Tags Firmware_Property
George Keishing504a3712022-07-22 09:41:28 -050015
George Keishing53670792019-07-04 23:46:43 -050016*** Test Cases ***
17
18Verify Firmware Update ApplyTime Immediate
19 [Documentation] Verify supported apply time "Immediate" property.
20 [Tags] Verify_Firmware_Update_ApplyTime_Immediate
21
22 # Example:
George Keishing99ffe432019-09-26 02:33:36 -050023 # /redfish/v1/UpdateService
24 # "HttpPushUriOptions": {
25 # "HttpPushUriApplyTime": {
26 # "ApplyTime": "Immediate"
27 # }
George Keishing53670792019-07-04 23:46:43 -050028 # }
29
George Keishing99ffe432019-09-26 02:33:36 -050030 Redfish.Patch ${REDFISH_BASE_URI}UpdateService
31 ... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'Immediate'}}}
George Keishing8cda5c32025-04-09 19:43:12 +053032 ... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
George Keishing53670792019-07-04 23:46:43 -050033
George Keishing99ffe432019-09-26 02:33:36 -050034 ${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 Keishing53670792019-07-04 23:46:43 -050037
38
39Verify Firmware Update ApplyTime OnReset
40 [Documentation] Verify supported apply time "OnReset" property.
41 [Tags] Verify_Firmware_Update_ApplyTime_OnReset
42
43 # Example:
George Keishing99ffe432019-09-26 02:33:36 -050044 # /redfish/v1/UpdateService
45 # "HttpPushUriOptions": {
46 # "HttpPushUriApplyTime": {
47 # "ApplyTime": "OnReset"
48 # }
George Keishing53670792019-07-04 23:46:43 -050049 # }
50
George Keishing99ffe432019-09-26 02:33:36 -050051 Redfish.Patch ${REDFISH_BASE_URI}UpdateService
52 ... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'OnReset'}}}
George Keishing8cda5c32025-04-09 19:43:12 +053053 ... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
George Keishing53670792019-07-04 23:46:43 -050054
George Keishing99ffe432019-09-26 02:33:36 -050055 ${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 Keishing53670792019-07-04 23:46:43 -050058
59
60Verify Firmware Update ApplyTime Invalid
61 [Documentation] Verify supported apply time returns error on invalid value.
62 [Tags] Verify_Firmware_Update_ApplyTime_Invalid
63
George Keishing99ffe432019-09-26 02:33:36 -050064 Redfish.Patch ${REDFISH_BASE_URI}UpdateService
65 ... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'Invalid'}}}
66 ... valid_status_codes=[${HTTP_BAD_REQUEST}]