| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 1 | *** Settings *** | 
 | 2 | Documentation       This suite tests IPMI Cold Reset in OpenBMC. | 
 | 3 | ... | 
 | 4 | ...                 The Cold reset command directs the Responder to perform | 
 | 5 | ...                 a 'Cold Reset' action, which causes default setting of | 
 | 6 | ...                 interrupt enables, event message generation,sensor scanning, | 
 | 7 | ...                 threshold values, and other 'power up' default state to be restored. | 
 | 8 | ... | 
 | 9 | ...                 The script consist of 3 testcases: | 
 | 10 | ...                 -  Cold_Reset_Via_IPMI | 
 | 11 | ...                 -  Cold_Reset_With_Invalid_Data_Request_Via_IPMI | 
 | 12 | ...                 -  Verify_Cold_Reset_Impact_On_Sensor_Threshold_Via_IPMI | 
 | 13 | ... | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 14 | ...                 The script verifies command execution for cold reset, | 
 | 15 | ...                 invalid data request verification of cold reset and | 
 | 16 | ...                 impact on sensor threshold value change with cold reset. | 
 | 17 | ... | 
 | 18 | ...                 The script changes sensor threshold value for Fan sensor, | 
 | 19 | ...                 executes cold reset IPMI command, | 
 | 20 | ...                 compares sensor threshold values of initial and reading after cold reset. | 
| chithrag | 6b279b3 | 2022-05-05 08:28:05 +0000 | [diff] [blame] | 21 | ... | 
 | 22 | ...                 Request data for cold reset present under data/ipmi_raw_cmd_table.py | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 23 |  | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 24 | Resource            ../lib/ipmi_client.robot | 
 | 25 | Resource            ../lib/openbmc_ffdc.robot | 
| ganesanb | d0c4b80 | 2023-04-28 18:29:38 +0000 | [diff] [blame] | 26 | Library             Collections | 
 | 27 | Library             ../lib/ipmi_utils.py | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 28 | Variables           ../data/ipmi_raw_cmd_table.py | 
 | 29 |  | 
| chithrag | 6b279b3 | 2022-05-05 08:28:05 +0000 | [diff] [blame] | 30 | Test Teardown       FFDC On Test Case Fail | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 31 |  | 
| Matt Fischer | 6fb70d9 | 2023-10-24 19:06:33 -0600 | [diff] [blame] | 32 | Test Tags          IPMI_Cold_Reset | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 33 |  | 
 | 34 | *** Variables *** | 
 | 35 |  | 
 | 36 | ${NETWORK_RESTART_TIME}    30s | 
 | 37 | @{thresholds_list}         lcr   lnc   unc   ucr | 
 | 38 |  | 
 | 39 |  | 
 | 40 | *** Test Cases *** | 
 | 41 |  | 
 | 42 | Cold Reset Via IPMI | 
 | 43 |     [Documentation]  Verify Cold Reset via IPMI. | 
 | 44 |     [Tags]  Cold_Reset_Via_IPMI | 
 | 45 |  | 
 | 46 |     # Cold Reset Via IPMI raw command. | 
| ishwaryamathim | 372cd86 | 2023-11-14 18:12:23 +0000 | [diff] [blame] | 47 |     Run IPMI Command  ${IPMI_RAW_CMD['Cold Reset']['reset'][0]} | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 48 |  | 
 | 49 |     # Get the BMC Status. | 
 | 50 |     Wait Until Keyword Succeeds  3 min  10 sec  Is BMC Unpingable | 
 | 51 |     Wait Until Keyword Succeeds  3 min  10 sec  Is BMC Operational | 
 | 52 |  | 
 | 53 |     # Verify if BMC restarted with Get Device ID command. | 
 | 54 |  | 
| ishwaryamathim | 372cd86 | 2023-11-14 18:12:23 +0000 | [diff] [blame] | 55 |     ${resp}=  Run IPMI Command  ${IPMI_RAW_CMD['Device ID']['Get'][0]} | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 56 |     Should Not Contain  ${resp}  ${IPMI_RAW_CMD['Device ID']['Get'][1]} | 
 | 57 |  | 
 | 58 |  | 
 | 59 | Cold Reset With Invalid Data Request Via IPMI | 
 | 60 |     [Documentation]  Verify Cold Reset with invalid data request via IPMI. | 
 | 61 |     [Tags]  Cold_Reset_With_Invalid_Data_Request_Via_IPMI | 
 | 62 |  | 
 | 63 |     # Verify cold reset with invalid length of the request data and expect error. | 
 | 64 |     ${resp}=  Run Keyword and Expect Error  *Request data length invalid* | 
| ishwaryamathim | 372cd86 | 2023-11-14 18:12:23 +0000 | [diff] [blame] | 65 |     ...  Run IPMI Command  ${IPMI_RAW_CMD['Cold Reset']['reset'][0]} 0x00 | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 66 |  | 
 | 67 |  | 
 | 68 | Verify Cold Reset Impact On Sensor Threshold Via IPMI | 
 | 69 |     [Documentation]  Modify sensor threshold, perform cold reset, | 
 | 70 |     ...  and verify if sensor threshold reverts back to initial value. | 
 | 71 |     [Tags]  Verify_Cold_Reset_Impact_On_Sensor_Threshold_Via_IPMI | 
 | 72 |  | 
 | 73 |     # Get sensor list. | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 74 |     ${sensor_list}=  Get Sensor List | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 75 |  | 
 | 76 |     # Get initial sensor threshold readings. | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 77 |     ${sensor_name}  ${sensor_threshold}=  Get The Sensor Name And Threshold  ${sensor_list} | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 78 |  | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 79 |     ${threshold_key_list}=  Get Dictionary Keys  ${sensor_threshold} | 
 | 80 |     ${random_threshold_key}=  Evaluate  random.choice(${threshold_key_list})  random | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 81 |  | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 82 |     ${old_threshold_value}=  Get From Dictionary  ${sensor_threshold}  ${random_threshold_key} | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 83 |  | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 84 |     # Modify Default Threshold Value For An Sensor To Set An New Threshold Value | 
 | 85 |     ${new_settable_threshold_value}=  Modify Default Sensor Threshold Value  ${old_threshold_value} | 
 | 86 |  | 
 | 87 |     # Set/Get sensor threshold for given sensor and compare with initial reading. | 
 | 88 |     ${new_threshold_value}=  Set And Get Sensor Threshold For given Sensor  ${sensor_name}  ${random_threshold_key} | 
 | 89 |     ...  ${new_settable_threshold_value} | 
 | 90 |  | 
 | 91 |     Should Not Be Equal  ${new_threshold_value}  ${old_threshold_value} | 
 | 92 |  | 
 | 93 |     # Cold Reset Via IPMI raw command. | 
| ishwaryamathim | 372cd86 | 2023-11-14 18:12:23 +0000 | [diff] [blame] | 94 |     Run IPMI Command  ${IPMI_RAW_CMD['Cold Reset']['reset'][0]} | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 95 |  | 
 | 96 |     # Get the BMC Status. | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 97 |     Wait Until Keyword Succeeds  3 min  10 sec  Is BMC Unpingable | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 98 |     Wait Until Keyword Succeeds  10 min  10 sec  Is BMC Operational | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 99 |  | 
 | 100 |     # Get sensor data for the sensor identified. | 
 | 101 |     ${data_after_coldreset}=  Wait Until Keyword Succeeds  2 min  30 sec | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 102 |     ...  Run IPMI Standard Command  sensor | grep -i "${sensor_name}" | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 103 |  | 
 | 104 |     # Get sensor threshold readings after BMC restarts. | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 105 |     ${threshold_value_after_reset}=  Getting Sensor Threshold Value Based On Threshold Key  ${random_threshold_key}  ${sensor_name} | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 106 |  | 
 | 107 |     # Compare with initial sensor threshold values. | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 108 |     Should Be Equal  ${threshold_value_after_reset}  ${old_threshold_value} | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 109 |  | 
 | 110 | *** Keywords *** | 
 | 111 |  | 
 | 112 | Get Sensor List | 
 | 113 |     [Documentation]  To get the list of sensors via IPMI sensor list. | 
 | 114 |  | 
 | 115 |     # BMC may take time to populate all the sensors once BMC Cold reset completes. | 
 | 116 |     ${data}=  Wait Until Keyword Succeeds  2 min  30 sec | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 117 |     ...  Run IPMI Standard Command   sensor | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 118 |  | 
| George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 119 |     RETURN  ${data} | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 120 |  | 
| chithrag | 6b279b3 | 2022-05-05 08:28:05 +0000 | [diff] [blame] | 121 | Get The Sensor Name And Threshold | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 122 |     [Documentation]  To get the sensor threshold for given sensor using IPMI. | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 123 |     [Arguments]  ${sensor_list} | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 124 |  | 
 | 125 |     # Description of Argument(s): | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 126 |     #    ${sensor_list}    All the sensors listed with ipmi sensor list command. | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 127 |  | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 128 |     @{tmp_list}=  Create List | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 129 |  | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 130 |     @{sensor_list_lines}=  Split To Lines  ${sensor_list} | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 131 |  | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 132 |     # Omit the discrete sensor and create an threshold sensor name list | 
 | 133 |     FOR  ${sensor}  IN  @{sensor_list_lines} | 
 | 134 |       ${discrete_sensor_status}=  Run Keyword And Return Status  Should Contain  ${sensor}  discrete | 
| Sridevi Ramesh | ac15572 | 2025-05-02 05:09:40 -0500 | [diff] [blame] | 135 |       IF  '${discrete_sensor_status}' == 'True'  CONTINUE | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 136 |       ${sensor_details}=  Split String  ${sensor}  | | 
 | 137 |       ${get_sensor_name}=  Get From List  ${sensor_details}  0 | 
 | 138 |       ${sensor_name}=  Set Variable  ${get_sensor_name.strip()} | 
 | 139 |       Append To List  ${tmp_list}  ${sensor_name} | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 140 |     END | 
 | 141 |  | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 142 |     ${sensor_count}=  Get Length  ${tmp_list} | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 143 |  | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 144 |     FOR  ${RANGE}  IN RANGE  0  ${sensor_count} | 
 | 145 |       ${random_sensor}  ${sensor_threshold}=  Selecting Random Sensor Name And Threshold Value  ${tmp_list}  ${sensor_list} | 
 | 146 |       ${threshold_dict_count}=  Get Length  ${sensor_threshold} | 
| Sridevi Ramesh | b0a5a6d | 2025-04-30 07:14:07 -0500 | [diff] [blame] | 147 |       IF  '${threshold_dict_count}' != '0'  BREAK | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 148 |       Remove Values From List  ${tmp_list}  ${random_sensor} | 
 | 149 |     END | 
| chithrag | ff43db9 | 2022-03-01 13:13:48 +0000 | [diff] [blame] | 150 |  | 
| George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 151 |     RETURN  ${random_sensor}  ${sensor_threshold} | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 152 |  | 
 | 153 | Selecting Random Sensor Name And Threshold Value | 
 | 154 |     [Documentation]  Select Random Sensor Name And Threshold Values. | 
 | 155 |     [Arguments]  ${tmp_list}  ${sensor_list} | 
 | 156 |  | 
 | 157 |     # Selecting random sensors from sensor list | 
 | 158 |     ${random_sensor_name}=  Evaluate  random.choice(${tmp_list})  random | 
 | 159 |  | 
 | 160 |     # Create Dictionary For Threshold Key With Threshold Values | 
 | 161 |     &{tmp_dict}=  Create Dictionary | 
 | 162 |     ${sensor_threshold}=  Get Lines Containing String  ${sensor_list}  ${random_sensor_name} | 
 | 163 |     @{ipmi_sensor}=  Split String  ${sensor_threshold}  | | 
 | 164 |     ${get_ipmi_lower_non_recoverable_threshold}=  Get From List  ${ipmi_sensor}  4 | 
 | 165 |     ${ipmi_lower_non_recoverable_threshold}=  Set Variable  ${get_ipmi_lower_non_recoverable_threshold.strip()} | 
 | 166 |     ${lower_non_recoverable_threshold_status}=  Run Keyword And Return Status  Should Not Contain | 
 | 167 |     ...  ${ipmi_lower_non_recoverable_threshold}  na | 
| George Keishing | 1f8baa2 | 2025-05-15 23:50:56 +0530 | [diff] [blame] | 168 |     IF  '${lower_non_recoverable_threshold_status}' == 'True' | 
 | 169 |         Set To Dictionary  ${tmp_dict}  lnr  ${ipmi_lower_non_recoverable_threshold} | 
 | 170 |     END | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 171 |  | 
 | 172 |     ${get_ipmi_lower_critical_threshold}=  Get From List  ${ipmi_sensor}  5 | 
 | 173 |     ${ipmi_lower_critical_threshold}=  Set Variable  ${get_ipmi_lower_critical_threshold.strip()} | 
 | 174 |     ${lower_critical_threshold_status}=  Run Keyword And Return Status  Should Not Contain | 
 | 175 |     ...  ${ipmi_lower_critical_threshold}  na | 
| George Keishing | 1f8baa2 | 2025-05-15 23:50:56 +0530 | [diff] [blame] | 176 |     IF  '${lower_critical_threshold_status}' == 'True' | 
 | 177 |         Set To Dictionary  ${tmp_dict}  lcr  ${ipmi_lower_critical_threshold} | 
 | 178 |     END | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 179 |  | 
 | 180 |     ${get_ipmi_lower_non_critical_threshold}=  Get From List  ${ipmi_sensor}  6 | 
 | 181 |     ${ipmi_lower_non_critical_threshold}=  Set Variable  ${get_ipmi_lower_non_critical_threshold.strip()} | 
 | 182 |     ${lower_non_critical_threshold_status}=  Run Keyword And Return Status  Should Not Contain | 
 | 183 |     ...  ${ipmi_lower_non_critical_threshold}  na | 
| George Keishing | 1f8baa2 | 2025-05-15 23:50:56 +0530 | [diff] [blame] | 184 |     IF  '${lower_non_critical_threshold_status}' == 'True' | 
 | 185 |         Set To Dictionary  ${tmp_dict}  lnc  ${ipmi_lower_non_critical_threshold} | 
 | 186 |     END | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 187 |  | 
 | 188 |     ${get_ipmi_upper_non_critical_threshold}=  Get From List  ${ipmi_sensor}  7 | 
 | 189 |     ${ipmi_upper_non_critical_threshold}=  Set Variable  ${get_ipmi_upper_non_critical_threshold.strip()} | 
 | 190 |     ${upper_non_critical_threshold_status}=  Run Keyword And Return Status  Should Not Contain | 
 | 191 |     ...  ${ipmi_upper_non_critical_threshold}  na | 
| George Keishing | 1f8baa2 | 2025-05-15 23:50:56 +0530 | [diff] [blame] | 192 |     IF  '${upper_non_critical_threshold_status}' == 'True' | 
 | 193 |         Set To Dictionary  ${tmp_dict}  unc  ${ipmi_upper_non_critical_threshold} | 
 | 194 |     END | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 195 |  | 
 | 196 |     ${get_ipmi_upper_critical_threshold}=  Get From List  ${ipmi_sensor}  8 | 
 | 197 |     ${ipmi_upper_critical_threshold}=  Set Variable  ${get_ipmi_upper_critical_threshold.strip()} | 
 | 198 |     ${upper_critical_threshold_status}=  Run Keyword And Return Status  Should Not Contain | 
 | 199 |     ...  ${ipmi_upper_critical_threshold}  na | 
| George Keishing | 1f8baa2 | 2025-05-15 23:50:56 +0530 | [diff] [blame] | 200 |     IF  '${upper_critical_threshold_status}' == 'True' | 
 | 201 |         Set To Dictionary  ${tmp_dict}  ucr  ${ipmi_upper_critical_threshold} | 
 | 202 |     END | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 203 |  | 
 | 204 |     ${get_ipmi_upper_non_recoverable_threshold}=  Get From List  ${ipmi_sensor}  9 | 
 | 205 |     ${ipmi_upper_non_recoverable_threshold}=  Set Variable  ${get_ipmi_upper_non_recoverable_threshold.strip()} | 
 | 206 |     ${upper_non_recoverable_threshold_status}=  Run Keyword And Return Status  Should Not Contain | 
 | 207 |     ...  ${ipmi_upper_non_recoverable_threshold}  na | 
| George Keishing | 1f8baa2 | 2025-05-15 23:50:56 +0530 | [diff] [blame] | 208 |     IF  '${upper_non_recoverable_threshold_status}' == 'True' | 
 | 209 |         Set To Dictionary  ${tmp_dict}  unr  ${ipmi_upper_non_recoverable_threshold} | 
 | 210 |     END | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 211 |  | 
| George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 212 |     RETURN  ${random_sensor_name}  ${tmp_dict} | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 213 |  | 
 | 214 | Modify Default Sensor Threshold Value | 
 | 215 |     [Documentation]  Modify Default Sensor Threshold Value with adding 100 to old threshold values. | 
 | 216 |     [Arguments]  ${old_threshold} | 
 | 217 |  | 
 | 218 |     ${new_threshold}=  Evaluate  ${old_threshold} + 100 | 
 | 219 |  | 
| George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 220 |     RETURN  ${new_threshold} | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 221 |  | 
 | 222 | Set And Get Sensor Threshold For given Sensor | 
 | 223 |     [Documentation]  Set/Get Sensor Threshold for given sensor Via IPMI. | 
 | 224 |     [Arguments]  ${sensor_name}  ${random_threshold_key}  ${new_settable_threshold_value} | 
 | 225 |  | 
 | 226 |     # Set New Threshold Value To The Randomly Selected Sensor. | 
 | 227 |     Run IPMI Standard Command  sensor thresh "${sensor_name}" ${random_threshold_key} ${new_settable_threshold_value} | 
 | 228 |  | 
 | 229 |     Sleep  10s | 
 | 230 |  | 
 | 231 |     ${sensor_new_threshold_value}=  Getting Sensor Threshold Value Based On Threshold Key  ${random_threshold_key}  ${sensor_name} | 
 | 232 |  | 
| George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 233 |     RETURN  ${sensor_new_threshold_value} | 
| ganesanb | 29a2421 | 2022-05-11 19:49:40 +0530 | [diff] [blame] | 234 |  | 
 | 235 | Getting Sensor Threshold Value Based On Threshold Key | 
 | 236 |     [Documentation]  Getting Particular Sensor Threshold Value Based On Sensor Name And Threshold Key. | 
 | 237 |     [Arguments]  ${threshold_key}  ${sensor_name} | 
 | 238 |  | 
 | 239 |     # After Setting Threshold Value, Get New Sensor Threshold Value. | 
 | 240 |     ${new_data}=  Run IPMI Standard Command  sensor | grep -i "${sensor_name}" | 
 | 241 |     ${new_sensor_details}=  Split String  ${new_data}  | | 
 | 242 |  | 
 | 243 |     ${index_value}=  Set Variable If | 
 | 244 |     ...  '${threshold_key}' == 'lnr'  ${4} | 
 | 245 |     ...  '${threshold_key}' == 'lcr'  ${5} | 
 | 246 |     ...  '${threshold_key}' == 'lnc'  ${6} | 
 | 247 |     ...  '${threshold_key}' == 'unc'  ${7} | 
 | 248 |     ...  '${threshold_key}' == 'ucr'  ${8} | 
 | 249 |     ...  '${threshold_key}' == 'unr'  ${9} | 
 | 250 |  | 
 | 251 |     ${get_sensor_new_threshold_value}=  Get From List  ${new_sensor_details}  ${index_value} | 
 | 252 |     ${sensor_new_threshold_value}=  Set Variable  ${get_sensor_new_threshold_value.strip()} | 
 | 253 |  | 
| George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 254 |     RETURN  ${sensor_new_threshold_value} |