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 |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 15 | Test Teardown Log FFDC |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 16 | |
| 17 | |
| 18 | *** Variables *** |
| 19 | ${model} = ${OPENBMC_MODEL} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 32 | ${uri} = Get System component BootCount |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 33 | ${x} = Get Sensor Number ${uri} |
| 34 | |
| 35 | Run IPMI command 0x04 0x30 ${x} 0x01 0x00 0x35 0x00 0x00 0x00 0x00 0x00 0x00 |
| 36 | Read the Attribute ${uri} value |
| 37 | ${val} = convert to integer 53 |
| 38 | Response Should Be Equal ${val} |
| 39 | |
| 40 | Set Sensor Boot progress |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 41 | ${uri} = Get System component BootProgress |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 42 | ${x} = Get Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 49 | ${uri} = Get System component BootProgress |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 50 | ${x} = Get Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 57 | ${uri} = Get System component BootProgress |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 58 | ${x} = Get Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 65 | ${uri} = Get System component BootProgress |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 66 | ${x} = Get Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 73 | ${uri} = Get System component OperatingSystemStatus |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 74 | ${x} = Get Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 81 | ${uri} = Get System component OperatingSystemStatus |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 82 | ${x} = Get Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 89 | ${uri} = Get System component OccStatus |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 90 | ${x} = Get Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 97 | ${uri} = Get System component OccStatus |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 98 | ${x} = Get Sensor Number ${uri} |
| 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 | |
| 106 | ${uri} = Get System component cpu |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 107 | ${x} = Get Inventory Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 114 | ${uri} = Get System component cpu |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 115 | ${x} = Get Inventory Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 122 | ${uri} = Get System component cpu |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 123 | ${x} = Get Inventory Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 130 | ${uri} = Get System component cpu |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 131 | ${x} = Get Inventory Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 138 | ${uri} = Get System component core11 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 139 | ${x} = Get Inventory Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 146 | ${uri} = Get System component core11 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 147 | ${x} = Get Inventory Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 154 | ${uri} = Get System component core11 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 155 | ${x} = Get Inventory Sensor Number ${uri} |
| 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 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 162 | ${uri} = Get System component core11 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 163 | ${x} = Get Inventory Sensor Number ${uri} |
| 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 | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 170 | ${uri} = Get System component dimm3 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 171 | ${x} = Get Inventory Sensor Number ${uri} |
| 172 | |
| 173 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00 |
| 174 | Read The Attribute ${uri} present |
| 175 | Response Should Be Equal True |
| 176 | |
| 177 | DIMM3 not Present |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 178 | ${uri} = Get System component dimm3 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 179 | ${x} = Get Inventory Sensor Number ${uri} |
| 180 | |
| 181 | Run IPMI command 0x04 0x30 ${x} 0xa9 0xff 0x00 0x00 0x40 0x00 0x00 0x20 0x00 |
| 182 | Read The Attribute ${uri} present |
| 183 | Response Should Be Equal False |
| 184 | |
| 185 | DIMM0 fault |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 186 | ${uri} = Get System component dimm0 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 187 | ${x} = Get Inventory Sensor Number ${uri} |
| 188 | |
| 189 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00 |
| 190 | Read The Attribute ${uri} fault |
| 191 | Response Should Be Equal True |
| 192 | |
| 193 | DIMM0 no fault |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 194 | ${uri} = Get System component dimm0 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 195 | ${x} = Get Inventory Sensor Number ${uri} |
| 196 | |
| 197 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00 |
| 198 | Read The Attribute ${uri} fault |
| 199 | Response Should Be Equal False |
| 200 | |
| 201 | Centaur0 Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 202 | [Tags] Centaur0_Present |
| 203 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 204 | ${uri} = Get System component membuf |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 205 | ${x} = Get Inventory Sensor Number ${uri} |
| 206 | |
| 207 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00 |
| 208 | Read The Attribute ${uri} present |
| 209 | Response Should Be Equal True |
| 210 | |
| 211 | Centaur0 not Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 212 | [Tags] Centaur0_not_Present |
| 213 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 214 | ${uri} = Get System component membuf |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 215 | ${x} = Get Inventory Sensor Number ${uri} |
| 216 | |
| 217 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x00 0x00 0x40 0x00 0x00 0x20 0x00 |
| 218 | Read The Attribute ${uri} present |
| 219 | Response Should Be Equal False |
| 220 | |
| 221 | Centaur0 fault |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 222 | ${uri} = Get System component membuf |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 223 | ${x} = Get Inventory Sensor Number ${uri} |
| 224 | |
| 225 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00 |
| 226 | Read The Attribute ${uri} fault |
| 227 | Response Should Be Equal True |
| 228 | |
| 229 | Centaur0 no fault |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 230 | ${uri} = Get System component membuf |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 231 | ${x} = Get Inventory Sensor Number ${uri} |
| 232 | |
| 233 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00 |
| 234 | Read The Attribute ${uri} fault |
| 235 | Response Should Be Equal False |
| 236 | |
| 237 | System Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 238 | [Tags] System_Present |
| 239 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 240 | ${uri} = Get System component system |
| 241 | Read The Attribute ${uri} present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 242 | Response Should Be Equal True |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 243 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 244 | System Fault |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 245 | ${uri} = Get System component system |
| 246 | Read The Attribute ${uri} fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 247 | Response Should Be Equal False |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 248 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 249 | Chassis Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 250 | [Tags] Chassis_Present |
| 251 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 252 | ${uri} = Get System component chassis |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 253 | Read The Attribute /org/openbmc/inventory/system/chassis present |
| 254 | Response Should Be Equal True |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 255 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 256 | Chassis Fault |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 257 | ${uri} = Get System component chassis |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 258 | Read The Attribute /org/openbmc/inventory/system/chassis fault |
| 259 | Response Should Be Equal False |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 260 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 261 | io_board Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 262 | [Tags] io_board_Present |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 263 | ${uri} = Get System component io_board |
| 264 | Read The Attribute ${uri} present |
| 265 | Response Should Be Equal True |
| 266 | |
| 267 | io_board Fault |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 268 | [Tags] io_board_Fault |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 269 | ${uri} = Get System component io_board |
| 270 | Read The Attribute ${uri} fault |
| 271 | Response Should Be Equal False |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 272 | |
| 273 | *** Keywords *** |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 274 | |
| 275 | Setup The Suite |
| 276 | |
| 277 | Open Connection And Log In |
Rahul Maheshwari | 79c1294 | 2016-10-17 09:39:17 -0500 | [diff] [blame] | 278 | ${resp} = Read Properties /org/openbmc/enumerate timeout=30 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 279 | Set Suite Variable ${SYSTEM_INFO} ${resp} |
| 280 | log Dictionary ${resp} |
| 281 | |
| 282 | Get System component |
| 283 | [Arguments] ${type} |
| 284 | ${list} = Get Dictionary Keys ${SYSTEM_INFO} |
| 285 | ${resp} = Get Matches ${list} regexp=^.*[0-9a-z_].${type}[0-9]*$ |
| 286 | ${url} = Get From List ${resp} 0 |
| 287 | [return] ${url} |
| 288 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 289 | Execute new Command |
| 290 | [arguments] ${args} |
| 291 | ${output}= Execute Command ${args} |
| 292 | set test variable ${OUTPUT} "${output}" |
| 293 | |
| 294 | response Should Be Equal |
| 295 | [arguments] ${args} |
| 296 | Should Be Equal ${OUTPUT} ${args} |
| 297 | |
| 298 | Response Should Be Empty |
| 299 | Should Be Empty ${OUTPUT} |
| 300 | |
| 301 | Read the Attribute |
| 302 | [arguments] ${uri} ${parm} |
| 303 | ${output} = Read Attribute ${uri} ${parm} |
| 304 | set test variable ${OUTPUT} ${output} |
| 305 | |
| 306 | Get Sensor Number |
| 307 | [arguments] ${name} |
| 308 | ${x} = get sensor ${OPENBMC_MODEL} ${name} |
| 309 | [return] ${x} |
| 310 | |
| 311 | Get Inventory Sensor Number |
| 312 | [arguments] ${name} |
| 313 | ${x} = get inventory sensor ${OPENBMC_MODEL} ${name} |
| 314 | [return] ${x} |