xref: /openbmc/openbmc-test-automation/extended/test_bmc_stress_buster.robot (revision b2a2d948d555cb6e5169b9f21d489a3b089b4387)
1***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
13Test Tags      BMC_Stress_Buster
14
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
25Stress BMC REST Server
26    [Documentation]  Execute maximum allowed REST operation.
27    [Tags]  Stress_BMC_REST_Server
28
29    Log To Console  REST call request burst ${REST_BUSTER_MAX}
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
36Stress BMC SSH Server
37    [Documentation]  Execute maximum allowed SSH operation.
38    [Tags]  Stress_BMC_SSH_Server
39
40    Log To Console  SSH call request burst ${SSH_BUSTER_MAX}
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
47Stress BMC IPMI Server
48    [Documentation]  Execute maximum allowed IPMI operation.
49    [Tags]  Stress_BMC_IPMI_Server
50
51    Log To Console  IPMI call request burst ${IPMI_BUSTER_MAX}
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
58REST 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
64    @{credentials}=  Create List  ${rest_username}  ${rest_password}
65    ${data}=  Create Dictionary  data=@{credentials}
66    ${resp}=  POST On Session  openbmc  /login  json=${data}  headers=${headers}
67    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
68
69    # Trigger GET REST enumeration.
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}
72    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
73    Delete All Sessions
74
75
76SSH Connect And Execute Command
77    [Documentation]  Execute SSH command execution operation.
78    BMC Execute Command  df -h
79
80
81IPMI Check Status
82    [Documentation]  Execute IPMI command execution operation.
83    Run IPMI Standard Command  chassis status
84