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 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 179 | CPU Present |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 180 | [Tags] CPU_Present |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 181 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 182 | ${uri}= Get System component cpu |
| 183 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 184 | |
| 185 | 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] | 186 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 187 | Response Should Be Equal True |
| 188 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 189 | CPU Not Present |
| 190 | [Tags] CPU_Not_Present |
| 191 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 192 | ${uri}= Get System component cpu |
| 193 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 194 | |
| 195 | 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] | 196 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 197 | Response Should Be Equal False |
| 198 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 199 | CPU No Fault |
| 200 | [Tags] CPU_No_Fault |
| 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} 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 206 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 207 | Response Should Be Equal False |
| 208 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 209 | Core Present |
| 210 | [Tags] Core_Present |
| 211 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 212 | ${uri}= Get System component core11 |
| 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 0x80 0x00 0x00 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 True |
| 218 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 219 | Core Not Present |
| 220 | [Tags] Core_Not_Present |
| 221 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 222 | ${uri}= Get System component core11 |
| 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} 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 226 | Read The Attribute ${uri} present |
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 Fault |
| 230 | [Tags] Core_Fault |
| 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 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 236 | Read The Attribute ${uri} fault |
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 No Fault |
| 240 | [Tags] Core_No_Fault |
| 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} 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 246 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 247 | Response Should Be Equal False |
| 248 | |
| 249 | DIMM3 Present |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 250 | [Tags] DIMM3_Present |
| 251 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 252 | ${uri}= Get System component dimm3 |
| 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 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00 |
| 256 | Read The Attribute ${uri} present |
| 257 | Response Should Be Equal True |
| 258 | |
| 259 | DIMM3 not Present |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 260 | [Tags] DIMM3_not_Present |
| 261 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 262 | ${uri}= Get System component dimm3 |
| 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} 0xa9 0xff 0x00 0x00 0x40 0x00 0x00 0x20 0x00 |
| 266 | Read The Attribute ${uri} present |
| 267 | Response Should Be Equal False |
| 268 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 269 | DIMM0 no fault |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 270 | [Tags] DIMM0_no_fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 271 | ${uri}= Get System component dimm0 |
| 272 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 273 | |
| 274 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00 |
| 275 | Read The Attribute ${uri} fault |
| 276 | Response Should Be Equal False |
| 277 | |
| 278 | Centaur0 Present |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 279 | [Tags] Centaur0_Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 280 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 281 | ${uri}= Get System component membuf |
| 282 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 283 | |
| 284 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00 |
| 285 | Read The Attribute ${uri} present |
| 286 | Response Should Be Equal True |
| 287 | |
| 288 | Centaur0 not Present |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 289 | [Tags] Centaur0_not_Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 290 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 291 | ${uri}= Get System component membuf |
| 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 0x40 0x00 0x00 0x20 0x00 |
| 295 | Read The Attribute ${uri} present |
| 296 | Response Should Be Equal False |
| 297 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 298 | Centaur0 Fault |
| 299 | [Tags] Centaur0_Fault |
| 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} 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00 |
| 305 | Read The Attribute ${uri} fault |
| 306 | Response Should Be Equal True |
| 307 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 308 | Centaur0 No Fault |
| 309 | [Tags] Centaur0_No_Fault |
| 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 0x10 0x00 0x00 0x20 0x00 |
| 315 | Read The Attribute ${uri} fault |
| 316 | Response Should Be Equal False |
| 317 | |
| 318 | System Present |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 319 | [Tags] System_Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 320 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 321 | ${uri}= Get System component system |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 322 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 323 | Response Should Be Equal True |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 324 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 325 | System Fault |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 326 | [Tags] System_Fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 327 | ${uri}= Get System component system |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 328 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 329 | Response Should Be Equal False |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 330 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 331 | Chassis Present |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 332 | [Tags] Chassis_Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 333 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 334 | ${uri}= Get System component chassis |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 335 | Read The Attribute |
| 336 | ... ${INVENTORY_URI}system/chassis present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 337 | Response Should Be Equal True |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 338 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 339 | Chassis Fault |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 340 | [Tags] Chassis_Fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 341 | ${uri}= Get System component chassis |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 342 | Read The Attribute |
| 343 | ... ${INVENTORY_URI}system/chassis fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 344 | Response Should Be Equal False |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 345 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 346 | io_board Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 347 | [Tags] io_board_Present |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 348 | ${uri}= Get System component io_board |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 349 | Read The Attribute ${uri} present |
| 350 | Response Should Be Equal True |
| 351 | |
| 352 | io_board Fault |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 353 | [Tags] io_board_Fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 354 | ${uri}= Get System component io_board |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 355 | Read The Attribute ${uri} fault |
| 356 | Response Should Be Equal False |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 357 | |
| 358 | *** Keywords *** |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 359 | |
| 360 | Setup The Suite |
George Keishing | a743322 | 2017-03-23 23:47:11 -0500 | [diff] [blame] | 361 | [Documentation] Do the initial suite setup. |
| 362 | ${current_state}= Get Host State |
| 363 | Run Keyword If '${current_state}' == 'Off' |
| 364 | ... Initiate Host Boot |
| 365 | |
| 366 | Wait Until Keyword Succeeds |
| 367 | ... 10 min 10 sec Is OS Starting |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 368 | |
| 369 | Open Connection And Log In |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 370 | ${resp}= Read Properties ${OPENBMC_BASE_URI}enumerate timeout=30 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 371 | Set Suite Variable ${SYSTEM_INFO} ${resp} |
| 372 | log Dictionary ${resp} |
| 373 | |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 374 | ${setting}= Read Turbo Setting Via REST |
| 375 | Set Global Variable ${TURBO_SETTING} ${setting} |
| 376 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 377 | Get System component |
| 378 | [Arguments] ${type} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 379 | ${list}= Get Dictionary Keys ${SYSTEM_INFO} |
| 380 | ${resp}= Get Matches ${list} regexp=^.*[0-9a-z_].${type}[0-9]*$ |
| 381 | ${url}= Get From List ${resp} 0 |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 382 | [Return] ${url} |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 383 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 384 | Execute new Command |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 385 | [Arguments] ${args} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 386 | ${output}= Execute Command ${args} |
| 387 | set test variable ${OUTPUT} "${output}" |
| 388 | |
| 389 | response Should Be Equal |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 390 | [Arguments] ${args} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 391 | Should Be Equal ${OUTPUT} ${args} |
| 392 | |
| 393 | Response Should Be Empty |
| 394 | Should Be Empty ${OUTPUT} |
| 395 | |
Gunnar Mills | 56b3289 | 2016-11-14 13:56:17 -0600 | [diff] [blame] | 396 | Read the Attribute |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 397 | [Arguments] ${uri} ${parm} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 398 | ${output}= Read Attribute ${uri} ${parm} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 399 | set test variable ${OUTPUT} ${output} |
| 400 | |
| 401 | Get Sensor Number |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 402 | [Arguments] ${name} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 403 | ${x}= get sensor ${OPENBMC_MODEL} ${name} |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 404 | [Return] ${x} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 405 | |
| 406 | Get Inventory Sensor Number |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 407 | [Arguments] ${name} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 408 | ${x}= get inventory sensor ${OPENBMC_MODEL} ${name} |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 409 | [Return] ${x} |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 410 | |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 411 | Read Turbo Setting Via REST |
| 412 | [Documentation] Return turbo allowed setting. |
| 413 | |
| 414 | ${resp}= OpenBMC Get Request ${SENSORS_URI}host/TurboAllowed |
| 415 | ${jsondata}= To JSON ${resp.content} |
| 416 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 417 | [Return] ${jsondata["data"]["value"]} |
| 418 | |
| 419 | Set Turbo Setting Via REST |
| 420 | [Documentation] Set turbo setting via REST. |
| 421 | [Arguments] ${setting} |
| 422 | # Description of argument(s): |
| 423 | # setting Value which needs to be set.(i.e. False or True) |
| 424 | |
| 425 | ${valueDict}= Create Dictionary data=${setting} |
| 426 | Write Attribute ${SENSORS_URI}host/TurboAllowed value data=${valueDict} |
| 427 | |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 428 | Post Test Case Execution |
| 429 | [Documentation] Do the post test teardown. |
| 430 | ... 1. Capture FFDC on test failure. |
| 431 | ... 2. Close all open SSH connections. |
| 432 | |
| 433 | FFDC On Test Case Fail |
| 434 | Close All Connections |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 435 | |
| 436 | Restore System Configuration |
| 437 | [Documentation] Restore System Configuration. |
| 438 | |
| 439 | Open Connection And Log In |
| 440 | Set Turbo Setting Via REST ${TURBO_SETTING} |
| 441 | Close All Connections |