| George Keishing | 84d089f | 2017-07-17 09:33:01 -0500 | [diff] [blame] | 1 | ***Settings*** |
| 2 | Documentation Generic REST/SSH/IPMI stress buster program. |
| 3 | |
| 4 | Library ../lib/jobs_processing.py |
| 5 | Resource ../lib/rest_client.robot |
| 6 | Resource ../lib/connection_client.robot |
| 7 | Resource ../lib/ipmi_client.robot |
| 8 | Resource ../lib/utils.robot |
| 9 | Resource ../lib/openbmc_ffdc.robot |
| 10 | |
| 11 | Test Teardown FFDC On Test Case Fail |
| 12 | |
| Igor Kanyuka | feb79d6 | 2025-10-20 21:24:03 +0100 | [diff] [blame] | 13 | Test Tags BMC_Stress_Buster |
| 14 | |
| George Keishing | 84d089f | 2017-07-17 09:33:01 -0500 | [diff] [blame] | 15 | ***Variables*** |
| 16 | |
| 17 | # Caller can specify a value for the following using -v parms |
| 18 | # Currently REST/SSH/IPMI session allowed. |
| 19 | ${REST_BUSTER_MAX} ${16} |
| 20 | ${SSH_BUSTER_MAX} ${16} |
| 21 | ${IPMI_BUSTER_MAX} ${5} |
| 22 | |
| 23 | ***Test Cases*** |
| 24 | |
| 25 | Stress BMC REST Server |
| 26 | [Documentation] Execute maximum allowed REST operation. |
| 27 | [Tags] Stress_BMC_REST_Server |
| George Keishing | fbd6700 | 2022-08-01 11:24:03 -0500 | [diff] [blame] | 28 | |
| 29 | Log To Console REST call request burst ${REST_BUSTER_MAX} |
| George Keishing | 84d089f | 2017-07-17 09:33:01 -0500 | [diff] [blame] | 30 | ${dict}= Execute Process |
| 31 | ... ${REST_BUSTER_MAX} REST Enumerate Request On BMC |
| 32 | Dictionary Should Not Contain Value ${dict} False |
| 33 | ... msg=One or more REST operations has failed. |
| 34 | |
| 35 | |
| 36 | Stress BMC SSH Server |
| 37 | [Documentation] Execute maximum allowed SSH operation. |
| 38 | [Tags] Stress_BMC_SSH_Server |
| Sridevi Ramesh | b0208f2 | 2025-02-17 04:38:17 -0600 | [diff] [blame] | 39 | |
| George Keishing | fbd6700 | 2022-08-01 11:24:03 -0500 | [diff] [blame] | 40 | Log To Console SSH call request burst ${SSH_BUSTER_MAX} |
| George Keishing | 84d089f | 2017-07-17 09:33:01 -0500 | [diff] [blame] | 41 | ${dict}= Execute Process |
| 42 | ... ${SSH_BUSTER_MAX} SSH Connect And Execute Command |
| 43 | Dictionary Should Not Contain Value ${dict} False |
| 44 | ... msg=One or more SSH operations has failed. |
| 45 | |
| 46 | |
| 47 | Stress BMC IPMI Server |
| 48 | [Documentation] Execute maximum allowed IPMI operation. |
| 49 | [Tags] Stress_BMC_IPMI_Server |
| Sridevi Ramesh | b0208f2 | 2025-02-17 04:38:17 -0600 | [diff] [blame] | 50 | |
| George Keishing | fbd6700 | 2022-08-01 11:24:03 -0500 | [diff] [blame] | 51 | Log To Console IPMI call request burst ${IPMI_BUSTER_MAX} |
| George Keishing | 84d089f | 2017-07-17 09:33:01 -0500 | [diff] [blame] | 52 | ${dict}= Execute Process ${IPMI_BUSTER_MAX} IPMI Check Status |
| 53 | Dictionary Should Not Contain Value ${dict} False |
| 54 | ... msg=One or more IPMI operations has failed. |
| 55 | |
| 56 | ***Keywords*** |
| 57 | |
| 58 | REST Enumerate Request On BMC |
| 59 | [Documentation] Execute REST GET operation. |
| 60 | |
| 61 | # Create REST session. |
| 62 | Create Session openbmc ${AUTH_URI} |
| 63 | ${headers}= Create Dictionary Content-Type=application/json |
| George Keishing | fbd6700 | 2022-08-01 11:24:03 -0500 | [diff] [blame] | 64 | @{credentials}= Create List ${rest_username} ${rest_password} |
| George Keishing | 84d089f | 2017-07-17 09:33:01 -0500 | [diff] [blame] | 65 | ${data}= Create Dictionary data=@{credentials} |
| George Keishing | fbd6700 | 2022-08-01 11:24:03 -0500 | [diff] [blame] | 66 | ${resp}= POST On Session openbmc /login json=${data} headers=${headers} |
| George Keishing | 84d089f | 2017-07-17 09:33:01 -0500 | [diff] [blame] | 67 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 68 | |
| 69 | # Trigger GET REST enumeration. |
| ganesanb | 4d43028 | 2023-04-27 14:33:23 +0000 | [diff] [blame] | 70 | ${resp}= GET On Session openbmc /redfish/v1/Managers/${MANAGER_ID} expected_status=any |
| 71 | Log To Console GET Request /redfish/v1/Managers/${MANAGER_ID} |
| George Keishing | 84d089f | 2017-07-17 09:33:01 -0500 | [diff] [blame] | 72 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 73 | Delete All Sessions |
| 74 | |
| 75 | |
| 76 | SSH Connect And Execute Command |
| 77 | [Documentation] Execute SSH command execution operation. |
| Joy Onyerikwu | 2ef965a | 2018-05-24 15:23:27 -0500 | [diff] [blame] | 78 | BMC Execute Command df -h |
| George Keishing | 84d089f | 2017-07-17 09:33:01 -0500 | [diff] [blame] | 79 | |
| 80 | |
| 81 | IPMI Check Status |
| 82 | [Documentation] Execute IPMI command execution operation. |
| 83 | Run IPMI Standard Command chassis status |