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 |
Sweta Potthuri | af741cb | 2017-07-04 09:41:17 -0500 | [diff] [blame^] | 13 | Resource ../lib/boot_utils.robot |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 14 | |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 15 | Suite Setup Setup The Suite |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 16 | Test Setup Open Connection And Log In |
| 17 | Test Teardown Post Test Case Execution |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 18 | |
| 19 | *** Variables *** |
Sweta Potthuri | af741cb | 2017-07-04 09:41:17 -0500 | [diff] [blame^] | 20 | |
| 21 | ${stack_mode} skip |
| 22 | ${model}= ${OPENBMC_MODEL} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 23 | |
| 24 | *** Test Cases *** |
| 25 | Verify connection |
| 26 | Execute new Command echo "hello" |
| 27 | Response Should Be Equal "hello" |
| 28 | |
| 29 | Execute ipmi BT capabilities command |
George Keishing | cac24c7 | 2016-09-23 04:44:19 -0500 | [diff] [blame] | 30 | [Tags] Execute_ipmi_BT_capabilities_command |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 31 | Run IPMI command 0x06 0x36 |
| 32 | response Should Be Equal " 01 40 40 0a 01" |
| 33 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 34 | Execute Set Sensor Boot Count |
| 35 | [Tags] Execute_Set_Sensor_Boot_Count |
| 36 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 37 | ${uri}= Get System component BootCount |
| 38 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 39 | |
| 40 | Run IPMI command 0x04 0x30 ${x} 0x01 0x00 0x35 0x00 0x00 0x00 0x00 0x00 0x00 |
| 41 | Read the Attribute ${uri} value |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 42 | ${val}= convert to integer 53 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 43 | Response Should Be Equal ${val} |
| 44 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 45 | Set Sensor Boot Progress |
| 46 | [Tags] Set_Sensor_Boot_Progress |
| 47 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 48 | ${uri}= Get System component BootProgress |
| 49 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 50 | |
| 51 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x04 0x00 0x00 0x00 0x00 0x14 0x00 |
| 52 | Read the Attribute ${uri} value |
| 53 | Response Should Be Equal FW Progress, Baseboard Init |
| 54 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 55 | Set Sensor Boot Progress Longest String |
| 56 | [Tags] Set_Sensor_Boot_Progress_Longest_String |
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 0x04 0x00 0x00 0x00 0x00 0x0e 0x00 |
| 61 | Read The Attribute ${uri} value |
| 62 | Response Should Be Equal FW Progress, Docking station attachment |
| 63 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 64 | Boot Progress Sensor FW Hang Unspecified Error |
| 65 | [Tags] Boot_Progress_Sensor_FW_Hang_Unspecified_Error |
| 66 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 67 | ${uri}= Get System component BootProgress |
| 68 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 69 | |
| 70 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00 |
| 71 | Read The Attribute ${uri} value |
| 72 | Response Should Be Equal FW Hang, Unspecified |
| 73 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 74 | Boot Progress FW Hang State |
| 75 | [Tags] Boot_Progress_FW_Hang_State |
| 76 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 77 | ${uri}= Get System component BootProgress |
| 78 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 79 | |
| 80 | Run IPMI command 0x04 0x30 ${x} 0xa9 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00 |
| 81 | Read The Attribute ${uri} value |
| 82 | Response Should Be Equal POST Error, unknown |
| 83 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 84 | OS Status Sensor Boot Completed Progress |
| 85 | [Tags] OS_Status_Sensor_Boot_Completed_Progress |
| 86 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 87 | ${uri}= Get System component OperatingSystemStatus |
| 88 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 89 | |
| 90 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00 |
| 91 | Read The Attribute ${uri} value |
| 92 | Response Should Be Equal Boot completed (00) |
| 93 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 94 | OS Status Sensor Progress |
| 95 | [Tags] OS_Status_Sensor_Progress |
| 96 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 97 | ${uri}= Get System component OperatingSystemStatus |
| 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 0x04 0x00 0x00 0x00 0x00 0x20 0x00 |
| 101 | Read The Attribute ${uri} value |
| 102 | Response Should Be Equal PXE boot completed |
| 103 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 104 | OCC Active Sensor On Enabled |
| 105 | [Tags] OCC_Active_Sensor_On_Enabled |
| 106 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 107 | ${uri}= Get System component OccStatus |
| 108 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 109 | |
| 110 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00 |
| 111 | Read The Attribute ${uri} value |
| 112 | Response Should Be Equal Enabled |
| 113 | |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 114 | OCC Active Sensor On Disabled |
| 115 | [Tags] OCC_Active_Sensor_On_Disabled |
| 116 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 117 | ${uri}= Get System component OccStatus |
| 118 | ${x}= Get Sensor Number ${uri} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 119 | |
| 120 | Run IPMI command 0x04 0x30 ${x} 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00 |
| 121 | Read The Attribute ${uri} value |
| 122 | Response Should Be Equal Disabled |
| 123 | |
Rahul Maheshwari | eb1f6db | 2017-04-27 06:32:53 -0500 | [diff] [blame] | 124 | Verify OCC Power Supply Redundancy |
| 125 | [Documentation] Check if OCC's power supply is set to not redundant. |
| 126 | [Tags] Verify_OCC_Power_Supply_Redundancy |
| 127 | ${uri}= Get System Component PowerSupplyRedundancy |
| 128 | |
| 129 | Read The Attribute ${uri} value |
| 130 | Response Should Be Equal Disabled |
| 131 | |
| 132 | Verify OCC Power Supply Derating Value |
| 133 | [Documentation] Check if OCC's power supply derating value |
| 134 | ... is set correctly to a constant value 10. |
| 135 | [Tags] Verify_OCC_Power_Supply_Derating_Value |
| 136 | |
| 137 | ${uri}= Get System Component PowerSupplyDerating |
| 138 | |
| 139 | Read The Attribute ${uri} value |
| 140 | Response Should Be Equal ${10} |
| 141 | |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 142 | |
| 143 | Verify Enabling OCC Turbo Setting Via IPMI |
| 144 | [Documentation] Set and verify OCC's turbo allowed on enable. |
| 145 | # The allowed value for turbo allowed: |
| 146 | # True - To enable turbo allowed. |
| 147 | # False - To disable turbo allowed. |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 148 | [Setup] Turbo Setting Test Case Setup |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 149 | [Tags] Verify_Enabling_OCC_Turbo_Setting_Via_IPMI |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 150 | [Teardown] Restore System Configuration |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 151 | |
| 152 | ${uri}= Get System Component TurboAllowed |
| 153 | ${sensor_num}= Get Sensor Number ${uri} |
| 154 | |
| 155 | ${ipmi_cmd}= Catenate SEPARATOR= 0x04 0x30 ${sensor_num} 0x00${SPACE} |
| 156 | ... 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00 |
| 157 | Run IPMI Command ${ipmi_cmd} |
| 158 | |
| 159 | Read The Attribute ${uri} value |
| 160 | Response Should Be Equal True |
| 161 | |
| 162 | |
| 163 | Verify Disabling OCC Turbo Setting Via IPMI |
| 164 | [Documentation] Set and verify OCC's turbo allowed on disable. |
| 165 | # The allowed value for turbo allowed: |
| 166 | # True - To enable turbo allowed. |
| 167 | # False - To disable turbo allowed. |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 168 | [Setup] Turbo Setting Test Case Setup |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 169 | [Tags] Verify_Disabling_OCC_Turbo_Setting_Via_IPMI |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 170 | [Teardown] Restore System Configuration |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 171 | |
| 172 | ${uri}= Get System Component TurboAllowed |
| 173 | ${sensor_num}= Get Sensor Number ${uri} |
| 174 | |
| 175 | ${ipmi_cmd}= Catenate SEPARATOR= 0x04 0x30 ${sensor_num} 0x00${SPACE} |
| 176 | ... 0x00 0x00 0x00 0x01 0x00 0x00 0x20 0x00 |
| 177 | Run IPMI Command ${ipmi_cmd} |
| 178 | |
| 179 | Read The Attribute ${uri} value |
| 180 | Response Should Be Equal False |
| 181 | |
| 182 | |
Rahul Maheshwari | a3fdba4 | 2017-05-30 06:44:04 -0500 | [diff] [blame] | 183 | Verify Setting OCC Turbo Via REST |
| 184 | [Documentation] Verify enabling and disabling OCC's turbo allowed |
| 185 | ... via REST. |
| 186 | # The allowed value for turbo allowed: |
| 187 | # True - To enable turbo allowed. |
| 188 | # False - To disable turbo allowed. |
| 189 | |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 190 | [Setup] Turbo Setting Test Case Setup |
Rahul Maheshwari | a3fdba4 | 2017-05-30 06:44:04 -0500 | [diff] [blame] | 191 | [Tags] Verify_Setting_OCC_Turbo_Via_REST |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 192 | [Teardown] Restore System Configuration |
Rahul Maheshwari | a3fdba4 | 2017-05-30 06:44:04 -0500 | [diff] [blame] | 193 | |
| 194 | Set Turbo Setting Via REST False |
| 195 | ${setting}= Read Turbo Setting Via REST |
| 196 | Should Be Equal ${setting} False |
| 197 | |
| 198 | Set Turbo Setting Via REST True |
| 199 | ${setting}= Read Turbo Setting Via REST |
| 200 | Should Be Equal ${setting} True |
| 201 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 202 | Chassis Present |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 203 | [Tags] Chassis_Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 204 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 205 | ${uri}= Get System component chassis |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 206 | Read The Attribute |
| 207 | ... ${INVENTORY_URI}system/chassis present |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 208 | Response Should Be Equal True |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 209 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 210 | Chassis Fault |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 211 | [Tags] Chassis_Fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 212 | ${uri}= Get System component chassis |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 213 | Read The Attribute |
| 214 | ... ${INVENTORY_URI}system/chassis fault |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 215 | Response Should Be Equal False |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 216 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 217 | io_board Present |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 218 | [Tags] io_board_Present |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 219 | ${uri}= Get System component io_board |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 220 | Read The Attribute ${uri} present |
| 221 | Response Should Be Equal True |
| 222 | |
| 223 | io_board Fault |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 224 | [Tags] io_board_Fault |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 225 | ${uri}= Get System component io_board |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 226 | Read The Attribute ${uri} fault |
| 227 | Response Should Be Equal False |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 228 | |
| 229 | *** Keywords *** |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 230 | |
| 231 | Setup The Suite |
George Keishing | a743322 | 2017-03-23 23:47:11 -0500 | [diff] [blame] | 232 | [Documentation] Do the initial suite setup. |
George Keishing | f142668 | 2017-07-12 23:17:17 -0500 | [diff] [blame] | 233 | |
Sweta Potthuri | af741cb | 2017-07-04 09:41:17 -0500 | [diff] [blame^] | 234 | # Boot Host. |
| 235 | REST Power On |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 236 | |
| 237 | Open Connection And Log In |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 238 | ${resp}= Read Properties ${OPENBMC_BASE_URI}enumerate timeout=30 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 239 | Set Suite Variable ${SYSTEM_INFO} ${resp} |
| 240 | log Dictionary ${resp} |
| 241 | |
Sweta Potthuri | 7e5dc59 | 2017-07-03 06:10:02 -0500 | [diff] [blame] | 242 | Turbo Setting Test Case Setup |
| 243 | [Documentation] Open Connection and turbo settings |
| 244 | |
| 245 | Open Connection And Log In |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 246 | ${setting}= Read Turbo Setting Via REST |
| 247 | Set Global Variable ${TURBO_SETTING} ${setting} |
| 248 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 249 | Get System component |
| 250 | [Arguments] ${type} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 251 | ${list}= Get Dictionary Keys ${SYSTEM_INFO} |
| 252 | ${resp}= Get Matches ${list} regexp=^.*[0-9a-z_].${type}[0-9]*$ |
| 253 | ${url}= Get From List ${resp} 0 |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 254 | [Return] ${url} |
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 | Execute new Command |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 257 | [Arguments] ${args} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 258 | ${output}= Execute Command ${args} |
| 259 | set test variable ${OUTPUT} "${output}" |
| 260 | |
| 261 | response Should Be Equal |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 262 | [Arguments] ${args} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 263 | Should Be Equal ${OUTPUT} ${args} |
| 264 | |
| 265 | Response Should Be Empty |
| 266 | Should Be Empty ${OUTPUT} |
| 267 | |
Gunnar Mills | 56b3289 | 2016-11-14 13:56:17 -0600 | [diff] [blame] | 268 | Read the Attribute |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 269 | [Arguments] ${uri} ${parm} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 270 | ${output}= Read Attribute ${uri} ${parm} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 271 | set test variable ${OUTPUT} ${output} |
| 272 | |
| 273 | Get Sensor Number |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 274 | [Arguments] ${name} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 275 | ${x}= get sensor ${OPENBMC_MODEL} ${name} |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 276 | [Return] ${x} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 277 | |
| 278 | Get Inventory Sensor Number |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 279 | [Arguments] ${name} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 280 | ${x}= get inventory sensor ${OPENBMC_MODEL} ${name} |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 281 | [Return] ${x} |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 282 | |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 283 | Read Turbo Setting Via REST |
| 284 | [Documentation] Return turbo allowed setting. |
| 285 | |
| 286 | ${resp}= OpenBMC Get Request ${SENSORS_URI}host/TurboAllowed |
| 287 | ${jsondata}= To JSON ${resp.content} |
| 288 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 289 | [Return] ${jsondata["data"]["value"]} |
| 290 | |
| 291 | Set Turbo Setting Via REST |
| 292 | [Documentation] Set turbo setting via REST. |
| 293 | [Arguments] ${setting} |
| 294 | # Description of argument(s): |
| 295 | # setting Value which needs to be set.(i.e. False or True) |
| 296 | |
| 297 | ${valueDict}= Create Dictionary data=${setting} |
| 298 | Write Attribute ${SENSORS_URI}host/TurboAllowed value data=${valueDict} |
| 299 | |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 300 | Post Test Case Execution |
| 301 | [Documentation] Do the post test teardown. |
| 302 | ... 1. Capture FFDC on test failure. |
| 303 | ... 2. Close all open SSH connections. |
| 304 | |
| 305 | FFDC On Test Case Fail |
| 306 | Close All Connections |
Rahul Maheshwari | ca368e5 | 2017-05-04 05:01:49 -0500 | [diff] [blame] | 307 | |
| 308 | Restore System Configuration |
| 309 | [Documentation] Restore System Configuration. |
| 310 | |
| 311 | Open Connection And Log In |
| 312 | Set Turbo Setting Via REST ${TURBO_SETTING} |
| 313 | Close All Connections |