本文整理匯總了Python中common.OpTestIPMI.OpTestIPMI.ipmi_get_sel_list方法的典型用法代碼示例。如果您正苦於以下問題:Python OpTestIPMI.ipmi_get_sel_list方法的具體用法?Python OpTestIPMI.ipmi_get_sel_list怎麽用?Python OpTestIPMI.ipmi_get_sel_list使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類common.OpTestIPMI.OpTestIPMI
的用法示例。
在下文中一共展示了OpTestIPMI.ipmi_get_sel_list方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: OpTestOOBIPMI
# 需要導入模塊: from common.OpTestIPMI import OpTestIPMI [as 別名]
# 或者: from common.OpTestIPMI.OpTestIPMI import ipmi_get_sel_list [as 別名]
#.........這裏部分代碼省略.........
self.cv_IPMI.ipmi_set_led_state("0x00", "0x3")
self.cv_IPMI.ipmi_get_fault_led_state()
self.cv_IPMI.ipmi_set_led_state("0x01", "0x0")
self.cv_IPMI.ipmi_get_power_on_led_state()
self.cv_IPMI.ipmi_set_led_state("0x01", "0x1")
self.cv_IPMI.ipmi_get_power_on_led_state()
self.cv_IPMI.ipmi_set_led_state("0x01", "0x2")
self.cv_IPMI.ipmi_get_power_on_led_state()
self.cv_IPMI.ipmi_set_led_state("0x01", "0x3")
self.cv_IPMI.ipmi_get_power_on_led_state()
##
# @brief Step 1: Stop Fan Control Thread:
# ipmitool -I lanplus -U admin -P admin -H <BMC IP> raw 0x3a 0x12 0x00
# Step 2: Fan Control STOPPED OEM SEL created
# ipmitool -I lanplus -U admin -P admin -H <BMC IP> sel list |grep OEM
# 7b | 04/20/2015 | 03:03:14 | OEM record c0 | 000000 | 3a1100ffffff
# Step 3: #Run IsFanRunning OEM Command
# ipmitool -I lanplus -U admin -P admin -H <BMC IP> raw 0x3a 0x13
# 00
#
# @return return BMC_CONST.FW_SUCCESS or raise OpTestError
#
@staticmethod
def test_fan_control_algorithm_1(self):
print "OOB IPMI: Testing Fan control disable functionality"
self.cv_IPMI.ipmi_enable_fan_control_task_command()
self.cv_IPMI.ipmi_sdr_clear()
l_state = self.cv_IPMI.ipmi_get_fan_control_task_state_command()
if str(BMC_CONST.IPMI_FAN_CONTROL_THREAD_RUNNING) in l_state:
self.cv_IPMI.ipmi_disable_fan_control_task_command()
l_state = self.cv_IPMI.ipmi_get_fan_control_task_state_command()
if str(BMC_CONST.IPMI_FAN_CONTROL_THREAD_NOT_RUNNING) in l_state:
l_output = self.cv_IPMI.ipmi_get_sel_list()
print l_output
if "OEM" in l_output:
print "IPMI: Disabling of fan control creates an OEM SEL event"
return BMC_CONST.FW_SUCCESS
else:
l_msg = "IPMI: Disabling of fan control doesn't create an OEM SEL event"
raise OpTestError(l_msg)
else:
l_msg = "IPMI: Fan control thread still running, disable failed"
raise OpTestError(l_msg)
else:
l_msg = "IPMI: Fan control thread still in not running state, enable failed"
raise OpTestError(l_msg)
##
# @brief Step 1: Start Fan Control Thread:
# ipmitool -I lanplus -U admin -P admin -H <BMC IP> raw 0x3a 0x12 0x01
# Step 2: Fan Control STOPPED OEM SEL created
# ipmitool -I lanplus -U admin -P admin -H <BMC IP> sel list |grep OEM
# 7b | 04/20/2015 | 03:03:14 | OEM record c0 | 000000 | 3a1100ffffff
# Step 3: #Run IsFanRunning OEM Command
# ipmitool -I lanplus -U admin -P admin -H <BMC IP> raw 0x3a 0x13
# 01
#
# @return return BMC_CONST.FW_SUCCESS or raise OpTestError
#
@staticmethod
def test_fan_control_algorithm_2(self):
print "OOB IPMI: Testing Fan control enable functionality"
self.cv_IPMI.ipmi_disable_fan_control_task_command()
self.cv_IPMI.ipmi_sdr_clear()
l_state = self.cv_IPMI.ipmi_get_fan_control_task_state_command()