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 |
ishwaryamathim | b5e93e1 | 2023-11-10 08:43:41 +0000 | [diff] [blame] | 39 | ${resp}= Run Keyword and Ignore Error Run External IPMI Standard Command lan set ${CHANNEL_NUMBER} access off |
| 40 | 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] | 41 | Run Keyword and Expect Error *Unable to establish IPMI* |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 42 | ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 43 | |
| 44 | # Enable IPMI via Host and verify |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 45 | Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
| 46 | ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 47 | |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 48 | ${openbmc_host_name} ${openbmc_ip}= Get Host Name IP host=${OPENBMC_HOST} |
| 49 | Rprint Vars lan_print_info openbmc_ip |
| 50 | Valid Value lan_print_info['IP Address'] ['${openbmc_ip}'] |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 51 | |
| 52 | |
| 53 | Verify IPMI Disable Persistency After BMC Reboot |
| 54 | [Documentation] Verify IPMI disable persistency after BMC reboot. |
| 55 | [Tags] Verify_IPMI_Disable_Persistency_After_BMC_Reboot |
| 56 | [Teardown] Run Keywords FFDC On Test Case Fail |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 57 | ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 58 | |
| 59 | # Disable IPMI and reboot BMC. |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 60 | Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 61 | OBMC Reboot (run) |
| 62 | |
| 63 | # Verify that IPMI remains disabled after reboot. |
| 64 | Run Keyword and Expect Error *Unable to establish IPMI* |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 65 | ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 66 | |