blob: aa6d999343f3bbbe1b43ca01fb1dd92fc632736a [file] [log] [blame]
Sushil Singh5ea86d02019-07-11 02:05:16 -05001*** Settings ***
2Documentation Update the BMC code on a target BMC via Redifsh.
3
4Resource ../../lib/resource.robot
5Resource ../../lib/bmc_redfish_resource.robot
6Resource ../../lib/openbmc_ffdc.robot
7Resource ../../lib/common_utils.robot
8Resource ../../lib/code_update_utils.robot
Sushil Singhacd6b4c2019-07-30 05:32:36 -05009Resource ../../lib/dump_utils.robot
10Resource ../../lib/logging_utils.robot
Sushil Singh5ea86d02019-07-11 02:05:16 -050011Library ../../lib/gen_robot_valid.py
12
13Suite Setup Suite Setup Execution
14Suite Teardown Redfish.Logout
15Test Setup Printn
16Test Teardown FFDC On Test Case Fail
17
18Force Tags BMC_Code_Update
19
20*** Variables ***
21${immediate} Immediate
22${onreset} OnReset
23
24*** Test Cases ***
25
26Redfish BMC Code Update
27 [Documentation] Do a BMC code update by uploading image on BMC via redfish.
28 [Tags] Redfish_BMC_Code_Update
29
30 Set ApplyTime policy=${onreset}
31
32 ${base_redfish_uri}= Set Variable ${REDFISH_BASE_URI}UpdateService
33
34 Redfish Upload Image ${base_redfish_uri} ${IMAGE_FILE_PATH}
35
36 ${image_id}= Get Latest Image ID
37 Rprint Vars image_id
38
39 Check Image Update Progress State match_state='Disabled', 'Updating' image_id=${image_id}
40
41 # Wait a few seconds to check if the update progress started.
42 Sleep 5s
43 Check Image Update Progress State match_state='Updating' image_id=${image_id}
44
45 Wait Until Keyword Succeeds 5 min 20 sec
46 ... Check Image Update Progress State match_state='Enabled' image_id=${image_id}
47
48 Redfish OBMC Reboot (off)
49 Redfish.Login
50 Redfish Verify BMC Version ${IMAGE_FILE_PATH}
51
52
53*** Keywords ***
54
55Suite Setup Execution
56 [Documentation] Do the suite setup.
57
58 Redfish.Login
Sushil Singhacd6b4c2019-07-30 05:32:36 -050059
60 # Delete BMC dump and Error logs
61 Delete All BMC Dump
62 Redfish Purge Event Log
63
Sushil Singh5ea86d02019-07-11 02:05:16 -050064 # Checking for file existence.
65 OperatingSystem.File Should Exist ${IMAGE_FILE_PATH}
Sushil Singhacd6b4c2019-07-30 05:32:36 -050066