blob: e0f382ad5223a01707c34ad24a82ec47c7911d7f [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
8*** Test Cases ***
9
10Verify 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 Leeb5eea692019-12-30 13:41:14 +080014 ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050015
16 # Disable IPMI and verify
Tony Leeb5eea692019-12-30 13:41:14 +080017 Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050018 Run Keyword and Expect Error *Unable to establish IPMI*
Tony Leeb5eea692019-12-30 13:41:14 +080019 ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050020
21 # Enable IPMI and verify
Tony Leeb5eea692019-12-30 13:41:14 +080022 Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
23 ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050024
Tony Leeb5eea692019-12-30 13:41:14 +080025 ${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 Maheshwari8ab13962019-07-29 23:42:47 -050028
29
30Verify 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 Leeb5eea692019-12-30 13:41:14 +080034 ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050035
36 # Disable IPMI via OOB IPMI and verify
37 Run Keyword and Expect Error *IPMI response is NULL*
Tony Leeb5eea692019-12-30 13:41:14 +080038 ... Run IPMI Standard Command lan set ${CHANNEL_NUMBER} access off
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050039 Run Keyword and Expect Error *Unable to establish IPMI*
Tony Leeb5eea692019-12-30 13:41:14 +080040 ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050041
42 # Enable IPMI via Host and verify
Tony Leeb5eea692019-12-30 13:41:14 +080043 Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
44 ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050045
Tony Leeb5eea692019-12-30 13:41:14 +080046 ${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 Maheshwari8ab13962019-07-29 23:42:47 -050049
50
51Verify 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 Leeb5eea692019-12-30 13:41:14 +080055 ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050056
57 # Disable IPMI and reboot BMC.
Tony Leeb5eea692019-12-30 13:41:14 +080058 Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050059 OBMC Reboot (run)
60
61 # Verify that IPMI remains disabled after reboot.
62 Run Keyword and Expect Error *Unable to establish IPMI*
Tony Leeb5eea692019-12-30 13:41:14 +080063 ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER}
Rahul Maheshwari8ab13962019-07-29 23:42:47 -050064