xref: /openbmc/openbmc-test-automation/ipmi/test_ipmi_disable.robot (revision 6fb70d98f2f1cb9273ba912deaa2cebe3c23ea86)
18ab13965SRahul Maheshwari*** Settings ***
28ab13965SRahul MaheshwariDocumentation    Module to test IPMI disable functionality.
38ab13965SRahul Maheshwari
48ab13965SRahul MaheshwariResource         ../lib/ipmi_client.robot
58ab13965SRahul MaheshwariResource         ../lib/openbmc_ffdc.robot
6b5eea69dSTony LeeLibrary          ../lib/ipmi_utils.py
78ab13965SRahul Maheshwari
8*6fb70d98SMatt FischerTest Tags       IPMI_Disable
987dc442cSGeorge Keishing
108ab13965SRahul Maheshwari*** Test Cases ***
118ab13965SRahul Maheshwari
128ab13965SRahul MaheshwariVerify Disabling And Enabling IPMI Via Host
138ab13965SRahul Maheshwari    [Documentation]  Verify disabling and enabling IPMI via host.
148ab13965SRahul Maheshwari    [Tags]  Verify_Disabling_And_Enabling_IPMI_Via_Host
158ab13965SRahul Maheshwari    [Teardown]  Run Keywords  FFDC On Test Case Fail
16b5eea69dSTony Lee    ...  AND  Run Inband IPMI Standard Command  lan set ${CHANNEL_NUMBER} access on
178ab13965SRahul Maheshwari
188ab13965SRahul Maheshwari    # Disable IPMI and verify
19b5eea69dSTony Lee    Run Inband IPMI Standard Command  lan set ${CHANNEL_NUMBER} access off
208ab13965SRahul Maheshwari    Run Keyword and Expect Error  *Unable to establish IPMI*
21b5eea69dSTony Lee    ...  Run External IPMI Standard Command  lan print ${CHANNEL_NUMBER}
228ab13965SRahul Maheshwari
238ab13965SRahul Maheshwari    # Enable IPMI and verify
24b5eea69dSTony Lee    Run Inband IPMI Standard Command  lan set ${CHANNEL_NUMBER} access on
25b5eea69dSTony Lee    ${lan_print_info}=  Get Lan Print Dict  ${CHANNEL_NUMBER}
268ab13965SRahul Maheshwari
27b5eea69dSTony Lee    ${openbmc_host_name}  ${openbmc_ip}=  Get Host Name IP  host=${OPENBMC_HOST}
28b5eea69dSTony Lee    Rprint Vars  lan_print_info  openbmc_ip
29b5eea69dSTony Lee    Valid Value  lan_print_info['IP Address']  ['${openbmc_ip}']
308ab13965SRahul Maheshwari
318ab13965SRahul Maheshwari
328ab13965SRahul MaheshwariVerify Disabling IPMI Via OOB IPMI
338ab13965SRahul Maheshwari    [Documentation]  Verify disabling IPMI via out of band IPMI.
348ab13965SRahul Maheshwari    [Tags]  Verify_Disabling_IPMI_Via_OOB_IPMI
358ab13965SRahul Maheshwari    [Teardown]  Run Keywords  FFDC On Test Case Fail
36b5eea69dSTony Lee    ...  AND  Run Inband IPMI Standard Command  lan set ${CHANNEL_NUMBER} access on
378ab13965SRahul Maheshwari
388ab13965SRahul Maheshwari    # Disable IPMI via OOB IPMI and verify
399e5626d2SGeorge Keishing    ${resp}=  Run Keyword and Ignore Error
409e5626d2SGeorge Keishing    ...  Run External IPMI Standard Command  lan set ${CHANNEL_NUMBER} access off
41b5e93e17Sishwaryamathim    Should Contain any  ${resp}  ${EMPTY}  Set Channel Access for channel ${CHANNEL_NUMBER} was successful.
428ab13965SRahul Maheshwari    Run Keyword and Expect Error  *Unable to establish IPMI*
43b5eea69dSTony Lee    ...  Run External IPMI Standard Command  lan print ${CHANNEL_NUMBER}
448ab13965SRahul Maheshwari
458ab13965SRahul Maheshwari    # Enable IPMI via Host and verify
46b5eea69dSTony Lee    Run Inband IPMI Standard Command  lan set ${CHANNEL_NUMBER} access on
47b5eea69dSTony Lee    ${lan_print_info}=  Get Lan Print Dict  ${CHANNEL_NUMBER}
488ab13965SRahul Maheshwari
49b5eea69dSTony Lee    ${openbmc_host_name}  ${openbmc_ip}=  Get Host Name IP  host=${OPENBMC_HOST}
50b5eea69dSTony Lee    Rprint Vars  lan_print_info  openbmc_ip
51b5eea69dSTony Lee    Valid Value  lan_print_info['IP Address']  ['${openbmc_ip}']
528ab13965SRahul Maheshwari
538ab13965SRahul Maheshwari
548ab13965SRahul MaheshwariVerify IPMI Disable Persistency After BMC Reboot
558ab13965SRahul Maheshwari    [Documentation]  Verify IPMI disable persistency after BMC reboot.
568ab13965SRahul Maheshwari    [Tags]  Verify_IPMI_Disable_Persistency_After_BMC_Reboot
578ab13965SRahul Maheshwari    [Teardown]  Run Keywords  FFDC On Test Case Fail
58b5eea69dSTony Lee    ...  AND  Run Inband IPMI Standard Command  lan set ${CHANNEL_NUMBER} access on
598ab13965SRahul Maheshwari
608ab13965SRahul Maheshwari    # Disable IPMI and reboot BMC.
61b5eea69dSTony Lee    Run Inband IPMI Standard Command  lan set ${CHANNEL_NUMBER} access off
628ab13965SRahul Maheshwari    OBMC Reboot (run)
638ab13965SRahul Maheshwari
648ab13965SRahul Maheshwari    # Verify that IPMI remains disabled after reboot.
658ab13965SRahul Maheshwari    Run Keyword and Expect Error  *Unable to establish IPMI*
66b5eea69dSTony Lee    ...  Run External IPMI Standard Command  lan print ${CHANNEL_NUMBER}
678ab13965SRahul Maheshwari
68