当前位置: 首页>>代码示例>>Python>>正文


Python OpTestIPMI.ipmi_set_led_state方法代码示例

本文整理汇总了Python中common.OpTestIPMI.OpTestIPMI.ipmi_set_led_state方法的典型用法代码示例。如果您正苦于以下问题:Python OpTestIPMI.ipmi_set_led_state方法的具体用法?Python OpTestIPMI.ipmi_set_led_state怎么用?Python OpTestIPMI.ipmi_set_led_state使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common.OpTestIPMI.OpTestIPMI的用法示例。


在下文中一共展示了OpTestIPMI.ipmi_set_led_state方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: OpTestOOBIPMI

# 需要导入模块: from common.OpTestIPMI import OpTestIPMI [as 别名]
# 或者: from common.OpTestIPMI.OpTestIPMI import ipmi_set_led_state [as 别名]

#.........这里部分代码省略.........
    # @return l_res @type list: output of command or raise OpTestError
    #
    @staticmethod
    def test_get_led_state_cmd(self):
        print "OOB IPMI: Get state of various LED's"
        print "LED: Fault RollUP LED      0x00"
        self.run_ipmi_cmd(BMC_CONST.IPMI_GET_LED_STATE_FAULT_ROLLUP)
        print "LED: Power ON LED          0x01"
        self.run_ipmi_cmd(BMC_CONST.IPMI_GET_LED_STATE_POWER_ON)
        print "LED: Host Status LED       0x02"
        self.run_ipmi_cmd(BMC_CONST.IPMI_GET_LED_STATE_HOST_STATUS)
        print "LED: Chassis Identify LED  0x03"
        self.run_ipmi_cmd(BMC_CONST.IPMI_GET_LED_STATE_CHASSIS_IDENTIFY)

    ##
    # @brief This function is used to test set LED state feature.
    #        LED Number Table:
    #        Fault RollUP LED      0x00
    #        Power ON LED          0x01
    #        Host Status LED       0x02
    #        Chassis Identify LED  0x03
    #        LED State Table:
    #        LED State to be set.
    #               0x0  LED OFF
    #               0x1  LED ON
    #               0x2  LED Standby Blink Rate
    #               0x3  LED Slow Blink rate.
    #
    # @return l_res @type list: output of command or raise OpTestError
    #
    @staticmethod
    def test_set_led_state_cmd(self):
        print "OOB IPMI: Set LED state of various LED's"
        self.cv_IPMI.ipmi_set_led_state("0x00", "0x0")
        self.cv_IPMI.ipmi_get_fault_led_state()
        self.cv_IPMI.ipmi_set_led_state("0x00", "0x1")
        self.cv_IPMI.ipmi_get_fault_led_state()
        self.cv_IPMI.ipmi_set_led_state("0x00", "0x2")
        self.cv_IPMI.ipmi_get_fault_led_state()
        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()
开发者ID:open-power,项目名称:op-test-framework,代码行数:70,代码来源:OpTestOOBIPMI.py


注:本文中的common.OpTestIPMI.OpTestIPMI.ipmi_set_led_state方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。