George Keishing | 4d9b7e1 | 2019-03-26 02:03:47 -0500 | [diff] [blame] | 1 | *** Settings *** |
George Keishing | 6a69d26 | 2019-04-03 03:45:27 -0500 | [diff] [blame] | 2 | Documentation Test BMC using https://github.com/DMTF/Redfish-Usecase-Checkers |
| 3 | ... DMTF tool. |
George Keishing | 4d9b7e1 | 2019-03-26 02:03:47 -0500 | [diff] [blame] | 4 | |
George Keishing | 6a69d26 | 2019-04-03 03:45:27 -0500 | [diff] [blame] | 5 | Library OperatingSystem |
| 6 | Library ../../lib/state.py |
| 7 | Resource ../../lib/dmtf_tools_utils.robot |
| 8 | Resource ../../lib/openbmc_ffdc.robot |
George Keishing | 4d9b7e1 | 2019-03-26 02:03:47 -0500 | [diff] [blame] | 9 | |
George Keishing | 6a69d26 | 2019-04-03 03:45:27 -0500 | [diff] [blame] | 10 | Test Setup Test Setup Execution |
| 11 | Test Teardown Test Teardown Execution |
George Keishing | 4d9b7e1 | 2019-03-26 02:03:47 -0500 | [diff] [blame] | 12 | |
| 13 | *** Variables *** |
| 14 | |
George Keishing | 6a69d26 | 2019-04-03 03:45:27 -0500 | [diff] [blame] | 15 | ${DEFAULT_PYTHON} python3 |
George Keishing | 4d9b7e1 | 2019-03-26 02:03:47 -0500 | [diff] [blame] | 16 | |
George Keishing | 6a69d26 | 2019-04-03 03:45:27 -0500 | [diff] [blame] | 17 | ${rsv_github_url} https://github.com/DMTF/Redfish-Usecase-Checkers.git |
| 18 | ${rsv_dir_path} Redfish-Usecase-Checkers |
George Keishing | 4d9b7e1 | 2019-03-26 02:03:47 -0500 | [diff] [blame] | 19 | |
George Keishing | 6a69d26 | 2019-04-03 03:45:27 -0500 | [diff] [blame] | 20 | ${command_account} ${DEFAULT_PYTHON} ${rsv_dir_path}${/}account_management/account_management.py |
| 21 | ... -r ${OPENBMC_HOST} -u ${OPENBMC_USERNAME} |
| 22 | ... -p ${OPENBMC_PASSWORD} -S Always -d ${EXECDIR}${/}logs${/} -v |
| 23 | |
| 24 | ${command_power_control} ${DEFAULT_PYTHON} ${rsv_dir_path}${/}power_control/power_control.py |
| 25 | ... -r ${OPENBMC_HOST} -u ${OPENBMC_USERNAME} |
| 26 | ... -p ${OPENBMC_PASSWORD} -S Always --F |
| 27 | |
| 28 | ${power_on_timeout} 15 mins |
| 29 | ${power_off_timeout} 15 mins |
| 30 | ${state_change_timeout} 3 mins |
George Keishing | 4d9b7e1 | 2019-03-26 02:03:47 -0500 | [diff] [blame] | 31 | |
| 32 | *** Test Case *** |
| 33 | |
| 34 | Test BMC Redfish Account Management |
| 35 | [Documentation] Check Account Management with a Redfish interface. |
| 36 | [Tags] Test_BMC_Redfish_Account_Management |
| 37 | |
| 38 | ${output}= Run DMTF Tool ${rsv_dir_path} ${command_account} |
| 39 | |
| 40 | ${output}= Shell Cmd cat ${EXECDIR}${/}logs${/}results.json |
| 41 | Log ${output} |
| 42 | |
George Keishing | 6a69d26 | 2019-04-03 03:45:27 -0500 | [diff] [blame] | 43 | |
| 44 | Test BMC Redfish Boot Host And ForceOff |
| 45 | [Documentation] Boot host and ForceOff. |
| 46 | [Tags] Test_BMC_Redfish_Boot_Host_And_ForceOff |
| 47 | |
| 48 | DMTF Power On |
| 49 | DMTF Hard Power Off |
| 50 | |
| 51 | |
| 52 | Test BMC Redfish Boot Host And GracefulShutdown |
| 53 | [Documentation] Boot host and issue GracefulShutdown. |
| 54 | [Tags] Test_BMC_Redfish_Boot_Host_And_GracefulShutdown |
| 55 | |
| 56 | DMTF Power On |
| 57 | DMTF Power Off |
| 58 | |
| 59 | |
George Keishing | 4d9b7e1 | 2019-03-26 02:03:47 -0500 | [diff] [blame] | 60 | *** Keywords *** |
| 61 | |
| 62 | Test Setup Execution |
| 63 | [Documentation] Do test case setup tasks. |
| 64 | |
George Keishing | 6a69d26 | 2019-04-03 03:45:27 -0500 | [diff] [blame] | 65 | Printn |
George Keishing | 4d9b7e1 | 2019-03-26 02:03:47 -0500 | [diff] [blame] | 66 | Download DMTF Tool ${rsv_dir_path} ${rsv_github_url} |
| 67 | |
George Keishing | 6a69d26 | 2019-04-03 03:45:27 -0500 | [diff] [blame] | 68 | ${status} ${state}= Run Keyword And Ignore Error |
| 69 | ... Check State standby_match_state |
| 70 | Return From Keyword If '${status}' == 'PASS' |
| 71 | DMTF Power Off |
| 72 | |
| 73 | |
George Keishing | 4d9b7e1 | 2019-03-26 02:03:47 -0500 | [diff] [blame] | 74 | Test Teardown Execution |
| 75 | [Documentation] Do the post-test teardown. |
| 76 | |
George Keishing | 6a69d26 | 2019-04-03 03:45:27 -0500 | [diff] [blame] | 77 | Printn |
George Keishing | 4d9b7e1 | 2019-03-26 02:03:47 -0500 | [diff] [blame] | 78 | FFDC On Test Case Fail |
George Keishing | 6a69d26 | 2019-04-03 03:45:27 -0500 | [diff] [blame] | 79 | |
| 80 | |
| 81 | DMTF Power On |
| 82 | [Documentation] Power the BMC machine on via DMTF tools. |
| 83 | |
| 84 | Print Timen Doing "DMTF Power On". |
| 85 | |
| 86 | ${state}= Get State |
| 87 | ${match_state}= Anchor State ${state} |
| 88 | Run DMTF Tool ${rsv_dir_path} ${command_power_control} On |
| 89 | ${state}= Wait State ${match_state} wait_time=${state_change_timeout} interval=10 seconds invert=1 |
| 90 | ${state}= Wait State os_running_match_state wait_time=${power_on_timeout} interval=10 seconds |
| 91 | |
| 92 | [Return] ${state} |
| 93 | |
| 94 | |
| 95 | DMTF Power Off |
| 96 | [Documentation] Power the BMC machine off via DMTF tools. |
| 97 | |
| 98 | Print Timen Doing "DMTF Hard Power Off". |
| 99 | |
| 100 | ${state}= Get State |
| 101 | ${match_state}= Anchor State ${state} |
| 102 | Run DMTF Tool ${rsv_dir_path} ${command_power_control} GracefulShutdown |
| 103 | ${state}= Wait State ${match_state} wait_time=${state_change_timeout} interval=10 seconds invert=1 |
| 104 | ${state}= Wait State standby_match_state wait_time=${power_off_timeout} interval=10 seconds |
| 105 | |
| 106 | [Return] ${state} |
| 107 | |
| 108 | |
| 109 | DMTF Hard Power Off |
| 110 | [Documentation] Power the BMC machine off via DMTF tools. |
| 111 | |
| 112 | Print Timen Doing "DMTF Hard Power Off". |
| 113 | |
| 114 | ${state}= Get State |
| 115 | ${match_state}= Anchor State ${state} |
| 116 | Run DMTF Tool ${rsv_dir_path} ${command_power_control} ForceOff |
| 117 | ${state}= Wait State ${match_state} wait_time=${state_change_timeout} interval=10 seconds invert=1 |
| 118 | ${state}= Wait State standby_match_state wait_time=${power_off_timeout} interval=10 seconds |
| 119 | |
| 120 | [Return] ${state} |