George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Trigger code update to a target BMC. |
| 3 | ... Execution Method : |
| 4 | ... python -m robot -v OPENBMC_HOST:<hostname> |
| 5 | ... -v FILE_PATH:<path/*all.tar> update_bmc.robot |
| 6 | ... |
| 7 | ... Code update method BMC using REST |
| 8 | ... Update work flow sequence: |
| 9 | ... - User input BMC File existence check |
| 10 | ... - Ping Test and REST authentication |
George Keishing | 8db0e1b | 2016-10-20 13:46:54 -0500 | [diff] [blame] | 11 | ... - Set Host Power host setting Policy to RESTORE_LAST_STATE |
| 12 | ... On reboot this policy would ensure the BMC comes |
| 13 | ... online and stays at HOST_POWERED_OFF state. |
George Keishing | dc5aa58e9 | 2016-09-27 01:35:11 -0500 | [diff] [blame] | 14 | ... - Issue poweroff |
| 15 | ... - Prepare for Update |
George Keishing | dc5aa58e9 | 2016-09-27 01:35:11 -0500 | [diff] [blame] | 16 | ... - Wait for BMC to come online clean |
George Keishing | 1b15020 | 2016-09-29 08:51:58 -0500 | [diff] [blame] | 17 | ... - Wait for BMC_READY state |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 18 | ... - Apply preserve BMC Network setting |
| 19 | ... - SCP image to BMC |
| 20 | ... - Activate the flash image |
| 21 | ... - Warm Reset BMC to activate code |
| 22 | ... - Wait for BMC to come online time out 30 minutes |
| 23 | ... - Version check post update |
| 24 | |
| 25 | Resource code_update_utils.robot |
George Keishing | 8db0e1b | 2016-10-20 13:46:54 -0500 | [diff] [blame] | 26 | Resource ../../lib/boot/boot_resource_master.robot |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 27 | |
| 28 | *** Variables *** |
| 29 | |
| 30 | ${FILE_PATH} ${EMPTY} |
| 31 | |
| 32 | *** Test cases *** |
| 33 | |
| 34 | Initiate Code update BMC |
| 35 | [Documentation] BMC code update process initiation |
| 36 | |
| 37 | Check If File Exist ${FILE_PATH} |
| 38 | System Readiness Test |
George Keishing | 50787fc | 2016-09-21 03:44:26 -0500 | [diff] [blame] | 39 | ${status}= Run Keyword and Return Status |
| 40 | ... Validate BMC Version before |
| 41 | |
| 42 | Run Keyword if '${status}' == '${False}' |
| 43 | ... Pass Execution Same Driver version installed |
| 44 | |
George Keishing | dc5aa58e9 | 2016-09-27 01:35:11 -0500 | [diff] [blame] | 45 | Initiate Power Off |
George Keishing | 8db0e1b | 2016-10-20 13:46:54 -0500 | [diff] [blame] | 46 | Set Policy Setting RESTORE_LAST_STATE |
George Keishing | dc5aa58e9 | 2016-09-27 01:35:11 -0500 | [diff] [blame] | 47 | Prepare For Update |
Rahul Maheshwari | d0fd883 | 2016-10-14 03:15:51 -0500 | [diff] [blame] | 48 | |
| 49 | # Wait time is increased temporary to 10 mins due |
| 50 | # to openbmc/openbmc#673 |
| 51 | Check If BMC is Up 10 min 10 sec |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 52 | |
George Keishing | 8db0e1b | 2016-10-20 13:46:54 -0500 | [diff] [blame] | 53 | @{states}= Create List BMC_READY HOST_POWERED_OFF |
George Keishing | 1b15020 | 2016-09-29 08:51:58 -0500 | [diff] [blame] | 54 | Wait Until Keyword Succeeds |
George Keishing | 8db0e1b | 2016-10-20 13:46:54 -0500 | [diff] [blame] | 55 | ... 10 min 10 sec Verify BMC State ${states} |
George Keishing | 1b15020 | 2016-09-29 08:51:58 -0500 | [diff] [blame] | 56 | |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 57 | Preserve BMC Network Setting |
| 58 | SCP Tar Image File to BMC ${FILE_PATH} |
| 59 | |
| 60 | Activate BMC flash image |
| 61 | |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 62 | # TODO: openbmc/openbmc#519 |
George Keishing | b370081 | 2016-08-31 03:03:30 -0500 | [diff] [blame] | 63 | Run Keyword And Ignore Error Trigger Warm Reset |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 64 | ${session_active}= Check If warmReset is Initiated |
| 65 | Run Keyword If '${session_active}' == '${True}' |
| 66 | ... Trigger Warm Reset via Reboot |
| 67 | |
George Keishing | c4d3dc0 | 2016-09-19 03:45:55 -0500 | [diff] [blame] | 68 | Check If BMC is Up 30 min 10 sec |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 69 | Sleep 1 min |
| 70 | Validate BMC Version |