Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Module to test IPMI disable functionality. |
| 3 | |
| 4 | Resource ../lib/ipmi_client.robot |
| 5 | Resource ../lib/openbmc_ffdc.robot |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 6 | Library ../lib/ipmi_utils.py |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 7 | |
George Keishing | 87dc442 | 2023-10-20 12:56:30 +0530 | [diff] [blame] | 8 | Force Tags IPMI_Disable |
| 9 | |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 10 | *** Test Cases *** |
| 11 | |
| 12 | Verify Disabling And Enabling IPMI Via Host |
| 13 | [Documentation] Verify disabling and enabling IPMI via host. |
| 14 | [Tags] Verify_Disabling_And_Enabling_IPMI_Via_Host |
| 15 | [Teardown] Run Keywords FFDC On Test Case Fail |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 16 | ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 17 | |
| 18 | # Disable IPMI and verify |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 19 | Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 20 | Run Keyword and Expect Error *Unable to establish IPMI* |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 21 | ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 22 | |
| 23 | # Enable IPMI and verify |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 24 | Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
| 25 | ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 26 | |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 27 | ${openbmc_host_name} ${openbmc_ip}= Get Host Name IP host=${OPENBMC_HOST} |
| 28 | Rprint Vars lan_print_info openbmc_ip |
| 29 | Valid Value lan_print_info['IP Address'] ['${openbmc_ip}'] |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 30 | |
| 31 | |
| 32 | Verify Disabling IPMI Via OOB IPMI |
| 33 | [Documentation] Verify disabling IPMI via out of band IPMI. |
| 34 | [Tags] Verify_Disabling_IPMI_Via_OOB_IPMI |
| 35 | [Teardown] Run Keywords FFDC On Test Case Fail |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 36 | ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 37 | |
| 38 | # Disable IPMI via OOB IPMI and verify |
George Keishing | 9e5626d | 2024-03-26 11:40:20 +0530 | [diff] [blame] | 39 | ${resp}= Run Keyword and Ignore Error |
| 40 | ... Run External IPMI Standard Command lan set ${CHANNEL_NUMBER} access off |
ishwaryamathim | b5e93e1 | 2023-11-10 08:43:41 +0000 | [diff] [blame] | 41 | Should Contain any ${resp} ${EMPTY} Set Channel Access for channel ${CHANNEL_NUMBER} was successful. |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 42 | Run Keyword and Expect Error *Unable to establish IPMI* |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 43 | ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 44 | |
| 45 | # Enable IPMI via Host and verify |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 46 | Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
| 47 | ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 48 | |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 49 | ${openbmc_host_name} ${openbmc_ip}= Get Host Name IP host=${OPENBMC_HOST} |
| 50 | Rprint Vars lan_print_info openbmc_ip |
| 51 | Valid Value lan_print_info['IP Address'] ['${openbmc_ip}'] |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 52 | |
| 53 | |
| 54 | Verify IPMI Disable Persistency After BMC Reboot |
| 55 | [Documentation] Verify IPMI disable persistency after BMC reboot. |
| 56 | [Tags] Verify_IPMI_Disable_Persistency_After_BMC_Reboot |
| 57 | [Teardown] Run Keywords FFDC On Test Case Fail |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 58 | ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 59 | |
| 60 | # Disable IPMI and reboot BMC. |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 61 | Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 62 | OBMC Reboot (run) |
| 63 | |
| 64 | # Verify that IPMI remains disabled after reboot. |
| 65 | Run Keyword and Expect Error *Unable to establish IPMI* |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 66 | ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 67 | |