本文整理汇总了Python中common.OpTestSystem.OpTestSystem.sys_issue_ipmi_pnor_reprovision_request方法的典型用法代码示例。如果您正苦于以下问题:Python OpTestSystem.sys_issue_ipmi_pnor_reprovision_request方法的具体用法?Python OpTestSystem.sys_issue_ipmi_pnor_reprovision_request怎么用?Python OpTestSystem.sys_issue_ipmi_pnor_reprovision_request使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.OpTestSystem.OpTestSystem
的用法示例。
在下文中一共展示了OpTestSystem.sys_issue_ipmi_pnor_reprovision_request方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: OpTestIPMIReprovision
# 需要导入模块: from common.OpTestSystem import OpTestSystem [as 别名]
# 或者: from common.OpTestSystem.OpTestSystem import sys_issue_ipmi_pnor_reprovision_request [as 别名]
class OpTestIPMIReprovision():
## Initialize this object
# @param i_bmcIP The IP address of the BMC
# @param i_bmcUser The userid to log into the BMC with
# @param i_bmcPasswd The password of the userid to log into the BMC with
# @param i_bmcUserIpmi The userid to issue the BMC IPMI commands with
# @param i_bmcPasswdIpmi The password of BMC IPMI userid
# @param i_ffdcDir Optional param to indicate where to write FFDC
#
# "Only required for inband tests" else Default = None
# @param i_hostIP The IP address of the HOST
# @param i_hostUser The userid to log into the HOST
# @param i_hostPasswd The password of the userid to log into the HOST with
#
def __init__(self, i_bmcIP, i_bmcUser, i_bmcPasswd,
i_bmcUserIpmi, i_bmcPasswdIpmi, i_ffdcDir=None, i_hostIP=None,
i_hostUser=None, i_hostPasswd=None):
self.cv_BMC = OpTestBMC(i_bmcIP, i_bmcUser, i_bmcPasswd, i_ffdcDir)
self.cv_IPMI = OpTestIPMI(i_bmcIP, i_bmcUserIpmi, i_bmcPasswdIpmi,
i_ffdcDir, i_hostIP, i_hostUser, i_hostPasswd)
self.cv_HOST = OpTestHost(i_hostIP, i_hostUser, i_hostPasswd,i_bmcIP, i_ffdcDir)
self.cv_SYSTEM = OpTestSystem(i_bmcIP, i_bmcUser, i_bmcPasswd,
i_bmcUserIpmi, i_bmcPasswdIpmi, i_ffdcDir, i_hostIP,
i_hostUser, i_hostPasswd)
self.util = OpTestUtil()
self.opTestHMIHandling = OpTestHMIHandling(i_bmcIP, i_bmcUser, i_bmcPasswd,
i_bmcUserIpmi, i_bmcPasswdIpmi, i_ffdcDir, i_hostIP,
i_hostUser, i_hostPasswd)
##
# @brief This function will cover following test steps
# Testcase: NVRAM Partition-IPMI Reprovision
# 1. Update NVRAM config data with test config data
# i.e "nvram --update-config test-name=test-value"
# 2. Issue an IPMI PNOR Reprovision request command, to reset NVRAM partition to default.
# 3. Wait for PNOR Reprovision progress to complete(00).
# 4. Do a Hard reboot(Power OFF/ON) to avoid nvram cache data.
# 5. Once system booted, check for NVRAM parition whether the test config data
# got erased or not.
#
# @return BMC_CONST.FW_SUCCESS or raise OpTestError
#
def test_nvram_ipmi_reprovision(self):
self.cv_SYSTEM.sys_bmc_power_on_validate_host()
self.cv_HOST.host_run_command("uname -a")
self.cv_HOST.host_run_command(BMC_CONST.NVRAM_PRINT_CFG)
print "IPMI_Reprovision: Updating the nvram partition with test cfg data"
self.cv_HOST.host_run_command(BMC_CONST.NVRAM_UPDATE_CONFIG_TEST_DATA)
self.cv_HOST.host_run_command(BMC_CONST.NVRAM_PRINT_CFG)
print "IPMI_Reprovision: issuing ipmi pnor reprovision request"
self.cv_SYSTEM.sys_issue_ipmi_pnor_reprovision_request()
print "IPMI_Reprovision: wait for reprovision to complete"
self.cv_SYSTEM.sys_wait_for_ipmi_pnor_reprovision_to_complete()
print "IPMI_Reprovision: gathering the opal message logs"
self.cv_HOST.host_gather_opal_msg_log()
print "IPMI_Reprovision: Performing a IPMI Power OFF Operation"
# Perform a IPMI Power OFF Operation(Immediate Shutdown)
self.cv_IPMI.ipmi_power_off()
if int(self.cv_SYSTEM.sys_wait_for_standby_state(BMC_CONST.SYSTEM_STANDBY_STATE_DELAY)) == BMC_CONST.FW_SUCCESS:
print "IPMI_Reprovision: System is in standby/Soft-off state"
else:
l_msg = "IPMI_Reprovision: System failed to reach standby/Soft-off state after pnor reprovisioning"
raise OpTestError(l_msg)
print "IPMI_Reprovision: Performing a IPMI Power ON Operation"
# Perform a IPMI Power ON Operation
self.cv_IPMI.ipmi_power_on()
self.cv_SYSTEM.sys_check_host_status()
self.util.PingFunc(self.cv_HOST.ip, BMC_CONST.PING_RETRY_POWERCYCLE)
l_res = self.cv_HOST.host_run_command(BMC_CONST.NVRAM_PRINT_CFG)
if l_res.__contains__(BMC_CONST.NVRAM_TEST_DATA):
l_msg = "NVRAM Partition - IPMI Reprovision not happening, nvram test config data still exists"
raise OpTestError(l_msg)
print "NVRAM Partition - IPMI Reprovision is done, cleared the nvram test config data"
self.cv_HOST.host_gather_opal_msg_log()
return BMC_CONST.FW_SUCCESS
##
# @brief This function will cover following test steps
# Testcase: GARD Partition-IPMI Reprovision
# 1. Inject core checkstop using existed function from OpTestHMIHandling.py
# 2. Do a Hard reboot(IPMI Power OFF/ON)
# 2. Issue an IPMI PNOR Reprovision request command, to reset GUARD partition to default.
# 3. Wait for IPMI PNOR Reprovision progress to complete(00).
# 4. Check for GUARD parition whether the existing gard records erased or not.
# 6. Reboot the system back to see system is booting fine or not.
#
# @return BMC_CONST.FW_SUCCESS or raise OpTestError
#
def test_gard_ipmi_reprovision(self):
self.cv_SYSTEM.sys_bmc_power_on_validate_host()
print "IPMI_Reprovision: Injecting system core checkstop to guard the phyisical cpu"
self.opTestHMIHandling.testHMIHandling(BMC_CONST.HMI_MALFUNCTION_ALERT)
print "IPMI_Reprovision: Performing a IPMI Power OFF Operation"
# Perform a IPMI Power OFF Operation(Immediate Shutdown)
self.cv_IPMI.ipmi_power_off()
if int(self.cv_SYSTEM.sys_wait_for_standby_state(BMC_CONST.SYSTEM_STANDBY_STATE_DELAY)) == BMC_CONST.FW_SUCCESS:
print "IPMI_Reprovision: System is in standby/Soft-off state"
else:
#.........这里部分代码省略.........