Modified test suite IPMI disable
Currently, the commands "lan set <channel number> access on / off" and
"lan print <channel number>" are hard coded as channel 1.
Let user to specify channel while running, if not, the default is 1.
Signed-off-by: Tony Lee <tony.lee@quantatw.com>
Change-Id: I732dacadbb1b044f68a558a2c22105c36e0a1740
diff --git a/ipmi/test_ipmi_disable.robot b/ipmi/test_ipmi_disable.robot
index c2f179e..e0f382a 100644
--- a/ipmi/test_ipmi_disable.robot
+++ b/ipmi/test_ipmi_disable.robot
@@ -3,6 +3,7 @@
Resource ../lib/ipmi_client.robot
Resource ../lib/openbmc_ffdc.robot
+Library ../lib/ipmi_utils.py
*** Test Cases ***
@@ -10,54 +11,54 @@
[Documentation] Verify disabling and enabling IPMI via host.
[Tags] Verify_Disabling_And_Enabling_IPMI_Via_Host
[Teardown] Run Keywords FFDC On Test Case Fail
- ... AND Run Inband IPMI Standard Command lan set 1 access on
+ ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
# Disable IPMI and verify
- Run Inband IPMI Standard Command lan set 1 access off
+ Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off
Run Keyword and Expect Error *Unable to establish IPMI*
- ... Run External IPMI Standard Command lan print
+ ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER}
# Enable IPMI and verify
- Run Inband IPMI Standard Command lan set 1 access on
- ${lan_print_output}= Run External IPMI Standard Command lan print
+ Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
+ ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER}
- ${openbmc_host_name} ${openbmc_ip} ${openbmc_short_name}=
- ... Get Host Name IP host=${OPENBMC_HOST} short_name=1
- Should Contain ${lan_print_output} ${openbmc_ip}
+ ${openbmc_host_name} ${openbmc_ip}= Get Host Name IP host=${OPENBMC_HOST}
+ Rprint Vars lan_print_info openbmc_ip
+ Valid Value lan_print_info['IP Address'] ['${openbmc_ip}']
Verify Disabling IPMI Via OOB IPMI
[Documentation] Verify disabling IPMI via out of band IPMI.
[Tags] Verify_Disabling_IPMI_Via_OOB_IPMI
[Teardown] Run Keywords FFDC On Test Case Fail
- ... AND Run Inband IPMI Standard Command lan set 1 access on
+ ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
# Disable IPMI via OOB IPMI and verify
Run Keyword and Expect Error *IPMI response is NULL*
- ... Run IPMI Standard Command lan set 1 access off
+ ... Run IPMI Standard Command lan set ${CHANNEL_NUMBER} access off
Run Keyword and Expect Error *Unable to establish IPMI*
- ... Run External IPMI Standard Command lan print
+ ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER}
# Enable IPMI via Host and verify
- Run Inband IPMI Standard Command lan set 1 access on
- ${lan_print_output}= Run External IPMI Standard Command lan print
+ Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
+ ${lan_print_info}= Get Lan Print Dict ${CHANNEL_NUMBER}
- ${openbmc_host_name} ${openbmc_ip} ${openbmc_short_name}=
- ... Get Host Name IP host=${OPENBMC_HOST} short_name=1
- Should Contain ${lan_print_output} ${openbmc_ip}
+ ${openbmc_host_name} ${openbmc_ip}= Get Host Name IP host=${OPENBMC_HOST}
+ Rprint Vars lan_print_info openbmc_ip
+ Valid Value lan_print_info['IP Address'] ['${openbmc_ip}']
Verify IPMI Disable Persistency After BMC Reboot
[Documentation] Verify IPMI disable persistency after BMC reboot.
[Tags] Verify_IPMI_Disable_Persistency_After_BMC_Reboot
[Teardown] Run Keywords FFDC On Test Case Fail
- ... AND Run Inband IPMI Standard Command lan set 1 access on
+ ... AND Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access on
# Disable IPMI and reboot BMC.
- Run Inband IPMI Standard Command lan set 1 access off
+ Run Inband IPMI Standard Command lan set ${CHANNEL_NUMBER} access off
OBMC Reboot (run)
# Verify that IPMI remains disabled after reboot.
Run Keyword and Expect Error *Unable to establish IPMI*
- ... Run External IPMI Standard Command lan print
+ ... Run External IPMI Standard Command lan print ${CHANNEL_NUMBER}