blob: 6c32451ac2ea02ec598b630b46dc6a9036e4000a [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
George Keishing504a3712022-07-22 09:41:28 -050014Force Tags Firmware_Property
15
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 Keishing53670792019-07-04 23:46:43 -050032
George Keishing99ffe432019-09-26 02:33:36 -050033 ${http_push_uri_options}= Redfish.Get Attribute ${REDFISH_BASE_URI}UpdateService HttpPushUriOptions
34 Rprint Vars http_push_uri_options
35 Valid Value http_push_uri_options["HttpPushUriApplyTime"]["ApplyTime"] ['Immediate']
George Keishing53670792019-07-04 23:46:43 -050036
37
38Verify Firmware Update ApplyTime OnReset
39 [Documentation] Verify supported apply time "OnReset" property.
40 [Tags] Verify_Firmware_Update_ApplyTime_OnReset
41
42 # Example:
George Keishing99ffe432019-09-26 02:33:36 -050043 # /redfish/v1/UpdateService
44 # "HttpPushUriOptions": {
45 # "HttpPushUriApplyTime": {
46 # "ApplyTime": "OnReset"
47 # }
George Keishing53670792019-07-04 23:46:43 -050048 # }
49
George Keishing99ffe432019-09-26 02:33:36 -050050 Redfish.Patch ${REDFISH_BASE_URI}UpdateService
51 ... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'OnReset'}}}
George Keishing53670792019-07-04 23:46:43 -050052
George Keishing99ffe432019-09-26 02:33:36 -050053 ${http_push_uri_options}= Redfish.Get Attribute ${REDFISH_BASE_URI}UpdateService HttpPushUriOptions
54 Rprint Vars http_push_uri_options
55 Valid Value http_push_uri_options["HttpPushUriApplyTime"]["ApplyTime"] ['OnReset']
George Keishing53670792019-07-04 23:46:43 -050056
57
58Verify Firmware Update ApplyTime Invalid
59 [Documentation] Verify supported apply time returns error on invalid value.
60 [Tags] Verify_Firmware_Update_ApplyTime_Invalid
61
George Keishing99ffe432019-09-26 02:33:36 -050062 Redfish.Patch ${REDFISH_BASE_URI}UpdateService
63 ... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : 'Invalid'}}}
64 ... valid_status_codes=[${HTTP_BAD_REQUEST}]