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