blob: 977c8f988afc3cb9be10f276a667351eab336954 [file] [log] [blame]
George Keishing84d089f2017-07-17 09:33:01 -05001***Settings***
2Documentation Generic REST/SSH/IPMI stress buster program.
3
4Library ../lib/jobs_processing.py
5Resource ../lib/rest_client.robot
6Resource ../lib/connection_client.robot
7Resource ../lib/ipmi_client.robot
8Resource ../lib/utils.robot
9Resource ../lib/openbmc_ffdc.robot
10
11Test 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
23Stress BMC REST Server
24 [Documentation] Execute maximum allowed REST operation.
25 [Tags] Stress_BMC_REST_Server
George Keishingfbd67002022-08-01 11:24:03 -050026
27 Log To Console REST call request burst ${REST_BUSTER_MAX}
George Keishing84d089f2017-07-17 09:33:01 -050028 ${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
34Stress BMC SSH Server
35 [Documentation] Execute maximum allowed SSH operation.
36 [Tags] Stress_BMC_SSH_Server
George Keishingfbd67002022-08-01 11:24:03 -050037 Log To Console SSH call request burst ${SSH_BUSTER_MAX}
George Keishing84d089f2017-07-17 09:33:01 -050038 ${dict}= Execute Process
39 ... ${SSH_BUSTER_MAX} SSH Connect And Execute Command
40 Dictionary Should Not Contain Value ${dict} False
41 ... msg=One or more SSH operations has failed.
42
43
44Stress BMC IPMI Server
45 [Documentation] Execute maximum allowed IPMI operation.
46 [Tags] Stress_BMC_IPMI_Server
George Keishingfbd67002022-08-01 11:24:03 -050047 Log To Console IPMI call request burst ${IPMI_BUSTER_MAX}
George Keishing84d089f2017-07-17 09:33:01 -050048 ${dict}= Execute Process ${IPMI_BUSTER_MAX} IPMI Check Status
49 Dictionary Should Not Contain Value ${dict} False
50 ... msg=One or more IPMI operations has failed.
51
52***Keywords***
53
54REST Enumerate Request On BMC
55 [Documentation] Execute REST GET operation.
56
57 # Create REST session.
58 Create Session openbmc ${AUTH_URI}
59 ${headers}= Create Dictionary Content-Type=application/json
George Keishingfbd67002022-08-01 11:24:03 -050060 @{credentials}= Create List ${rest_username} ${rest_password}
George Keishing84d089f2017-07-17 09:33:01 -050061 ${data}= Create Dictionary data=@{credentials}
George Keishingfbd67002022-08-01 11:24:03 -050062 ${resp}= POST On Session openbmc /login json=${data} headers=${headers}
George Keishing84d089f2017-07-17 09:33:01 -050063 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
64
65 # Trigger GET REST enumeration.
George Keishingfbd67002022-08-01 11:24:03 -050066 ${resp}= GET On Session openbmc /redfish/v1/Managers/bmc expected_status=any
67 Log To Console GET Request /redfish/v1/Managers/bmc
George Keishing84d089f2017-07-17 09:33:01 -050068 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
69 Delete All Sessions
70
71
72SSH Connect And Execute Command
73 [Documentation] Execute SSH command execution operation.
Joy Onyerikwu2ef965a2018-05-24 15:23:27 -050074 BMC Execute Command df -h
George Keishing84d089f2017-07-17 09:33:01 -050075
76
77IPMI Check Status
78 [Documentation] Execute IPMI command execution operation.
79 Run IPMI Standard Command chassis status