blob: b2b6474da5c873aab54a22300ca7ab505ac52c20 [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
14*** Test Cases ***
15
16Verify Firmware Update ApplyTime Immediate
17 [Documentation] Verify supported apply time "Immediate" property.
18 [Tags] Verify_Firmware_Update_ApplyTime_Immediate
19
20 # Example:
George Keishing99ffe432019-09-26 02:33:36 -050021 # /redfish/v1/UpdateService
22 # "HttpPushUriOptions": {
23 # "HttpPushUriApplyTime": {
24 # "ApplyTime": "Immediate"
25 # }
George Keishing53670792019-07-04 23:46:43 -050026 # }
27
George Keishing99ffe432019-09-26 02:33:36 -050028 Redfish.Patch ${REDFISH_BASE_URI}UpdateService
29 ... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'Immediate'}}}
George Keishing53670792019-07-04 23:46:43 -050030
George Keishing99ffe432019-09-26 02:33:36 -050031 ${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 Keishing53670792019-07-04 23:46:43 -050034
35
36Verify Firmware Update ApplyTime OnReset
37 [Documentation] Verify supported apply time "OnReset" property.
38 [Tags] Verify_Firmware_Update_ApplyTime_OnReset
39
40 # Example:
George Keishing99ffe432019-09-26 02:33:36 -050041 # /redfish/v1/UpdateService
42 # "HttpPushUriOptions": {
43 # "HttpPushUriApplyTime": {
44 # "ApplyTime": "OnReset"
45 # }
George Keishing53670792019-07-04 23:46:43 -050046 # }
47
George Keishing99ffe432019-09-26 02:33:36 -050048 Redfish.Patch ${REDFISH_BASE_URI}UpdateService
49 ... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'OnReset'}}}
George Keishing53670792019-07-04 23:46:43 -050050
George Keishing99ffe432019-09-26 02:33:36 -050051 ${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 Keishing53670792019-07-04 23:46:43 -050054
55
56Verify Firmware Update ApplyTime Invalid
57 [Documentation] Verify supported apply time returns error on invalid value.
58 [Tags] Verify_Firmware_Update_ApplyTime_Invalid
59
George Keishing99ffe432019-09-26 02:33:36 -050060 Redfish.Patch ${REDFISH_BASE_URI}UpdateService
61 ... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'Invalid'}}}
62 ... valid_status_codes=[${HTTP_BAD_REQUEST}]