blob: 8012a5377b83c611d5b58120ed79482664bb1311 [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
7
8Suite Setup Redfish.Login
9Suite Teardown Redfish.Logout
10Test Setup Printn
11Test Teardown FFDC On Test Case Fail
12
13*** Test Cases ***
14
15Verify Firmware Update ApplyTime Immediate
16 [Documentation] Verify supported apply time "Immediate" property.
17 [Tags] Verify_Firmware_Update_ApplyTime_Immediate
18
19 # Example:
20 # /xyz/openbmc_project/software/apply_time
21 # {
22 # "data": {
23 # "RequestedApplyTime": "xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.Immediate"
24 # },
25 # "message": "200 OK",
26 # "status": "ok"
27 # }
28
29 Redfish.Patch ${REDFISH_BASE_URI}UpdateService body={'ApplyTime' : 'Immediate'}
30
Gunnar Millsacc7c562019-08-20 13:12:46 -050031 # TODO: Move to redfish when available.
George Keishing53670792019-07-04 23:46:43 -050032 ${apply_time}= Read Attribute ${SOFTWARE_VERSION_URI}apply_time RequestedApplyTime
Michael Walsh39c00512019-07-17 10:54:06 -050033 Rprint Vars apply_time
George Keishing53670792019-07-04 23:46:43 -050034 Should Be Equal ${apply_time} xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.Immediate
35
36
37Verify Firmware Update ApplyTime OnReset
38 [Documentation] Verify supported apply time "OnReset" property.
39 [Tags] Verify_Firmware_Update_ApplyTime_OnReset
40
41 # Example:
42 # /xyz/openbmc_project/software/apply_time
43 # {
44 # "data": {
45 # "RequestedApplyTime": "xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.OnReset"
46 # },
47 # "message": "200 OK",
48 # "status": "ok"
49 # }
50
51 Redfish.Patch ${REDFISH_BASE_URI}UpdateService body={'ApplyTime' : 'OnReset'}
52
Gunnar Millsacc7c562019-08-20 13:12:46 -050053 # TODO: Move to redfish when available.
George Keishing53670792019-07-04 23:46:43 -050054 ${apply_time}= Read Attribute ${SOFTWARE_VERSION_URI}apply_time RequestedApplyTime
Michael Walsh39c00512019-07-17 10:54:06 -050055 Rprint Vars apply_time
George Keishing53670792019-07-04 23:46:43 -050056 Should Be Equal ${apply_time} xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.OnReset
57
58
59Verify Firmware Update ApplyTime Invalid
60 [Documentation] Verify supported apply time returns error on invalid value.
61 [Tags] Verify_Firmware_Update_ApplyTime_Invalid
62
63 Redfish.Patch ${REDFISH_BASE_URI}UpdateService body={'ApplyTime' : 'Invalid'} valid_status_codes=[${HTTP_BAD_REQUEST}]