Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | *** Settings *** |
George Keishing | 4d6c1da | 2016-07-15 05:51:22 -0500 | [diff] [blame] | 2 | Documentation This suite is used for testing eventlog association. |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 3 | |
George Keishing | 4d6c1da | 2016-07-15 05:51:22 -0500 | [diff] [blame] | 4 | Resource ../lib/rest_client.robot |
| 5 | Resource ../lib/utils.robot |
| 6 | Resource ../lib/connection_client.robot |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 7 | Resource ../lib/openbmc_ffdc.robot |
George Keishing | f88767a | 2016-11-17 01:58:05 -0600 | [diff] [blame] | 8 | Resource ../lib/boot/boot_resource_master.robot |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 9 | |
George Keishing | 4d6c1da | 2016-07-15 05:51:22 -0500 | [diff] [blame] | 10 | Library Collections |
| 11 | |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 12 | Suite Setup Suite Initialization Setup |
George Keishing | 4d6c1da | 2016-07-15 05:51:22 -0500 | [diff] [blame] | 13 | Suite Teardown Close All Connections |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 14 | |
Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 15 | Test Teardown FFDC On Test Case Fail |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 16 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 17 | *** Variables *** |
| 18 | |
| 19 | ${SYSTEM_SHUTDOWN_TIME} 1min |
| 20 | |
| 21 | ${WAIT_FOR_SERVICES_UP} 3min |
| 22 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 23 | ${EVENT_RECORD} ${RECORDS_URI}events/ |
| 24 | ${DIMM_PREFIX} ${INVENTORY_URI}system/chassis/motherboard/ |
| 25 | ${DIMM1_URI} ${DIMM_PREFIX}dimm1 |
| 26 | ${DIMM2_URI} ${DIMM_PREFIX}dimm2 |
| 27 | ${DIMM3_URI} ${DIMM_PREFIX}dimm3 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 28 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 29 | ${BUSCTL_PREFIX} busctl call ${OPENBMC_BASE_DBUS}.records.events |
| 30 | ... ${OPENBMC_BASE_URI}records/events |
| 31 | ... ${OPENBMC_BASE_DBUS}.recordlog |
| 32 | ... acceptHostMessage sssay "Error" |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 33 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 34 | ${CREATE_ERROR_SINGLE_FRU} ${BUSCTL_PREFIX} "Testing failure" |
| 35 | ... "${DIMM1_URI}" 1 1 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 36 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 37 | ${CREATE_ERROR_INVALID_FRU} ${BUSCTL_PREFIX} "Testing with invalid FRU" |
| 38 | ... "abc" 1 1 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 39 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 40 | ${CREATE_ERROR_NO_FRU} ${BUSCTL_PREFIX} "Testing with no fru" "" 1 1 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 41 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 42 | ${CREATE_ERROR_VIRTUAL_SENSOR} ${BUSCTL_PREFIX} |
| 43 | ... "Testing with a virtual sensor" |
| 44 | ... "${INVENTORY_URI}system/systemevent " 1 1 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 45 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 46 | &{NIL} data=@{EMPTY} |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 47 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 48 | *** Test Cases *** |
| 49 | |
| 50 | Create error log on single FRU |
| 51 | [Documentation] ***GOOD PATH*** |
| 52 | ... Create an error log on single FRU and verify |
| 53 | ... its association.\n |
George Keishing | 97651c7 | 2016-10-04 00:44:15 -0500 | [diff] [blame] | 54 | [Tags] Create_error_log_on_single_FRU |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 55 | |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 56 | Run Keyword And Continue On Failure Clear all logs |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 57 | |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 58 | ${elog} ${stderr}= |
| 59 | ... Execute Command ${CREATE_ERROR_SINGLE_FRU} |
| 60 | ... return_stderr=True |
| 61 | Should Be Empty ${stderr} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 62 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 63 | ${log_list}= Get EventList |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 64 | Should Contain '${log_list}' ${elog.strip('q ')} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 65 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 66 | ${association_uri}= |
| 67 | ... catenate SEPARATOR= ${EVENT_RECORD}${elog.strip('q ')} /fru |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 68 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 69 | ${association_content}= |
| 70 | ... Read Attribute ${association_uri} endpoints |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 71 | Should Contain ${association_content} ${DIMM1_URI} |
| 72 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 73 | ${dimm1_event}= Read Attribute ${DIMM1_URI}/event endpoints |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 74 | Should Contain ${dimm1_event} ${log_list[0]} |
| 75 | |
| 76 | |
Sridevi Ramesh | 32c93f4 | 2017-01-19 06:36:54 -0600 | [diff] [blame^] | 77 | Create Error Log On Two FRU |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 78 | [Documentation] ***GOOD PATH*** |
| 79 | ... Create an error log on two FRUs and verify |
| 80 | ... its association.\n |
Sridevi Ramesh | 32c93f4 | 2017-01-19 06:36:54 -0600 | [diff] [blame^] | 81 | [Tags] Create_Error_Log_On_Two_FRU |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 82 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 83 | ${log_uri}= Create a test log |
| 84 | ${association_uri}= catenate SEPARATOR= ${log_uri} /fru |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 85 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 86 | ${association_content}= Read Attribute ${association_uri} endpoints |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 87 | Should Contain ${association_content} ${DIMM3_URI} |
| 88 | Should Contain ${association_content} ${DIMM2_URI} |
| 89 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 90 | ${dimm3_event}= Read Attribute ${DIMM3_URI}/event endpoints |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 91 | Should Contain ${dimm3_event} ${log_uri} |
| 92 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 93 | ${dimm2_event}= Read Attribute ${DIMM2_URI}/event endpoints |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 94 | Should Contain ${dimm2_event} ${log_uri} |
| 95 | |
| 96 | |
Sridevi Ramesh | 32c93f4 | 2017-01-19 06:36:54 -0600 | [diff] [blame^] | 97 | Create Multiple Error Logs |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 98 | [Documentation] ***GOOD PATH*** |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 99 | ... Create multiple error logs and verify |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 100 | ... their association.\n |
Sridevi Ramesh | 32c93f4 | 2017-01-19 06:36:54 -0600 | [diff] [blame^] | 101 | [Tags] Create_Multiple_Error_Logs |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 102 | |
| 103 | : FOR ${INDEX} IN RANGE 1 4 |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 104 | \ Log ${INDEX} |
| 105 | \ ${log_uri}= Create a test log |
| 106 | \ ${association_uri}= catenate SEPARATOR= ${log_uri} /fru |
| 107 | \ ${association_content}= |
| 108 | ... Read Attribute ${association_uri} endpoints |
| 109 | \ Should Contain ${association_content} ${DIMM3_URI} |
| 110 | \ Should Contain ${association_content} ${DIMM2_URI} |
| 111 | \ ${dimm3_event}= Read Attribute ${DIMM3_URI}/event endpoints |
| 112 | \ Should Contain ${dimm3_event} ${log_uri} |
| 113 | \ ${dimm2_event}= Read Attribute ${DIMM2_URI}/event endpoints |
| 114 | \ Should Contain ${dimm2_event} ${log_uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 115 | |
| 116 | |
| 117 | Delete error log |
| 118 | [Documentation] ***BAD PATH*** |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 119 | ... Delete an error log and verify that its |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 120 | ... association is also removed.\n |
George Keishing | 97651c7 | 2016-10-04 00:44:15 -0500 | [diff] [blame] | 121 | [Tags] Delete_error_log |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 122 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 123 | ${log_uri1}= Create a test log |
| 124 | ${association_uri1}= catenate SEPARATOR= ${log_uri1} /fru |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 125 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 126 | ${log_uri2}= Create a test log |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 127 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 128 | ${del_uri}= catenate SEPARATOR= ${log_uri1} /action/delete |
| 129 | ${resp}= openbmc post request ${del_uri} data=${NIL} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 130 | should be equal as strings ${resp.status_code} ${HTTP_OK} |
| 131 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 132 | ${resp}= openbmc get request ${association_uri1} |
| 133 | ${jsondata}= to json ${resp.content} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 134 | Should Contain ${jsondata['message']} 404 Not Found |
| 135 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 136 | ${dimm3_event}= Read Attribute ${DIMM3_URI}/event endpoints |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 137 | Should Not Contain ${dimm3_event} ${log_uri1} |
| 138 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 139 | ${dimm2_event}= Read Attribute ${DIMM2_URI}/event endpoints |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 140 | Should Not Contain ${dimm2_event} ${log_uri1} |
| 141 | |
| 142 | |
Sridevi Ramesh | 32c93f4 | 2017-01-19 06:36:54 -0600 | [diff] [blame^] | 143 | Association With Invalid FRU |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 144 | [Documentation] ***BAD PATH*** |
George Keishing | 4d6c1da | 2016-07-15 05:51:22 -0500 | [diff] [blame] | 145 | ... Create an error log on invalid FRU and verify |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 146 | ... that its does not have any association.\n |
Sridevi Ramesh | 32c93f4 | 2017-01-19 06:36:54 -0600 | [diff] [blame^] | 147 | [Tags] Association_With_Invalid_FRU |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 148 | |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 149 | Run Keyword And Continue On Failure Clear all logs |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 150 | |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 151 | ${elog} ${stderr}= |
| 152 | ... Execute Command ${CREATE_ERROR_INVALID_FRU} |
| 153 | ... return_stderr=True |
| 154 | Should Be Empty ${stderr} |
| 155 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 156 | ${log_list}= Get EventList |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 157 | Should Contain '${log_list}' ${elog.strip('q ')} |
| 158 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 159 | ${association_uri}= |
| 160 | ... catenate SEPARATOR= ${EVENT_RECORD}${elog.strip('q ')} /fru |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 161 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 162 | ${resp}= openbmc get request ${association_uri} |
| 163 | ${jsondata}= to json ${resp.content} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 164 | Should Contain ${jsondata['message']} 404 Not Found |
| 165 | |
| 166 | |
Sridevi Ramesh | 32c93f4 | 2017-01-19 06:36:54 -0600 | [diff] [blame^] | 167 | Association With No FRU Error Event |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 168 | [Documentation] ***BAD PATH*** |
| 169 | ... Create an error log on no FRU and verify |
| 170 | ... that its does not have any association.\n |
Sridevi Ramesh | 32c93f4 | 2017-01-19 06:36:54 -0600 | [diff] [blame^] | 171 | [Tags] Association_With_No_FRU_Error_Event |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 172 | |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 173 | Run Keyword And Continue On Failure Clear all logs |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 174 | |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 175 | ${elog} ${stderr}= |
| 176 | ... Execute Command ${CREATE_ERROR_NO_FRU} |
| 177 | ... return_stderr=True |
| 178 | Should Be Empty ${stderr} |
| 179 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 180 | ${log_list}= Get EventList |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 181 | Should Contain '${log_list}' ${elog.strip('q ')} |
| 182 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 183 | ${association_uri}= |
| 184 | ... catenate SEPARATOR= ${EVENT_RECORD}${elog.strip('q ')} /fru |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 185 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 186 | ${resp}= openbmc get request ${association_uri} |
| 187 | ${jsondata}= to json ${resp.content} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 188 | Should Contain ${jsondata['message']} 404 Not Found |
| 189 | |
| 190 | |
| 191 | Association with virtual sensor |
| 192 | [Documentation] ***GOOD PATH*** |
| 193 | ... Create an error log on virtual sensor and |
| 194 | ... verify its association.\n |
Sridevi Ramesh | 32c93f4 | 2017-01-19 06:36:54 -0600 | [diff] [blame^] | 195 | [Tags] Association_With_Virtual_Sensor |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 196 | |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 197 | Run Keyword And Continue On Failure Clear all logs |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 198 | |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 199 | ${elog} ${stderr}= |
| 200 | ... Execute Command ${CREATE_ERROR_VIRTUAL_SENSOR} |
| 201 | ... return_stderr=True |
| 202 | Should Be Empty ${stderr} |
| 203 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 204 | ${log_list}= Get EventList |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 205 | Should Contain '${log_list}' ${elog.strip('q ')} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 206 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 207 | ${association_uri}= |
| 208 | ... catenate SEPARATOR= ${EVENT_RECORD}${elog.strip('q ')} /fru |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 209 | |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 210 | ${association_content}= |
| 211 | ... Read Attribute ${association_uri} endpoints |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 212 | Should Contain |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 213 | ... ${association_content} |
| 214 | ... ${OPENBMC_BASE_URI}inventory/system/systemevent |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 215 | |
Sridevi Ramesh | 32c93f4 | 2017-01-19 06:36:54 -0600 | [diff] [blame^] | 216 | Association Unchanged After Reboot |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 217 | [Documentation] ***GOOD PATH*** |
| 218 | ... This test case is to verify that error log association |
| 219 | ... does not change after open bmc reboot.\n |
George Keishing | 930dcc0 | 2016-10-13 06:31:21 -0500 | [diff] [blame] | 220 | [Tags] bmcreboot Association_Unchanged_After_Reboot |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 221 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 222 | ${pre_reboot_log_uri}= Create a test log |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 223 | ${association_uri}= |
George Keishing | 930dcc0 | 2016-10-13 06:31:21 -0500 | [diff] [blame] | 224 | ... catenate SEPARATOR= ${pre_reboot_log_uri} /fru |
| 225 | ${pre_reboot_association_content} = |
| 226 | ... Read Attribute ${association_uri} endpoints |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 227 | |
George Keishing | f88767a | 2016-11-17 01:58:05 -0600 | [diff] [blame] | 228 | Initiate Power Off |
| 229 | Check Power Off States |
| 230 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 231 | ${output}= Execute Command /sbin/reboot |
George Keishing | f4e4faf | 2016-09-26 00:40:06 -0500 | [diff] [blame] | 232 | Check If BMC is Up 5 min 10 sec |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 233 | |
George Keishing | 17982fb | 2016-11-08 04:59:37 -0600 | [diff] [blame] | 234 | @{states}= Create List BMC_READY HOST_POWERED_OFF |
| 235 | Wait Until Keyword Succeeds |
| 236 | ... 10 min 10 sec Verify BMC State ${states} |
| 237 | |
George Keishing | 930dcc0 | 2016-10-13 06:31:21 -0500 | [diff] [blame] | 238 | ${post_reboot_association_content} = |
| 239 | ... Read Attribute ${association_uri} endpoints |
| 240 | Should Be Equal |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 241 | ... ${post_reboot_association_content} |
| 242 | ... ${pre_reboot_association_content} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 243 | |
George Keishing | 930dcc0 | 2016-10-13 06:31:21 -0500 | [diff] [blame] | 244 | ${post_reboot_dimm3_event} = |
| 245 | ... Read Attribute ${DIMM3_URI}/event endpoints |
| 246 | Should Contain |
| 247 | ... ${post_reboot_dimm3_event} ${pre_reboot_log_uri} |
| 248 | ${post_reboot_dimm2_event} = |
| 249 | ... Read Attribute ${DIMM2_URI}/event endpoints |
| 250 | Should Contain |
| 251 | ... ${post_reboot_dimm2_event} ${pre_reboot_log_uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 252 | |
| 253 | *** Keywords *** |
| 254 | |
| 255 | Get EventList |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 256 | ${resp}= openbmc get request ${EVENT_RECORD} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 257 | should be equal as strings ${resp.status_code} ${HTTP_OK} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 258 | ${jsondata}= to json ${resp.content} |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 259 | [Return] ${jsondata['data']} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 260 | |
| 261 | Create a test log |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 262 | [Arguments] |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 263 | ${data}= create dictionary data=@{EMPTY} |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 264 | ${resp}= openbmc post request |
| 265 | ... ${EVENT_RECORD}action/acceptTestMessage data=${data} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 266 | should be equal as strings ${resp.status_code} ${HTTP_OK} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 267 | ${json}= to json ${resp.content} |
| 268 | ${LOGID}= convert to integer ${json['data']} |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 269 | ${uri}= catenate SEPARATOR= ${EVENT_RECORD} ${LOGID} |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 270 | [Return] ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 271 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 272 | Clear all logs |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 273 | ${resp}= openbmc post request |
| 274 | ... ${EVENT_RECORD}action/clear data=${NIL} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 275 | should be equal as strings ${resp.status_code} ${HTTP_OK} |
George Keishing | 7446eed | 2016-12-02 04:28:38 -0600 | [diff] [blame] | 276 | ${resp}= openbmc get request ${EVENT_RECORD} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 277 | ${json}= to json ${resp.content} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 278 | Should Be Empty ${json['data']} |
George Keishing | d434c51 | 2016-10-07 06:46:29 -0500 | [diff] [blame] | 279 | |
| 280 | Suite Initialization Setup |
| 281 | Open Connection And Log In |
| 282 | Run Keyword And Continue On Failure Clear all logs |