blob: d19073cd1cf7b9d72fbe7bb1ee83e66e56fe156c [file] [log] [blame]
Rahul Maheshwari8ab13962019-07-29 23:42:47 -05001*** Settings ***
2Documentation Module to test IPMI disable functionality.
3
4Resource ../lib/ipmi_client.robot
5Resource ../lib/openbmc_ffdc.robot
Tony Leeb5eea692019-12-30 13:41:14 +08006Library ../lib/ipmi_utils.py
Rahul Maheshwari8ab13962019-07-29 23:42:47 -05007
George Keishing87dc4422023-10-20 12:56:30 +05308Force Tags IPMI_Disable
9
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050010*** Test Cases ***
11
12Verify 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 Leeb5eea692019-12-30 13:41:14 +080016 ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050017
18 # Disable IPMI and verify
Tony Leeb5eea692019-12-30 13:41:14 +080019 Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050020 Run Keyword and Expect Error *Unable to establish IPMI*
Tony Leeb5eea692019-12-30 13:41:14 +080021 ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050022
23 # Enable IPMI and verify
Tony Leeb5eea692019-12-30 13:41:14 +080024 Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
25 ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050026
Tony Leeb5eea692019-12-30 13:41:14 +080027 ${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 Maheshwari8ab13962019-07-29 23:42:47 -050030
31
32Verify 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 Leeb5eea692019-12-30 13:41:14 +080036 ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050037
38 # Disable IPMI via OOB IPMI and verify
ishwaryamathimb5e93e12023-11-10 08:43:41 +000039 ${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 Maheshwari8ab13962019-07-29 23:42:47 -050041 Run Keyword and Expect Error *Unable to establish IPMI*
Tony Leeb5eea692019-12-30 13:41:14 +080042 ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050043
44 # Enable IPMI via Host and verify
Tony Leeb5eea692019-12-30 13:41:14 +080045 Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
46 ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050047
Tony Leeb5eea692019-12-30 13:41:14 +080048 ${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 Maheshwari8ab13962019-07-29 23:42:47 -050051
52
53Verify 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 Leeb5eea692019-12-30 13:41:14 +080057 ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050058
59 # Disable IPMI and reboot BMC.
Tony Leeb5eea692019-12-30 13:41:14 +080060 Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050061 OBMC Reboot (run)
62
63 # Verify that IPMI remains disabled after reboot.
64 Run Keyword and Expect Error *Unable to establish IPMI*
Tony Leeb5eea692019-12-30 13:41:14 +080065 ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050066