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 |
| 26 | ${dict}= Execute Process |
| 27 | ... ${REST_BUSTER_MAX} REST Enumerate Request On BMC |
| 28 | Dictionary Should Not Contain Value ${dict} False |
| 29 | ... msg=One or more REST operations has failed. |
| 30 | |
| 31 | |
| 32 | Stress BMC SSH Server |
| 33 | [Documentation] Execute maximum allowed SSH operation. |
| 34 | [Tags] Stress_BMC_SSH_Server |
| 35 | ${dict}= Execute Process |
| 36 | ... ${SSH_BUSTER_MAX} SSH Connect And Execute Command |
| 37 | Dictionary Should Not Contain Value ${dict} False |
| 38 | ... msg=One or more SSH operations has failed. |
| 39 | |
| 40 | |
| 41 | Stress BMC IPMI Server |
| 42 | [Documentation] Execute maximum allowed IPMI operation. |
| 43 | [Tags] Stress_BMC_IPMI_Server |
| 44 | ${dict}= Execute Process ${IPMI_BUSTER_MAX} IPMI Check Status |
| 45 | Dictionary Should Not Contain Value ${dict} False |
| 46 | ... msg=One or more IPMI operations has failed. |
| 47 | |
| 48 | ***Keywords*** |
| 49 | |
| 50 | REST Enumerate Request On BMC |
| 51 | [Documentation] Execute REST GET operation. |
| 52 | |
| 53 | # Create REST session. |
| 54 | Create Session openbmc ${AUTH_URI} |
| 55 | ${headers}= Create Dictionary Content-Type=application/json |
| 56 | @{credentials}= Create List ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD} |
| 57 | ${data}= Create Dictionary data=@{credentials} |
| 58 | ${resp}= Post Request openbmc /login data=${data} headers=${headers} |
| 59 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 60 | |
| 61 | # Trigger GET REST enumeration. |
| 62 | ${resp}= Get Request openbmc /xyz/openbmc_project/software/enumerate |
| 63 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 64 | Delete All Sessions |
| 65 | |
| 66 | |
| 67 | SSH Connect And Execute Command |
| 68 | [Documentation] Execute SSH command execution operation. |
Joy Onyerikwu | 2ef965a | 2018-05-24 15:23:27 -0500 | [diff] [blame] | 69 | BMC Execute Command df -h |
George Keishing | 84d089f | 2017-07-17 09:33:01 -0500 | [diff] [blame] | 70 | |
| 71 | |
| 72 | IPMI Check Status |
| 73 | [Documentation] Execute IPMI command execution operation. |
| 74 | Run IPMI Standard Command chassis status |