Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This example demonstrates executing commands on a remote machine |
| 3 | ... and getting their output and the return code. |
| 4 | ... |
| 5 | ... Notice how connections are handled as part of the suite setup and |
| 6 | ... teardown. This saves some time when executing several test cases. |
| 7 | |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 8 | Resource ../lib/rest_client.robot |
| 9 | Resource ../lib/ipmi_client.robot |
| 10 | Resource ../lib/openbmc_ffdc.robot |
George Keishing | a743322 | 2017-03-23 23:47:11 -0500 | [diff] [blame] | 11 | Resource ../lib/state_manager.robot |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 12 | Library ../data/model.py |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 13 | |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 14 | Suite Setup Setup The Suite |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 15 | Test Setup Open Connection And Log In |
| 16 | Test Teardown Post Test Case Execution |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 17 | |
| 18 | *** Variables *** |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 19 | ${model}= ${OPENBMC_MODEL} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 20 | |
| 21 | *** Test Cases *** |
| 22 | Verify connection |
| 23 | Execute new Command echo "hello" |
| 24 | Response Should Be Equal "hello" |
| 25 | |
| 26 | Execute ipmi BT capabilities command |
George Keishing | cac24c7 | 2016-09-23 04:44:19 -0500 | [diff] [blame] | 27 | [Tags] Execute_ipmi_BT_capabilities_command |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 28 | Run IPMI command 0x06 0x36 |
| 29 | response Should Be Equal " 01 40 40 0a 01" |
| 30 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 31 | Execute Set Sensor Boot Count |
| 32 | [Tags] Execute_Set_Sensor_Boot_Count |
| 33 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 34 | ${uri}= Get System component BootCount |
| 35 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 36 | |
| 37 | Run IPMI command 0x04 0x30 ${x} 0x01 0x00 0x35 0x00 0x00 0x00 0x00 0x00 0x00 |
| 38 | Read the Attribute ${uri} value |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 39 | ${val}= convert to integer 53 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 40 | Response Should Be Equal ${val} |
| 41 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 42 | Set Sensor Boot Progress |
| 43 | [Tags] Set_Sensor_Boot_Progress |
| 44 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 45 | ${uri}= Get System component BootProgress |
| 46 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 47 | |
| 48 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x04 0x00 0x00 0x00 0x00 0x14 0x00 |
| 49 | Read the Attribute ${uri} value |
| 50 | Response Should Be Equal FW Progress, Baseboard Init |
| 51 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 52 | Set Sensor Boot Progress Longest String |
| 53 | [Tags] Set_Sensor_Boot_Progress_Longest_String |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 54 | ${uri}= Get System component BootProgress |
| 55 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 56 | |
| 57 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x04 0x00 0x00 0x00 0x00 0x0e 0x00 |
| 58 | Read The Attribute ${uri} value |
| 59 | Response Should Be Equal FW Progress, Docking station attachment |
| 60 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 61 | Boot Progress Sensor FW Hang Unspecified Error |
| 62 | [Tags] Boot_Progress_Sensor_FW_Hang_Unspecified_Error |
| 63 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 64 | ${uri}= Get System component BootProgress |
| 65 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 66 | |
| 67 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00 |
| 68 | Read The Attribute ${uri} value |
| 69 | Response Should Be Equal FW Hang, Unspecified |
| 70 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 71 | Boot Progress FW Hang State |
| 72 | [Tags] Boot_Progress_FW_Hang_State |
| 73 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 74 | ${uri}= Get System component BootProgress |
| 75 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 76 | |
| 77 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00 |
| 78 | Read The Attribute ${uri} value |
| 79 | Response Should Be Equal POST Error, unknown |
| 80 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 81 | OS Status Sensor Boot Completed Progress |
| 82 | [Tags] OS_Status_Sensor_Boot_Completed_Progress |
| 83 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 84 | ${uri}= Get System component OperatingSystemStatus |
| 85 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 86 | |
| 87 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00 |
| 88 | Read The Attribute ${uri} value |
| 89 | Response Should Be Equal Boot completed (00) |
| 90 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 91 | OS Status Sensor Progress |
| 92 | [Tags] OS_Status_Sensor_Progress |
| 93 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 94 | ${uri}= Get System component OperatingSystemStatus |
| 95 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 96 | |
| 97 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x04 0x00 0x00 0x00 0x00 0x20 0x00 |
| 98 | Read The Attribute ${uri} value |
| 99 | Response Should Be Equal PXE boot completed |
| 100 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 101 | OCC Active Sensor On Enabled |
| 102 | [Tags] OCC_Active_Sensor_On_Enabled |
| 103 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 104 | ${uri}= Get System component OccStatus |
| 105 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 106 | |
| 107 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00 |
| 108 | Read The Attribute ${uri} value |
| 109 | Response Should Be Equal Enabled |
| 110 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 111 | OCC Active Sensor On Disabled |
| 112 | [Tags] OCC_Active_Sensor_On_Disabled |
| 113 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 114 | ${uri}= Get System component OccStatus |
| 115 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 116 | |
| 117 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00 |
| 118 | Read The Attribute ${uri} value |
| 119 | Response Should Be Equal Disabled |
| 120 | |
Rahul Maheshwari | eb1f6db | 2017-04-27 06:32:53 -0500 | [diff] [blame] | 121 | Verify OCC Power Supply Redundancy |
| 122 | [Documentation] Check if OCC's power supply is set to not redundant. |
| 123 | [Tags] Verify_OCC_Power_Supply_Redundancy |
| 124 | ${uri}= Get System Component PowerSupplyRedundancy |
| 125 | |
| 126 | Read The Attribute ${uri} value |
| 127 | Response Should Be Equal Disabled |
| 128 | |
| 129 | Verify OCC Power Supply Derating Value |
| 130 | [Documentation] Check if OCC's power supply derating value |
| 131 | ... is set correctly to a constant value 10. |
| 132 | [Tags] Verify_OCC_Power_Supply_Derating_Value |
| 133 | |
| 134 | ${uri}= Get System Component PowerSupplyDerating |
| 135 | |
| 136 | Read The Attribute ${uri} value |
| 137 | Response Should Be Equal ${10} |
| 138 | |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 139 | |
| 140 | Verify Enabling OCC Turbo Setting Via IPMI |
| 141 | [Documentation] Set and verify OCC's turbo allowed on enable. |
| 142 | # The allowed value for turbo allowed: |
| 143 | # True - To enable turbo allowed. |
| 144 | # False - To disable turbo allowed. |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 145 | [Setup] Turbo Setting Test Case Setup |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 146 | [Tags] Verify_Enabling_OCC_Turbo_Setting_Via_IPMI |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 147 | [Teardown] Restore System Configuration |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 148 | |
| 149 | ${uri}= Get System Component TurboAllowed |
| 150 | ${sensor_num}= Get Sensor Number ${uri} |
| 151 | |
| 152 | ${ipmi_cmd}= Catenate SEPARATOR= 0x04 0x30 ${sensor_num} 0x00${SPACE} |
| 153 | ... 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00 |
| 154 | Run IPMI Command ${ipmi_cmd} |
| 155 | |
| 156 | Read The Attribute ${uri} value |
| 157 | Response Should Be Equal True |
| 158 | |
| 159 | |
| 160 | Verify Disabling OCC Turbo Setting Via IPMI |
| 161 | [Documentation] Set and verify OCC's turbo allowed on disable. |
| 162 | # The allowed value for turbo allowed: |
| 163 | # True - To enable turbo allowed. |
| 164 | # False - To disable turbo allowed. |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 165 | [Setup] Turbo Setting Test Case Setup |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 166 | [Tags] Verify_Disabling_OCC_Turbo_Setting_Via_IPMI |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 167 | [Teardown] Restore System Configuration |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 168 | |
| 169 | ${uri}= Get System Component TurboAllowed |
| 170 | ${sensor_num}= Get Sensor Number ${uri} |
| 171 | |
| 172 | ${ipmi_cmd}= Catenate SEPARATOR= 0x04 0x30 ${sensor_num} 0x00${SPACE} |
| 173 | ... 0x00 0x00 0x00 0x01 0x00 0x00 0x20 0x00 |
| 174 | Run IPMI Command ${ipmi_cmd} |
| 175 | |
| 176 | Read The Attribute ${uri} value |
| 177 | Response Should Be Equal False |
| 178 | |
| 179 | |
Rahul Maheshwari | a3fdba4 | 2017-05-30 06:44:04 -0500 | [diff] [blame] | 180 | Verify Setting OCC Turbo Via REST |
| 181 | [Documentation] Verify enabling and disabling OCC's turbo allowed |
| 182 | ... via REST. |
| 183 | # The allowed value for turbo allowed: |
| 184 | # True - To enable turbo allowed. |
| 185 | # False - To disable turbo allowed. |
| 186 | |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 187 | [Setup] Turbo Setting Test Case Setup |
Rahul Maheshwari | a3fdba4 | 2017-05-30 06:44:04 -0500 | [diff] [blame] | 188 | [Tags] Verify_Setting_OCC_Turbo_Via_REST |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 189 | [Teardown] Restore System Configuration |
Rahul Maheshwari | a3fdba4 | 2017-05-30 06:44:04 -0500 | [diff] [blame] | 190 | |
| 191 | Set Turbo Setting Via REST False |
| 192 | ${setting}= Read Turbo Setting Via REST |
| 193 | Should Be Equal ${setting} False |
| 194 | |
| 195 | Set Turbo Setting Via REST True |
| 196 | ${setting}= Read Turbo Setting Via REST |
| 197 | Should Be Equal ${setting} True |
| 198 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 199 | CPU Present |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 200 | [Tags] CPU_Present |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 201 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 202 | ${uri}= Get System component cpu |
| 203 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 204 | |
| 205 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 206 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 207 | Response Should Be Equal True |
| 208 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 209 | CPU Not Present |
| 210 | [Tags] CPU_Not_Present |
| 211 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 212 | ${uri}= Get System component cpu |
| 213 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 214 | |
| 215 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 216 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 217 | Response Should Be Equal False |
| 218 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 219 | CPU No Fault |
| 220 | [Tags] CPU_No_Fault |
| 221 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 222 | ${uri}= Get System component cpu |
| 223 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 224 | |
| 225 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 226 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 227 | Response Should Be Equal False |
| 228 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 229 | Core Present |
| 230 | [Tags] Core_Present |
| 231 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 232 | ${uri}= Get System component core11 |
| 233 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 234 | |
| 235 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 236 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 237 | Response Should Be Equal True |
| 238 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 239 | Core Not Present |
| 240 | [Tags] Core_Not_Present |
| 241 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 242 | ${uri}= Get System component core11 |
| 243 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 244 | |
| 245 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 246 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 247 | Response Should Be Equal False |
| 248 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 249 | Core Fault |
| 250 | [Tags] Core_Fault |
| 251 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 252 | ${uri}= Get System component core11 |
| 253 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 254 | |
| 255 | Run IPMI command 0x04 0x30 ${x} 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 256 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 257 | Response Should Be Equal True |
| 258 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 259 | Core No Fault |
| 260 | [Tags] Core_No_Fault |
| 261 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 262 | ${uri}= Get System component core11 |
| 263 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 264 | |
| 265 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 266 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 267 | Response Should Be Equal False |
| 268 | |
| 269 | DIMM3 Present |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 270 | [Tags] DIMM3_Present |
| 271 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 272 | ${uri}= Get System component dimm3 |
| 273 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 274 | |
| 275 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00 |
| 276 | Read The Attribute ${uri} present |
| 277 | Response Should Be Equal True |
| 278 | |
| 279 | DIMM3 not Present |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 280 | [Tags] DIMM3_not_Present |
| 281 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 282 | ${uri}= Get System component dimm3 |
| 283 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 284 | |
| 285 | Run IPMI command 0x04 0x30 ${x} 0xa9 0xff 0x00 0x00 0x40 0x00 0x00 0x20 0x00 |
| 286 | Read The Attribute ${uri} present |
| 287 | Response Should Be Equal False |
| 288 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 289 | DIMM0 no fault |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 290 | [Tags] DIMM0_no_fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 291 | ${uri}= Get System component dimm0 |
| 292 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 293 | |
| 294 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00 |
| 295 | Read The Attribute ${uri} fault |
| 296 | Response Should Be Equal False |
| 297 | |
| 298 | Centaur0 Present |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 299 | [Tags] Centaur0_Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 300 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 301 | ${uri}= Get System component membuf |
| 302 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 303 | |
| 304 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00 |
| 305 | Read The Attribute ${uri} present |
| 306 | Response Should Be Equal True |
| 307 | |
| 308 | Centaur0 not Present |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 309 | [Tags] Centaur0_not_Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 310 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 311 | ${uri}= Get System component membuf |
| 312 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 313 | |
| 314 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x00 0x00 0x40 0x00 0x00 0x20 0x00 |
| 315 | Read The Attribute ${uri} present |
| 316 | Response Should Be Equal False |
| 317 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 318 | Centaur0 Fault |
| 319 | [Tags] Centaur0_Fault |
| 320 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 321 | ${uri}= Get System component membuf |
| 322 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 323 | |
| 324 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00 |
| 325 | Read The Attribute ${uri} fault |
| 326 | Response Should Be Equal True |
| 327 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 328 | Centaur0 No Fault |
| 329 | [Tags] Centaur0_No_Fault |
| 330 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 331 | ${uri}= Get System component membuf |
| 332 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 333 | |
| 334 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00 |
| 335 | Read The Attribute ${uri} fault |
| 336 | Response Should Be Equal False |
| 337 | |
| 338 | System Present |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 339 | [Tags] System_Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 340 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 341 | ${uri}= Get System component system |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 342 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 343 | Response Should Be Equal True |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 344 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 345 | System Fault |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 346 | [Tags] System_Fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 347 | ${uri}= Get System component system |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 348 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 349 | Response Should Be Equal False |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 350 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 351 | Chassis Present |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 352 | [Tags] Chassis_Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 353 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 354 | ${uri}= Get System component chassis |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 355 | Read The Attribute |
| 356 | ... ${INVENTORY_URI}system/chassis present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 357 | Response Should Be Equal True |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 358 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 359 | Chassis Fault |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 360 | [Tags] Chassis_Fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 361 | ${uri}= Get System component chassis |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 362 | Read The Attribute |
| 363 | ... ${INVENTORY_URI}system/chassis fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 364 | Response Should Be Equal False |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 365 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 366 | io_board Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 367 | [Tags] io_board_Present |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 368 | ${uri}= Get System component io_board |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 369 | Read The Attribute ${uri} present |
| 370 | Response Should Be Equal True |
| 371 | |
| 372 | io_board Fault |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 373 | [Tags] io_board_Fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 374 | ${uri}= Get System component io_board |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 375 | Read The Attribute ${uri} fault |
| 376 | Response Should Be Equal False |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 377 | |
| 378 | *** Keywords *** |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 379 | |
| 380 | Setup The Suite |
George Keishing | a743322 | 2017-03-23 23:47:11 -0500 | [diff] [blame] | 381 | [Documentation] Do the initial suite setup. |
George Keishing | f142668 | 2017-07-12 23:17:17 -0500 | [diff] [blame] | 382 | |
| 383 | # Reboot host to re-power on clean if host is not "off". |
George Keishing | a743322 | 2017-03-23 23:47:11 -0500 | [diff] [blame] | 384 | ${current_state}= Get Host State |
| 385 | Run Keyword If '${current_state}' == 'Off' |
| 386 | ... Initiate Host Boot |
George Keishing | f142668 | 2017-07-12 23:17:17 -0500 | [diff] [blame] | 387 | ... ELSE Initiate Host Reboot |
George Keishing | a743322 | 2017-03-23 23:47:11 -0500 | [diff] [blame] | 388 | |
| 389 | Wait Until Keyword Succeeds |
| 390 | ... 10 min 10 sec Is OS Starting |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 391 | |
| 392 | Open Connection And Log In |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 393 | ${resp}= Read Properties ${OPENBMC_BASE_URI}enumerate timeout=30 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 394 | Set Suite Variable ${SYSTEM_INFO} ${resp} |
| 395 | log Dictionary ${resp} |
| 396 | |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 397 | Turbo Setting Test Case Setup |
| 398 | [Documentation] Open Connection and turbo settings |
| 399 | |
| 400 | Open Connection And Log In |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 401 | ${setting}= Read Turbo Setting Via REST |
| 402 | Set Global Variable ${TURBO_SETTING} ${setting} |
| 403 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 404 | Get System component |
| 405 | [Arguments] ${type} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 406 | ${list}= Get Dictionary Keys ${SYSTEM_INFO} |
| 407 | ${resp}= Get Matches ${list} regexp=^.*[0-9a-z_].${type}[0-9]*$ |
| 408 | ${url}= Get From List ${resp} 0 |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 409 | [Return] ${url} |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 410 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 411 | Execute new Command |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 412 | [Arguments] ${args} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 413 | ${output}= Execute Command ${args} |
| 414 | set test variable ${OUTPUT} "${output}" |
| 415 | |
| 416 | response Should Be Equal |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 417 | [Arguments] ${args} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 418 | Should Be Equal ${OUTPUT} ${args} |
| 419 | |
| 420 | Response Should Be Empty |
| 421 | Should Be Empty ${OUTPUT} |
| 422 | |
Gunnar Mills | 56b3289 | 2016-11-14 13:56:17 -0600 | [diff] [blame] | 423 | Read the Attribute |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 424 | [Arguments] ${uri} ${parm} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 425 | ${output}= Read Attribute ${uri} ${parm} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 426 | set test variable ${OUTPUT} ${output} |
| 427 | |
| 428 | Get Sensor Number |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 429 | [Arguments] ${name} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 430 | ${x}= get sensor ${OPENBMC_MODEL} ${name} |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 431 | [Return] ${x} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 432 | |
| 433 | Get Inventory Sensor Number |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 434 | [Arguments] ${name} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 435 | ${x}= get inventory sensor ${OPENBMC_MODEL} ${name} |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 436 | [Return] ${x} |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 437 | |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 438 | Read Turbo Setting Via REST |
| 439 | [Documentation] Return turbo allowed setting. |
| 440 | |
| 441 | ${resp}= OpenBMC Get Request ${SENSORS_URI}host/TurboAllowed |
| 442 | ${jsondata}= To JSON ${resp.content} |
| 443 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 444 | [Return] ${jsondata["data"]["value"]} |
| 445 | |
| 446 | Set Turbo Setting Via REST |
| 447 | [Documentation] Set turbo setting via REST. |
| 448 | [Arguments] ${setting} |
| 449 | # Description of argument(s): |
| 450 | # setting Value which needs to be set.(i.e. False or True) |
| 451 | |
| 452 | ${valueDict}= Create Dictionary data=${setting} |
| 453 | Write Attribute ${SENSORS_URI}host/TurboAllowed value data=${valueDict} |
| 454 | |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 455 | Post Test Case Execution |
| 456 | [Documentation] Do the post test teardown. |
| 457 | ... 1. Capture FFDC on test failure. |
| 458 | ... 2. Close all open SSH connections. |
| 459 | |
| 460 | FFDC On Test Case Fail |
| 461 | Close All Connections |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 462 | |
| 463 | Restore System Configuration |
| 464 | [Documentation] Restore System Configuration. |
| 465 | |
| 466 | Open Connection And Log In |
| 467 | Set Turbo Setting Via REST ${TURBO_SETTING} |
| 468 | Close All Connections |