blob: 6fd02bbff9a286931d931925026f909220823b2b [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
George Keishing9e5626d2024-03-26 11:40:20 +053039 ${resp}= Run Keyword and Ignore Error
40 ... Run External IPMI Standard Command lan set ${CHANNEL_NUMBER} access off
ishwaryamathimb5e93e12023-11-10 08:43:41 +000041 Should Contain any ${resp} ${EMPTY} Set Channel Access for channel ${CHANNEL_NUMBER} was successful.
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050042 Run Keyword and Expect Error *Unable to establish IPMI*
Tony Leeb5eea692019-12-30 13:41:14 +080043 ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050044
45 # Enable IPMI via Host and verify
Tony Leeb5eea692019-12-30 13:41:14 +080046 Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
47 ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050048
Tony Leeb5eea692019-12-30 13:41:14 +080049 ${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 Maheshwari8ab13962019-07-29 23:42:47 -050052
53
54Verify 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 Leeb5eea692019-12-30 13:41:14 +080058 ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050059
60 # Disable IPMI and reboot BMC.
Tony Leeb5eea692019-12-30 13:41:14 +080061 Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050062 OBMC Reboot (run)
63
64 # Verify that IPMI remains disabled after reboot.
65 Run Keyword and Expect Error *Unable to establish IPMI*
Tony Leeb5eea692019-12-30 13:41:14 +080066 ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050067