blob: 08b5c442bee2222714ed74029adf97c3a4dc4ad9 [file] [log] [blame]
Sushil Singh32e2b582019-08-16 04:58:24 -05001*** Settings ***
2Documentation Update firmware on a target Host via Redifsh.
3
4# Test Parameters:
5# IMAGE_FILE_PATH The path to the Host image file.
6#
7# Firmware update states:
8# Enabled Image is installed and either functional or active.
9# Disabled Image installation failed or ready for activation.
10# Updating Image installation currently in progress.
11
12Resource ../../lib/resource.robot
13Resource ../../lib/bmc_redfish_resource.robot
14Resource ../../lib/boot_utils.robot
15Resource ../../lib/openbmc_ffdc.robot
16Resource ../../lib/common_utils.robot
17Resource ../../lib/code_update_utils.robot
18Resource ../../lib/dump_utils.robot
19Resource ../../lib/logging_utils.robot
20Resource ../../lib/redfish_code_update_utils.robot
21Library ../../lib/gen_robot_valid.py
22Library ../../lib/tftp_update_utils.py
23
24Suite Setup Suite Setup Execution
25Suite Teardown Redfish.Logout
26Test Setup Printn
27Test Teardown FFDC On Test Case Fail
28
29Force Tags Host_Code_Update
30
31*** Test Cases ***
32
33Redfish Code Update With ApplyTime OnReset
34 [Documentation] Update the firmaware image with ApplyTime of OnReset.
35 [Tags] Redfish_Code_Update_With_ApplyTime_OnReset
36 [Template] Redfish Update Firmware
37
38 # policy
39 OnReset
40
41
42Redfish Code Update With ApplyTime Immediate
43 [Documentation] Update the firmaware image with ApplyTime of Immediate.
44 [Tags] Redfish_Code_Update_With_ApplyTime_Immediate
45 [Template] Redfish Update Firmware
46
47 # policy
48 Immediate
49
Sushil Singh1620cfb2019-10-10 06:07:53 -050050
Sushil Singh32e2b582019-08-16 04:58:24 -050051*** Keywords ***
52
53Suite Setup Execution
54 [Documentation] Do the suite setup.
55
56 Valid File Path IMAGE_FILE_PATH
57 Redfish.Login
58 Delete All BMC Dump
59 Redfish Purge Event Log
Sushil Singh1620cfb2019-10-10 06:07:53 -050060 Redfish Power On stack_mode=skip
Sushil Singh32e2b582019-08-16 04:58:24 -050061
62
63Redfish Update Firmware
64 [Documentation] Update the BMC firmware via redfish interface.
65 [Arguments] ${apply_time}
66
67 # Description of argument(s):
68 # policy ApplyTime allowed values (e.g. "OnReset", "Immediate").
69
70 Redfish.Login
Sushil Singh6f86f172019-10-30 11:36:25 -050071 Set ApplyTime policy=${apply_Time}
72 Redfish Upload Image And Check Progress State
Sushil Singh1620cfb2019-10-10 06:07:53 -050073 Poweron Host And Verify Host Image ${apply_time}
Sushil Singh32e2b582019-08-16 04:58:24 -050074