blob: 5925af66698278dbe86c5a56dc2249ec6304423b [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
9Library ../../lib/gen_robot_valid.py
10
11Suite Setup Suite Setup Execution
12Suite Teardown Redfish.Logout
13Test Setup Printn
14Test Teardown FFDC On Test Case Fail
15
16Force Tags BMC_Code_Update
17
18*** Variables ***
19${immediate} Immediate
20${onreset} OnReset
21
22*** Test Cases ***
23
24Redfish BMC Code Update
25 [Documentation] Do a BMC code update by uploading image on BMC via redfish.
26 [Tags] Redfish_BMC_Code_Update
27
28 Set ApplyTime policy=${onreset}
29
30 ${base_redfish_uri}= Set Variable ${REDFISH_BASE_URI}UpdateService
31
32 Redfish Upload Image ${base_redfish_uri} ${IMAGE_FILE_PATH}
33
34 ${image_id}= Get Latest Image ID
35 Rprint Vars image_id
36
37 Check Image Update Progress State match_state='Disabled', 'Updating' image_id=${image_id}
38
39 # Wait a few seconds to check if the update progress started.
40 Sleep 5s
41 Check Image Update Progress State match_state='Updating' image_id=${image_id}
42
43 Wait Until Keyword Succeeds 5 min 20 sec
44 ... Check Image Update Progress State match_state='Enabled' image_id=${image_id}
45
46 Redfish OBMC Reboot (off)
47 Redfish.Login
48 Redfish Verify BMC Version ${IMAGE_FILE_PATH}
49
50
51*** Keywords ***
52
53Suite Setup Execution
54 [Documentation] Do the suite setup.
55
56 Redfish.Login
57 # Checking for file existence.
58 OperatingSystem.File Should Exist ${IMAGE_FILE_PATH}