Sushil Singh | 5ea86d0 | 2019-07-11 02:05:16 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Update the BMC code on a target BMC via Redifsh. |
| 3 | |
| 4 | Resource ../../lib/resource.robot |
| 5 | Resource ../../lib/bmc_redfish_resource.robot |
| 6 | Resource ../../lib/openbmc_ffdc.robot |
| 7 | Resource ../../lib/common_utils.robot |
| 8 | Resource ../../lib/code_update_utils.robot |
| 9 | Library ../../lib/gen_robot_valid.py |
| 10 | |
| 11 | Suite Setup Suite Setup Execution |
| 12 | Suite Teardown Redfish.Logout |
| 13 | Test Setup Printn |
| 14 | Test Teardown FFDC On Test Case Fail |
| 15 | |
| 16 | Force Tags BMC_Code_Update |
| 17 | |
| 18 | *** Variables *** |
| 19 | ${immediate} Immediate |
| 20 | ${onreset} OnReset |
| 21 | |
| 22 | *** Test Cases *** |
| 23 | |
| 24 | Redfish 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 | |
| 53 | Suite 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} |