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 | |
| 8 | *** Test Cases *** |
| 9 | |
| 10 | Verify Disabling And Enabling IPMI Via Host |
| 11 | [Documentation] Verify disabling and enabling IPMI via host. |
| 12 | [Tags] Verify_Disabling_And_Enabling_IPMI_Via_Host |
| 13 | [Teardown] Run Keywords FFDC On Test Case Fail |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 14 | ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 15 | |
| 16 | # Disable IPMI and verify |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 17 | Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 18 | Run Keyword and Expect Error *Unable to establish IPMI* |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 19 | ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 20 | |
| 21 | # Enable IPMI and verify |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 22 | Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
| 23 | ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 24 | |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 25 | ${openbmc_host_name} ${openbmc_ip}= Get Host Name IP host=${OPENBMC_HOST} |
| 26 | Rprint Vars lan_print_info openbmc_ip |
| 27 | Valid Value lan_print_info['IP Address'] ['${openbmc_ip}'] |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 28 | |
| 29 | |
| 30 | Verify Disabling IPMI Via OOB IPMI |
| 31 | [Documentation] Verify disabling IPMI via out of band IPMI. |
| 32 | [Tags] Verify_Disabling_IPMI_Via_OOB_IPMI |
| 33 | [Teardown] Run Keywords FFDC On Test Case Fail |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 34 | ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 35 | |
| 36 | # Disable IPMI via OOB IPMI and verify |
| 37 | Run Keyword and Expect Error *IPMI response is NULL* |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 38 | ... Run IPMI Standard Command lan set ${CHANNEL_NUMBER} access off |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 39 | Run Keyword and Expect Error *Unable to establish IPMI* |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 40 | ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 41 | |
| 42 | # Enable IPMI via Host and verify |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 43 | Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
| 44 | ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 45 | |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 46 | ${openbmc_host_name} ${openbmc_ip}= Get Host Name IP host=${OPENBMC_HOST} |
| 47 | Rprint Vars lan_print_info openbmc_ip |
| 48 | Valid Value lan_print_info['IP Address'] ['${openbmc_ip}'] |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 49 | |
| 50 | |
| 51 | Verify IPMI Disable Persistency After BMC Reboot |
| 52 | [Documentation] Verify IPMI disable persistency after BMC reboot. |
| 53 | [Tags] Verify_IPMI_Disable_Persistency_After_BMC_Reboot |
| 54 | [Teardown] Run Keywords FFDC On Test Case Fail |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 55 | ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 56 | |
| 57 | # Disable IPMI and reboot BMC. |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 58 | Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 59 | OBMC Reboot (run) |
| 60 | |
| 61 | # Verify that IPMI remains disabled after reboot. |
| 62 | Run Keyword and Expect Error *Unable to establish IPMI* |
Tony Lee | b5eea69 | 2019-12-30 13:41:14 +0800 | [diff] [blame] | 63 | ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER} |
Rahul Maheshwari | 8ab1396 | 2019-07-29 23:42:47 -0500 | [diff] [blame] | 64 | |