Rahul Maheshwari | 71525ad | 2019-08-01 05:54:06 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Module to test IPMI asset tag functionality. |
| 4 | Resource ../lib/ipmi_client.robot |
| 5 | Resource ../lib/openbmc_ffdc.robot |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 6 | Resource ../lib/bmc_network_utils.robot |
Tony Lee | 3fdd31e | 2020-02-15 11:21:40 +0800 | [diff] [blame] | 7 | Variables ../data/ipmi_raw_cmd_table.py |
Tony Lee | 18c6f9a | 2020-02-18 17:00:20 +0800 | [diff] [blame] | 8 | Variables ../data/ipmi_variable.py |
| 9 | Library ../lib/bmc_network_utils.py |
| 10 | Library ../lib/ipmi_utils.py |
Rahul Maheshwari | 71525ad | 2019-08-01 05:54:06 -0500 | [diff] [blame] | 11 | |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 12 | Suite Setup IPMI General Test Suite Setup |
Rahul Maheshwari | 71525ad | 2019-08-01 05:54:06 -0500 | [diff] [blame] | 13 | Test Teardown FFDC On Test Case Fail |
| 14 | |
| 15 | *** Test Cases *** |
| 16 | |
| 17 | Verify Get DCMI Capabilities |
| 18 | [Documentation] Verify get DCMI capabilities command output. |
| 19 | [Tags] Verify_Get_DCMI_Capabilities |
| 20 | ${cmd_output}= Run IPMI Standard Command dcmi discover |
| 21 | |
| 22 | @{supported_capabilities}= Create List |
| 23 | # Supported DCMI capabilities: |
| 24 | ... Mandatory platform capabilties |
| 25 | ... Optional platform capabilties |
| 26 | ... Power management available |
| 27 | ... Managebility access capabilties |
| 28 | ... In-band KCS channel available |
| 29 | # Mandatory platform attributes: |
| 30 | ... 200 SEL entries |
| 31 | ... SEL automatic rollover is enabled |
| 32 | # Optional Platform Attributes: |
| 33 | ... Slave address of device: 0h (8bits)(Satellite/External controller) |
| 34 | ... Channel number is 0h (Primary BMC) |
| 35 | ... Device revision is 0 |
| 36 | # Manageability Access Attributes: |
| 37 | ... Primary LAN channel number: 1 is available |
| 38 | ... Secondary LAN channel is not available for OOB |
| 39 | ... No serial channel is available |
| 40 | |
Rahul Maheshwari | 3a1d991 | 2020-02-25 03:13:14 -0600 | [diff] [blame] | 41 | FOR ${capability} IN @{supported_capabilities} |
| 42 | Should Contain ${cmd_output} ${capability} ignore_case=True |
| 43 | ... msg=Supported DCMI capabilities not present. |
| 44 | END |
Tony Lee | 3fdd31e | 2020-02-15 11:21:40 +0800 | [diff] [blame] | 45 | |
| 46 | |
| 47 | Test Get Self Test Results via IPMI Raw Command |
| 48 | [Documentation] Get self test results via IPMI raw command and verify the output. |
George Keishing | b98036a | 2022-01-31 12:39:47 -0600 | [diff] [blame] | 49 | [Tags] Test_Get_Self_Test_Results_via_IPMI_Raw_Command |
Tony Lee | 3fdd31e | 2020-02-15 11:21:40 +0800 | [diff] [blame] | 50 | |
| 51 | ${resp}= Run IPMI Standard Command raw ${IPMI_RAW_CMD['Self_Test_Results']['Get'][0]} |
| 52 | |
| 53 | # 55h = No error. All Self Tests Passed. |
| 54 | # 56h = Self Test function not implemented in this controller. |
| 55 | Should Contain Any ${resp} 55 00 56 00 |
| 56 | |
| 57 | |
| 58 | Test Get Device GUID Via IPMI Raw Command |
| 59 | [Documentation] Get device GUID via IPMI raw command and verify it using Redfish. |
George Keishing | b98036a | 2022-01-31 12:39:47 -0600 | [diff] [blame] | 60 | [Tags] Test_Get_Device_GUID_Via_IPMI_Raw_Command |
Tony Lee | 3fdd31e | 2020-02-15 11:21:40 +0800 | [diff] [blame] | 61 | [Teardown] Run Keywords Redfish.Logout AND FFDC On Test Case Fail |
| 62 | # Get GUIDS via IPMI. |
| 63 | # This should match the /redfish/v1/Managers/bmc's UUID data. |
| 64 | ${guids}= Run IPMI Standard Command raw ${IPMI_RAW_CMD['Device GUID']['Get'][0]} |
| 65 | # Reverse the order and remove space delims. |
| 66 | ${guids}= Split String ${guids} |
| 67 | Reverse List ${guids} |
| 68 | ${guids}= Evaluate "".join(${guids}) |
| 69 | |
| 70 | Redfish.Login |
| 71 | ${uuid}= Redfish.Get Attribute /redfish/v1/Managers/bmc UUID |
| 72 | ${uuid}= Remove String ${uuid} - |
| 73 | |
| 74 | Rprint Vars guids uuid |
| 75 | Valid Value uuid ['${guids}'] |
Tony Lee | 18c6f9a | 2020-02-18 17:00:20 +0800 | [diff] [blame] | 76 | |
| 77 | |
| 78 | Verify Get Channel Info via IPMI |
| 79 | [Documentation] Verify get channel info via IPMI. |
| 80 | [Tags] Verify_Get_Channel_Info_via_IPMI |
| 81 | |
| 82 | # Get channel info via ipmi command "ipmitool channel info [channel number]". |
Tony Lee | 87c9cb9 | 2020-03-04 14:47:09 +0800 | [diff] [blame] | 83 | # Verify channel info with files "channel_access_volatile.json", "channel_access_nv.json" |
| 84 | # and "channel_config.json" in BMC. |
Tony Lee | 18c6f9a | 2020-02-18 17:00:20 +0800 | [diff] [blame] | 85 | |
| 86 | # Example output from 'Get Channel Info': |
| 87 | # channel_info: |
| 88 | # [channel_0x2_info]: |
| 89 | # [channel_medium_type]: 802.3 LAN |
| 90 | # [channel_protocol_type]: IPMB-1.0 |
| 91 | # [session_support]: multi-session |
| 92 | # [active_session_count]: 0 |
| 93 | # [protocol_vendor_id]: 7154 |
Tony Lee | 87c9cb9 | 2020-03-04 14:47:09 +0800 | [diff] [blame] | 94 | # [volatile(active)_settings]: |
| 95 | # [alerting]: enabled |
| 96 | # [per-message_auth]: enabled |
| 97 | # [user_level_auth]: enabled |
| 98 | # [access_mode]: always available |
| 99 | # [Non-Volatile Settings]: |
| 100 | # [alerting]: enabled |
| 101 | # [per-message_auth]: enabled |
| 102 | # [user_level_auth]: enabled |
| 103 | # [access_mode]: always available |
Tony Lee | 18c6f9a | 2020-02-18 17:00:20 +0800 | [diff] [blame] | 104 | |
| 105 | ${channel_info_ipmi}= Get Channel Info ${CHANNEL_NUMBER} |
| 106 | ${active_channel_config}= Get Active Channel Config |
Tony Lee | 87c9cb9 | 2020-03-04 14:47:09 +0800 | [diff] [blame] | 107 | ${channel_volatile_data_config}= Get Channel Access Config /run/ipmi/channel_access_volatile.json |
| 108 | ${channel_nv_data_config}= Get Channel Access Config /var/lib/ipmi/channel_access_nv.json |
| 109 | |
George Keishing | 33be359 | 2022-03-08 08:52:25 -0600 | [diff] [blame] | 110 | Rprint Vars channel_info_ipmi |
| 111 | Rprint Vars active_channel_config |
| 112 | Rprint Vars channel_volatile_data_config |
| 113 | Rprint Vars channel_nv_data_config |
Tony Lee | 18c6f9a | 2020-02-18 17:00:20 +0800 | [diff] [blame] | 114 | |
| 115 | Valid Value medium_type_ipmi_conf_map['${channel_info_ipmi['channel_0x${CHANNEL_NUMBER}_info']['channel_medium_type']}'] |
| 116 | ... ['${active_channel_config['${CHANNEL_NUMBER}']['channel_info']['medium_type']}'] |
| 117 | |
| 118 | Valid Value protocol_type_ipmi_conf_map['${channel_info_ipmi['channel_0x${CHANNEL_NUMBER}_info']['channel_protocol_type']}'] |
| 119 | ... ['${active_channel_config['${CHANNEL_NUMBER}']['channel_info']['protocol_type']}'] |
| 120 | |
| 121 | Valid Value channel_info_ipmi['channel_0x${CHANNEL_NUMBER}_info']['session_support'] |
| 122 | ... ['${active_channel_config['${CHANNEL_NUMBER}']['channel_info']['session_supported']}'] |
| 123 | |
| 124 | Valid Value channel_info_ipmi['channel_0x${CHANNEL_NUMBER}_info']['active_session_count'] |
| 125 | ... ['${active_channel_config['${CHANNEL_NUMBER}']['active_sessions']}'] |
| 126 | # IPMI Spec: The IPMI Enterprise Number is: 7154 (decimal) |
| 127 | Valid Value channel_info_ipmi['channel_0x${CHANNEL_NUMBER}_info']['protocol_vendor_id'] ['7154'] |
| 128 | |
Tony Lee | 87c9cb9 | 2020-03-04 14:47:09 +0800 | [diff] [blame] | 129 | # Verify volatile(active)_settings |
| 130 | Valid Value disabled_ipmi_conf_map['${channel_info_ipmi['volatile(active)_settings']['alerting']}'] |
| 131 | ... ['${channel_volatile_data_config['${CHANNEL_NUMBER}']['alerting_disabled']}'] |
Tony Lee | 18c6f9a | 2020-02-18 17:00:20 +0800 | [diff] [blame] | 132 | |
Tony Lee | 87c9cb9 | 2020-03-04 14:47:09 +0800 | [diff] [blame] | 133 | Valid Value disabled_ipmi_conf_map['${channel_info_ipmi['volatile(active)_settings']['per-message_auth']}'] |
| 134 | ... ['${channel_volatile_data_config['${CHANNEL_NUMBER}']['per_msg_auth_disabled']}'] |
Tony Lee | 18c6f9a | 2020-02-18 17:00:20 +0800 | [diff] [blame] | 135 | |
Tony Lee | 87c9cb9 | 2020-03-04 14:47:09 +0800 | [diff] [blame] | 136 | Valid Value disabled_ipmi_conf_map['${channel_info_ipmi['volatile(active)_settings']['user_level_auth']}'] |
| 137 | ... ['${channel_volatile_data_config['${CHANNEL_NUMBER}']['user_auth_disabled']}'] |
Tony Lee | 18c6f9a | 2020-02-18 17:00:20 +0800 | [diff] [blame] | 138 | |
Tony Lee | 87c9cb9 | 2020-03-04 14:47:09 +0800 | [diff] [blame] | 139 | Valid Value access_mode_ipmi_conf_map['${channel_info_ipmi['volatile(active)_settings']['access_mode']}'] |
| 140 | ... ['${channel_volatile_data_config['${CHANNEL_NUMBER}']['access_mode']}'] |
| 141 | |
| 142 | # Verify Non-Volatile Settings |
| 143 | Valid Value disabled_ipmi_conf_map['${channel_info_ipmi['non-volatile_settings']['alerting']}'] |
| 144 | ... ['${channel_nv_data_config['${CHANNEL_NUMBER}']['alerting_disabled']}'] |
| 145 | |
| 146 | Valid Value disabled_ipmi_conf_map['${channel_info_ipmi['non-volatile_settings']['per-message_auth']}'] |
| 147 | ... ['${channel_nv_data_config['${CHANNEL_NUMBER}']['per_msg_auth_disabled']}'] |
| 148 | |
| 149 | Valid Value disabled_ipmi_conf_map['${channel_info_ipmi['non-volatile_settings']['user_level_auth']}'] |
| 150 | ... ['${channel_nv_data_config['${CHANNEL_NUMBER}']['user_auth_disabled']}'] |
| 151 | |
| 152 | Valid Value access_mode_ipmi_conf_map['${channel_info_ipmi['non-volatile_settings']['access_mode']}'] |
| 153 | ... ['${channel_nv_data_config['${CHANNEL_NUMBER}']['access_mode']}'] |
Tony Lee | 0754c5f | 2020-03-13 19:38:24 +0800 | [diff] [blame] | 154 | |
| 155 | |
| 156 | Test Get Channel Authentication Capabilities via IPMI |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 157 | [Documentation] Verify channel authentication capabilities via IPMI. |
Tony Lee | 0754c5f | 2020-03-13 19:38:24 +0800 | [diff] [blame] | 158 | [Tags] Test_Get_Channel_Authentication_Capabilities_via_IPMI |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 159 | [Template] Verify Channel Auth Capabilities |
Tony Lee | 0754c5f | 2020-03-13 19:38:24 +0800 | [diff] [blame] | 160 | |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 161 | FOR ${channel} IN @{active_channel_list} |
| 162 | FOR ${privilege} IN 4 3 2 |
| 163 | # Input Channel Privilege Level |
| 164 | ${channel} ${privilege} |
| 165 | END |
| 166 | END |
Tony Lee | 0754c5f | 2020-03-13 19:38:24 +0800 | [diff] [blame] | 167 | |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 168 | |
| 169 | Test Get Channel Authentication Capabilities IPMI Command For Invalid Channel |
| 170 | [Documentation] Verify get channel authentication capabilities for invalid channel. |
| 171 | [Tags] Test_Get_Channel_Authentication_Capabilities_IPMI_Command_For_Invalid_Channel |
George Keishing | 13b7afd | 2022-05-23 07:36:16 -0500 | [diff] [blame] | 172 | [Template] Verify Channel Auth Capabilities For Invalid Channel |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 173 | |
| 174 | FOR ${channel} IN @{inactive_channel_list} |
| 175 | # Input Channel |
| 176 | ${channel} |
| 177 | END |
| 178 | |
| 179 | |
George Keishing | 13b7afd | 2022-05-23 07:36:16 -0500 | [diff] [blame] | 180 | Verify Get Channel Authentication Capabilities IPMI Raw Command With Invalid Data Length |
| 181 | [Documentation] Verify get channel authentication capabilities IPMI raw command with invalid data length. |
| 182 | [Tags] Verify_Get_Channel_Authentication_Capabilities_IPMI_Raw_Command_With_Invalid_Data_Length |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 183 | [Template] Verify Channel Auth Command For Invalid Data Length |
| 184 | |
| 185 | # Bytes |
| 186 | low |
| 187 | high |
Tony Lee | 2d07182 | 2020-02-19 16:37:58 +0800 | [diff] [blame] | 188 | |
| 189 | |
| 190 | Verify Set Session Privilege Level via IPMI Raw Command |
| 191 | [Documentation] Set session privilege with given privilege level and verify the response with |
| 192 | ... expected level. |
| 193 | [Tags] Verify_Set_Session_Privilege_Level_via_IPMI_Raw_Command |
| 194 | [Template] Set Session Privilege Level And Verify |
| 195 | |
| 196 | # privilege_level expected_level |
| 197 | 0x00 04 |
| 198 | 0x02 02 |
| 199 | 0x03 03 |
| 200 | 0x04 04 |
| 201 | |
| 202 | |
George Keishing | b98036a | 2022-01-31 12:39:47 -0600 | [diff] [blame] | 203 | Verify Set Invalid Session Privilege Level Via IPMI Raw Command |
Tony Lee | 94f1a6c | 2020-03-25 10:37:46 +0800 | [diff] [blame] | 204 | [Documentation] Verify set invalid session privilege level via IPMI raw command. |
| 205 | [Tags] Verify_Set_Invalid_Session_Privilege_Level_Via_IPMI_Raw_Command |
| 206 | [Template] Set Invalid Session Privilege Level And Verify |
| 207 | |
| 208 | # invalid_privilege_level |
| 209 | 0x05 |
| 210 | 0x06 |
| 211 | 0x07 |
| 212 | 0x0F |
| 213 | |
| 214 | |
George Keishing | b98036a | 2022-01-31 12:39:47 -0600 | [diff] [blame] | 215 | Verify Close Session Via IPMI |
Tony Lee | d12b40d | 2020-03-19 10:45:21 +0800 | [diff] [blame] | 216 | [Documentation] Verify close session via IPMI. |
| 217 | [Tags] Verify_Close_Session_Via_IPMI |
| 218 | |
| 219 | # The "close session command" can be tested with any out-of-band IPMI command. |
| 220 | # When the session is about to close, it will execute the close session command at the end. |
| 221 | |
| 222 | ${cmd}= Catenate mc info -vvv 2>&1 | grep "Closed Session" |
| 223 | ${cmd_output}= Run External IPMI Standard Command ${cmd} |
| 224 | |
| 225 | Should Contain ${cmd_output} Closed Session |
| 226 | |
| 227 | |
Ashwini Chandrappa | 4ec7085 | 2021-09-07 09:10:36 -0500 | [diff] [blame] | 228 | Verify Chassis Identify via IPMI |
| 229 | [Documentation] Set chassis identify using IPMI and verify. |
| 230 | [Tags] Verify_Chassis_Identify_via_IPMI |
| 231 | [Setup] Redfish.Login |
| 232 | [Teardown] Redfish.logout |
| 233 | |
| 234 | # Set to default "chassis identify" and verify that LED blinks for 15s. |
| 235 | Run IPMI Standard Command chassis identify |
| 236 | Verify Identify LED State Via Redfish Lit |
| 237 | |
| 238 | Sleep 18s |
| 239 | Verify Identify LED State Via Redfish Off |
| 240 | |
| 241 | # Set "chassis identify" to 10s and verify that the LED blinks for 10s. |
| 242 | Run IPMI Standard Command chassis identify 10 |
| 243 | Verify Identify LED State Via Redfish Lit |
| 244 | |
| 245 | Sleep 12s |
| 246 | Verify Identify LED State Via Redfish Off |
| 247 | |
| 248 | |
| 249 | Verify Chassis Identify Off And Force Identify On via IPMI |
| 250 | [Documentation] Set chassis identify to "off" and "force" using IPMI and verify. |
| 251 | [Tags] Verify_Chassis_Identify_Off_And_Force_Identify_On_via_IPMI |
| 252 | [Setup] Redfish.Login |
| 253 | [Teardown] Redfish.logout |
| 254 | |
| 255 | # Set the LED to "Force Identify On". |
| 256 | Run IPMI Standard Command chassis identify force |
| 257 | Verify Identify LED State Via Redfish Lit |
| 258 | |
| 259 | # Set "chassis identify" to 0 and verify that the LED turns off. |
| 260 | Run IPMI Standard Command chassis identify 0 |
| 261 | Verify Identify LED State Via Redfish Off |
| 262 | |
| 263 | |
Tony Lee | 2d07182 | 2020-02-19 16:37:58 +0800 | [diff] [blame] | 264 | *** Keywords *** |
| 265 | |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 266 | IPMI General Test Suite Setup |
| 267 | [Documentation] Get active and inactive/invalid channels from channel_config.json file |
| 268 | ... in list type and set it as suite variable. |
| 269 | |
| 270 | # Get active channel list and set as suite variable. |
| 271 | @{active_channel_list}= Get Active Ethernet Channel List |
| 272 | Set Suite Variable @{active_channel_list} |
| 273 | |
| 274 | # Get Inactive/Invalid channel list and set as suite variable. |
| 275 | @{inactive_channel_list}= Get Invalid Channel Number List |
| 276 | Set Suite Variable @{inactive_channel_list} |
| 277 | |
| 278 | |
Tony Lee | 2d07182 | 2020-02-19 16:37:58 +0800 | [diff] [blame] | 279 | Set Session Privilege Level And Verify |
| 280 | [Documentation] Set session privilege with given privilege level and verify the response with |
| 281 | ... expected level. |
| 282 | [Arguments] ${privilege_level} ${expected_level} |
| 283 | # Description of argument(s): |
| 284 | # privilege_level Requested Privilege Level. |
George Keishing | 33be359 | 2022-03-08 08:52:25 -0600 | [diff] [blame] | 285 | # expected_level New Privilege Level (or present level if ‘return present privilege level’ |
| 286 | # was selected). |
Tony Lee | 2d07182 | 2020-02-19 16:37:58 +0800 | [diff] [blame] | 287 | |
Tony Lee | b49853c | 2020-06-03 15:27:56 +0800 | [diff] [blame] | 288 | ${resp}= Run External IPMI Raw Command |
Tony Lee | 94f1a6c | 2020-03-25 10:37:46 +0800 | [diff] [blame] | 289 | ... 0x06 0x3b ${privilege_level} |
Tony Lee | 2d07182 | 2020-02-19 16:37:58 +0800 | [diff] [blame] | 290 | Should Contain ${resp} ${expected_level} |
Tony Lee | 94f1a6c | 2020-03-25 10:37:46 +0800 | [diff] [blame] | 291 | |
| 292 | |
| 293 | Set Invalid Session Privilege Level And Verify |
| 294 | [Documentation] Set invalid session privilege level and verify the response. |
| 295 | [Arguments] ${privilege_level} |
| 296 | # Description of argument(s): |
| 297 | # privilege_level Requested Privilege Level. |
| 298 | |
| 299 | # Verify requested level exceeds Channel and/or User Privilege Limit. |
Tony Lee | b49853c | 2020-06-03 15:27:56 +0800 | [diff] [blame] | 300 | ${msg}= Run Keyword And Expect Error * Run External IPMI Raw Command |
Tony Lee | 94f1a6c | 2020-03-25 10:37:46 +0800 | [diff] [blame] | 301 | ... 0x06 0x3b ${privilege_level} |
| 302 | Should Contain ${msg} Unknown rsp=0x81 |
Ashwini Chandrappa | 4ec7085 | 2021-09-07 09:10:36 -0500 | [diff] [blame] | 303 | |
| 304 | |
| 305 | Verify Identify LED State Via Redfish |
| 306 | [Documentation] Verify that Redfish identify LED system with given state. |
| 307 | [Arguments] ${expected_state} |
| 308 | # Description of argument(s): |
| 309 | # expected_led_status Expected value of Identify LED. |
| 310 | |
George Keishing | b061455 | 2022-07-08 02:52:57 -0500 | [diff] [blame] | 311 | # Get the following URI(s) and iterate to find the attribute IndicatorLED. |
| 312 | # Example: |
| 313 | # /redfish/v1/Systems/system |
| 314 | # /redfish/v1/Systems/hypervisor |
| 315 | |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 316 | # Python module: get_member_list(resource_path) |
| 317 | ${systems}= Redfish_Utils.Get Member List /redfish/v1/Systems |
| 318 | FOR ${system} IN @{systems} |
| 319 | ${led_value}= Redfish.Get Attribute ${system} IndicatorLED |
George Keishing | f6b4d53 | 2022-07-08 07:07:54 -0500 | [diff] [blame] | 320 | # Get attribute return None if IndicatorLED does not exist in the URI. |
George Keishing | b061455 | 2022-07-08 02:52:57 -0500 | [diff] [blame] | 321 | Continue For Loop If '${led_value}' == 'None' |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 322 | Should Be True '${led_value}' == '${expected_state}' |
| 323 | END |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 324 | |
| 325 | |
| 326 | Verify Channel Auth Capabilities |
| 327 | [Documentation] Verify authentication capabilities for given channel and privilege. |
| 328 | [Arguments] ${channel} ${privilege_level} |
| 329 | |
| 330 | # Description of argument(s): |
| 331 | # channel Interface channel number. |
George Keishing | 13b7afd | 2022-05-23 07:36:16 -0500 | [diff] [blame] | 332 | # privilege_level User Privilege level (e.g. 4-Administator, 3-Operator, 2-Readonly). |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 333 | |
| 334 | # Python module: get_channel_auth_capabilities(channel_number, privilege_level) |
| 335 | ${channel_auth_cap}= Get Channel Auth Capabilities ${channel} ${privilege_level} |
| 336 | Rprint Vars channel_auth_cap |
| 337 | |
| 338 | Valid Value channel_auth_cap['channel_number'] ['${channel}'] |
| 339 | Valid Value channel_auth_cap['kg_status'] ['default (all zeroes)'] |
| 340 | Valid Value channel_auth_cap['per_message_authentication'] ['enabled'] |
| 341 | Valid Value channel_auth_cap['user_level_authentication'] ['enabled'] |
| 342 | Valid Value channel_auth_cap['non-null_user_names_exist'] ['yes'] |
| 343 | Valid Value channel_auth_cap['null_user_names_exist'] ['no'] |
| 344 | Valid Value channel_auth_cap['anonymous_login_enabled'] ['no'] |
| 345 | Valid Value channel_auth_cap['channel_supports_ipmi_v1.5'] ['no'] |
| 346 | Valid Value channel_auth_cap['channel_supports_ipmi_v2.0'] ['yes'] |
| 347 | |
| 348 | |
George Keishing | 13b7afd | 2022-05-23 07:36:16 -0500 | [diff] [blame] | 349 | Verify Channel Auth Capabilities For Invalid Channel |
nagarjunb22 | 9845074 | 2022-04-19 12:00:02 +0530 | [diff] [blame] | 350 | [Documentation] Verify authentication capabilities of invalid channels. |
| 351 | [Arguments] ${channel} |
| 352 | |
| 353 | # Description of argument(s): |
| 354 | # channel Interface channel number. |
| 355 | |
| 356 | ${channel_in_hex}= Convert To Hex ${channel} prefix=0x |
| 357 | ${cmd}= Catenate ${IPMI_RAW_CMD['Get Channel Auth Cap']['get'][0]} ${channel_in_hex} 0x04 |
| 358 | |
| 359 | Verify Invalid IPMI Command ${cmd} 0xcc |
| 360 | |
| 361 | |
| 362 | Verify Channel Auth Command For Invalid Data Length |
| 363 | [Documentation] Verify channel authentication command for invalid data length. |
| 364 | [Arguments] ${byte_length} |
| 365 | |
| 366 | # Description of argument(s): |
| 367 | # byte_length high or low. |
| 368 | # e.g. high - add extra byte to request data like "0x06 0x38 0x01 0x04 0x01". |
| 369 | # low - reduce bytes in actual request data like "0x06 0x38". |
| 370 | |
| 371 | ${req_cmd}= Run Keyword If '${byte_length}' == 'low' |
| 372 | ... Catenate ${IPMI_RAW_CMD['Get Channel Auth Cap']['get'][0]} ${CHANNEL_NUMBER} |
| 373 | ... ELSE |
| 374 | ... Catenate ${IPMI_RAW_CMD['Get Channel Auth Cap']['get'][0]} ${CHANNEL_NUMBER} 0x04 0x01 |
| 375 | |
| 376 | Verify Invalid IPMI Command ${req_cmd} 0xc7 |