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 | |
| 8 | Resource ../lib/rest_client.robot |
| 9 | Resource ../lib/ipmi_client.robot |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 10 | Resource ../lib/openbmc_ffdc.robot |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 11 | Library ../data/model.py |
| 12 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 13 | Suite setup Setup The Suite |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 14 | Suite Teardown Close All Connections |
Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 15 | Test Teardown FFDC On Test Case Fail |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 16 | |
| 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 | |
| 31 | Execute Set Sensor boot count |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 32 | ${uri}= Get System component BootCount |
| 33 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 34 | |
| 35 | Run IPMI command 0x04 0x30 ${x} 0x01 0x00 0x35 0x00 0x00 0x00 0x00 0x00 0x00 |
| 36 | Read the Attribute ${uri} value |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 37 | ${val}= convert to integer 53 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 38 | Response Should Be Equal ${val} |
| 39 | |
| 40 | Set Sensor Boot progress |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 41 | ${uri}= Get System component BootProgress |
| 42 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 43 | |
| 44 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x04 0x00 0x00 0x00 0x00 0x14 0x00 |
| 45 | Read the Attribute ${uri} value |
| 46 | Response Should Be Equal FW Progress, Baseboard Init |
| 47 | |
| 48 | Set Sensor Boot progress Longest string |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 49 | ${uri}= Get System component BootProgress |
| 50 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 51 | |
| 52 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x04 0x00 0x00 0x00 0x00 0x0e 0x00 |
| 53 | Read The Attribute ${uri} value |
| 54 | Response Should Be Equal FW Progress, Docking station attachment |
| 55 | |
| 56 | BootProgress sensor FW Hang unspecified Error |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 57 | ${uri}= Get System component BootProgress |
| 58 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 59 | |
| 60 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00 |
| 61 | Read The Attribute ${uri} value |
| 62 | Response Should Be Equal FW Hang, Unspecified |
| 63 | |
| 64 | BootProgress fw hang state |
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 0x01 0x00 0x00 0x00 0x00 0x20 0x00 |
| 69 | Read The Attribute ${uri} value |
| 70 | Response Should Be Equal POST Error, unknown |
| 71 | |
| 72 | OperatingSystemStatus Sensor boot completed progress |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 73 | ${uri}= Get System component OperatingSystemStatus |
| 74 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 75 | |
| 76 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00 |
| 77 | Read The Attribute ${uri} value |
| 78 | Response Should Be Equal Boot completed (00) |
| 79 | |
| 80 | OperatingSystemStatus Sensor progress |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 81 | ${uri}= Get System component OperatingSystemStatus |
| 82 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 83 | |
| 84 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x04 0x00 0x00 0x00 0x00 0x20 0x00 |
| 85 | Read The Attribute ${uri} value |
| 86 | Response Should Be Equal PXE boot completed |
| 87 | |
| 88 | OCC Active sensor on enabled |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 89 | ${uri}= Get System component OccStatus |
| 90 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 91 | |
| 92 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00 |
| 93 | Read The Attribute ${uri} value |
| 94 | Response Should Be Equal Enabled |
| 95 | |
| 96 | OCC Active sensor on disabled |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 97 | ${uri}= Get System component OccStatus |
| 98 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 99 | |
| 100 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00 |
| 101 | Read The Attribute ${uri} value |
| 102 | Response Should Be Equal Disabled |
| 103 | |
| 104 | CPU Present |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 105 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 106 | ${uri}= Get System component cpu |
| 107 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 108 | |
| 109 | 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] | 110 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 111 | Response Should Be Equal True |
| 112 | |
| 113 | CPU not Present |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 114 | ${uri}= Get System component cpu |
| 115 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 116 | |
| 117 | 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] | 118 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 119 | Response Should Be Equal False |
| 120 | |
| 121 | CPU fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 122 | ${uri}= Get System component cpu |
| 123 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 124 | |
| 125 | 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] | 126 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 127 | Response Should Be Equal True |
| 128 | |
| 129 | CPU no fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 130 | ${uri}= Get System component cpu |
| 131 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 132 | |
| 133 | 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] | 134 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 135 | Response Should Be Equal False |
| 136 | |
| 137 | core Present |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 138 | ${uri}= Get System component core11 |
| 139 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 140 | |
| 141 | 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] | 142 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 143 | Response Should Be Equal True |
| 144 | |
| 145 | core not Present |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 146 | ${uri}= Get System component core11 |
| 147 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 148 | |
| 149 | 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] | 150 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 151 | Response Should Be Equal False |
| 152 | |
| 153 | core fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 154 | ${uri}= Get System component core11 |
| 155 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 156 | |
| 157 | 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] | 158 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 159 | Response Should Be Equal True |
| 160 | |
| 161 | core no fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 162 | ${uri}= Get System component core11 |
| 163 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 164 | |
| 165 | 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] | 166 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 167 | Response Should Be Equal False |
| 168 | |
| 169 | DIMM3 Present |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 170 | [Tags] DIMM3_Present |
| 171 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 172 | ${uri}= Get System component dimm3 |
| 173 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 174 | |
| 175 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00 |
| 176 | Read The Attribute ${uri} present |
| 177 | Response Should Be Equal True |
| 178 | |
| 179 | DIMM3 not Present |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 180 | [Tags] DIMM3_not_Present |
| 181 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 182 | ${uri}= Get System component dimm3 |
| 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 0xff 0x00 0x00 0x40 0x00 0x00 0x20 0x00 |
| 186 | Read The Attribute ${uri} present |
| 187 | Response Should Be Equal False |
| 188 | |
| 189 | DIMM0 fault |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 190 | [Tags] DIMM0_fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 191 | ${uri}= Get System component dimm0 |
| 192 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 193 | |
| 194 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00 |
| 195 | Read The Attribute ${uri} fault |
| 196 | Response Should Be Equal True |
| 197 | |
| 198 | DIMM0 no fault |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 199 | [Tags] DIMM0_no_fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 200 | ${uri}= Get System component dimm0 |
| 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} 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00 |
| 204 | Read The Attribute ${uri} fault |
| 205 | Response Should Be Equal False |
| 206 | |
| 207 | Centaur0 Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 208 | [Tags] Centaur0_Present |
| 209 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 210 | ${uri}= Get System component membuf |
| 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 0x40 0x00 0x00 0x00 0x00 0x20 0x00 |
| 214 | Read The Attribute ${uri} present |
| 215 | Response Should Be Equal True |
| 216 | |
| 217 | Centaur0 not Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 218 | [Tags] Centaur0_not_Present |
| 219 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 220 | ${uri}= Get System component membuf |
| 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 0x40 0x00 0x00 0x20 0x00 |
| 224 | Read The Attribute ${uri} present |
| 225 | Response Should Be Equal False |
| 226 | |
| 227 | Centaur0 fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 228 | ${uri}= Get System component membuf |
| 229 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 230 | |
| 231 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00 |
| 232 | Read The Attribute ${uri} fault |
| 233 | Response Should Be Equal True |
| 234 | |
| 235 | Centaur0 no fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 236 | ${uri}= Get System component membuf |
| 237 | ${x}= Get Inventory Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 238 | |
| 239 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00 |
| 240 | Read The Attribute ${uri} fault |
| 241 | Response Should Be Equal False |
| 242 | |
| 243 | System Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 244 | [Tags] System_Present |
| 245 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 246 | ${uri}= Get System component system |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 247 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 248 | Response Should Be Equal True |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 249 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 250 | System Fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 251 | ${uri}= Get System component system |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 252 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 253 | Response Should Be Equal False |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 254 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 255 | Chassis Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 256 | [Tags] Chassis_Present |
| 257 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 258 | ${uri}= Get System component chassis |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 259 | Read The Attribute |
| 260 | ... ${INVENTORY_URI}system/chassis present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 261 | Response Should Be Equal True |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 262 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 263 | Chassis Fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 264 | ${uri}= Get System component chassis |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 265 | Read The Attribute |
| 266 | ... ${INVENTORY_URI}system/chassis fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 267 | Response Should Be Equal False |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 268 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 269 | io_board Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 270 | [Tags] io_board_Present |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 271 | ${uri}= Get System component io_board |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 272 | Read The Attribute ${uri} present |
| 273 | Response Should Be Equal True |
| 274 | |
| 275 | io_board Fault |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 276 | [Tags] io_board_Fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 277 | ${uri}= Get System component io_board |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 278 | Read The Attribute ${uri} fault |
| 279 | Response Should Be Equal False |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 280 | |
| 281 | *** Keywords *** |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 282 | |
| 283 | Setup The Suite |
| 284 | |
| 285 | Open Connection And Log In |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 286 | ${resp}= Read Properties ${OPENBMC_BASE_URI}enumerate timeout=30 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 287 | Set Suite Variable ${SYSTEM_INFO} ${resp} |
| 288 | log Dictionary ${resp} |
| 289 | |
| 290 | Get System component |
| 291 | [Arguments] ${type} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 292 | ${list}= Get Dictionary Keys ${SYSTEM_INFO} |
| 293 | ${resp}= Get Matches ${list} regexp=^.*[0-9a-z_].${type}[0-9]*$ |
| 294 | ${url}= Get From List ${resp} 0 |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 295 | [Return] ${url} |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 296 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 297 | Execute new Command |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 298 | [Arguments] ${args} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 299 | ${output}= Execute Command ${args} |
| 300 | set test variable ${OUTPUT} "${output}" |
| 301 | |
| 302 | response Should Be Equal |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 303 | [Arguments] ${args} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 304 | Should Be Equal ${OUTPUT} ${args} |
| 305 | |
| 306 | Response Should Be Empty |
| 307 | Should Be Empty ${OUTPUT} |
| 308 | |
Gunnar Mills | 56b3289 | 2016-11-14 13:56:17 -0600 | [diff] [blame] | 309 | Read the Attribute |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 310 | [Arguments] ${uri} ${parm} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 311 | ${output}= Read Attribute ${uri} ${parm} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 312 | set test variable ${OUTPUT} ${output} |
| 313 | |
| 314 | Get Sensor Number |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 315 | [Arguments] ${name} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 316 | ${x}= get sensor ${OPENBMC_MODEL} ${name} |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 317 | [Return] ${x} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 318 | |
| 319 | Get Inventory Sensor Number |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 320 | [Arguments] ${name} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 321 | ${x}= get inventory sensor ${OPENBMC_MODEL} ${name} |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 322 | [Return] ${x} |