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