blob: 1b19ffe2d47f0d9f18e0fd2d78f68dfc0d066129 [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
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
32Stress 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
41Stress 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
50REST 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
67SSH Connect And Execute Command
68 [Documentation] Execute SSH command execution operation.
Joy Onyerikwu2ef965a2018-05-24 15:23:27 -050069 BMC Execute Command df -h
George Keishing84d089f2017-07-17 09:33:01 -050070
71
72IPMI Check Status
73 [Documentation] Execute IPMI command execution operation.
74 Run IPMI Standard Command chassis status