예제 #1
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_nums = 2
        self.psu_path = "/sys/bus/i2c/devices/1-0032/"
        self.psu_presence = "ps{}_ps"
        self.psu_oper_status = "ps{}_pg"
예제 #2
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/{}-0058/"
        self.psu_oper_status = "in1_input"
        self.psu_oper_status2 = "in2_input"
        self.psu_presence = "i2cget -y {} 0x50 0x00"
예제 #3
0
 def __init__(self):
     PsuBase.__init__(self)
     # DX010 PSU pin mapping
     self.psu = [
         {'base': self.get_gpio_base()},
         {'abs':27, 'power':22},
         {'abs':28, 'power':25}
     ]
예제 #4
0
 def __init__(self):
     PsuBase.__init__(self)
     # DX010 PSU pin mapping
     self.psu = [
         {'base':216},           # Reserved
         {'abs':27, 'power':22},
         {'abs':28, 'power':25}
     ]
예제 #5
0
 def __init__(self):
     PsuBase.__init__(self)
     # DX010 PSU pin mapping
     self.dx010_psu_gpio = [
         {'base': self.__get_gpio_base()},
         {'prs': 27, 'status': 22},
         {'prs': 28, 'status': 25}
     ]
예제 #6
0
    def __init__(self):
        PsuBase.__init__(self)
        global pddf_obj
        global plugin_data
        with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
            plugin_data = json.load(pd)

        pddf_obj = pddfparse.PddfParse()
        self.platform = pddf_obj.get_platform()
예제 #7
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/"
        self.psu_presence = "/psu_present"
        self.psu_oper_status = "/psu_power_good"
        self.psu_mapping = {
            1: "10-0053",
            2: "9-0050",
        }
예제 #8
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/"
        self.psu_presence = "/psu_present"
        self.psu_oper_status = "/psu_power_good"
        self.psu_mapping = {
            1: "0-0053",
            2: "0-0050",
        }
예제 #9
0
 def __init__(self):
     PsuBase.__init__(self)
     self.psu_path = ""
     for index in range(0, 100):
         hwmon_path = "/sys/devices/platform/mlxplat/mlxreg-hotplug/hwmon/hwmon{}/".format(index)
         if os.path.exists(hwmon_path):
             self.psu_path = hwmon_path
             break
     self.psu_presence = "psu{}"
     self.psu_oper_status = "pwr{}"
예제 #10
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/"
        self.psu_presence = "/psu_present"
        self.psu_oper_status = "/psu_power_good"
        self.psu_mapping = {
            1: ["11-0038", "11-0050"],
            2: ["12-003b", "12-0053"],
        }
예제 #11
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/"
        self.psu_presence = "/present"
        self.psu_oper_status = "/power_good"
        self.psu_mapping = {
            2: "0-0059",
            1: "0-005a",
        }
예제 #12
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = ""
        for index in range(0, 100):
            hwmon_path = "/sys/devices/platform/mlxplat/mlxreg-hotplug/hwmon/hwmon{}/".format(index)
            if os.path.exists(hwmon_path):
                self.psu_path = hwmon_path
                break
        self.psu_presence = "psu{}"
        self.psu_oper_status = "pwr{}"
예제 #13
0
 def __init__(self):
     PsuBase.__init__(self)
     # DX010 PSU pin mapping
     self.psu = [{
         'base': self.get_gpio_base()
     }, {
         'abs': 27,
         'power': 22
     }, {
         'abs': 28,
         'power': 25
     }]
예제 #14
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/"
        self.psu_presence = {
            1: "/psu1_present",
            2: "/psu2_present",
        }
        self.psu_oper_status = {
            1: "/psu1_power_good",
            2: "/psu2_power_good",
        }
        self.psu_mapping = "101-0068"
예제 #15
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/"
        self.psu_presence = {
            1: "/psu1_present",
            2: "/psu2_present",
        }
        self.psu_oper_status = {
            1: "/psu1_power_good",
            2: "/psu2_power_good",
        }
        self.psu_mapping = "0-005e"
        if not os.path.exists(self.psu_path+self.psu_mapping):
            self.psu_mapping = "1-005e"
예제 #16
0
파일: psuutil.py 프로젝트: netgp2020/test3
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/"
        self.psu_presence = {
            1: "/psu1_present",
            2: "/psu2_present",
        }
        self.psu_oper_status = {
            1: "/psu1_power_good",
            2: "/psu2_power_good",
        }
        self.psu_mapping = "0-005e"
        if not os.path.exists(self.psu_path + self.psu_mapping):
            self.psu_mapping = "1-005e"
예제 #17
0
    def __init__(self):
        PsuBase.__init__(self)

        self.sku_name = self._get_sku_name()

        self.psu_path = "/var/run/hw-management/"
        self.psu_presence = "thermal/psu{}_status"
        self.psu_oper_status = "thermal/psu{}_pwr_status"
        self.psu_current = "power/psu{}_curr"
        self.psu_power = "power/psu{}_power"
        if self.sku_name in self.sku_spectrum1_with_plugable_psu:
            self.psu_voltage = "power/psu{}_volt"
        else:
            self.psu_voltage = "power/psu{}_volt_out2"
        self.fan_speed = "thermal/psu{}_fan1_speed_get"
예제 #18
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/"
        self.psu_presence = {
            1: "/psu1_present",
            2: "/psu2_present",
        }
        self.psu_oper_status = {
            1: "/psu1_power_good",
            2: "/psu2_power_good",
        }
        self.psu_model_name = "/psu_model_name"
        self.psu_mfr_id = "/psu_mfr_id"
        self.psu_serial_num = "/psu_serial_num"
        self.psu_v_out = "/psu_v_out"
        self.psu_i_out = "/psu_i_out"
        self.psu_fan1_speed_rpm = "/psu_fan1_speed_rpm"

        self._PSU_EEPROM_SERIAL_NUM_OFFSET = 0x35
        self._PSU_EEPROM_SERIAL_NUM_LENGTH = 19

        self.psu_mapping = "0-005e"
        if not os.path.exists(self.psu_path + self.psu_mapping):
            self.psu_mapping = "1-005e"

        if os.path.exists(self.psu_path + "9-0050"):
            self.psu_eeprom_mapping = {
                1: "9-0050",
                2: "10-0051",
            }
            self.psu_pmbus_mapping = {
                1: "9-0058",
                2: "10-0059",
            }
            self.psu_serial_num = "/eeprom"
        else:
            self.psu_eeprom_mapping = {
                1: "32-0050",
                2: "33-0051",
            }
            self.psu_pmbus_mapping = {
                1: "32-0058",
                2: "33-0059",
            }
예제 #19
0
    def __init__(self):
        PsuBase.__init__(self)

        if gpio16_exist() == False:
            output = exec_cmd("echo 16 > /sys/class/gpio/export ", 1)
            output = exec_cmd("echo in > /sys/class/gpio/gpio16/direction ", 1)

        if gpio17_exist() == False:
            output = exec_cmd("echo 17 > /sys/class/gpio/export ", 1)
            output = exec_cmd("echo in > /sys/class/gpio/gpio17/direction ", 1)

        if gpio19_exist() == False:
            output = exec_cmd("echo 19 > /sys/class/gpio/export ", 1)
            output = exec_cmd("echo in > /sys/class/gpio/gpio19/direction ", 1)

        if gpio20_exist() == False:
            output = exec_cmd("echo 20 > /sys/class/gpio/export ", 1)
            output = exec_cmd("echo in > /sys/class/gpio/gpio20/direction ", 1)
예제 #20
0
    def __init__(self):
        PsuBase.__init__(self)

        if gpio16_exist() == False:
            output = exec_cmd("echo 16 > /sys/class/gpio/export ", 1)
            output = exec_cmd("echo in > /sys/class/gpio/gpio16/direction ", 1)

        if gpio17_exist() == False:
            output = exec_cmd("echo 17 > /sys/class/gpio/export ", 1)
            output = exec_cmd("echo in > /sys/class/gpio/gpio17/direction ", 1)

        if gpio19_exist() == False:
            output = exec_cmd("echo 19 > /sys/class/gpio/export ", 1)
            output = exec_cmd("echo in > /sys/class/gpio/gpio19/direction ", 1)

        if gpio20_exist() == False:
            output = exec_cmd("echo 20 > /sys/class/gpio/export ", 1)
            output = exec_cmd("echo in > /sys/class/gpio/gpio20/direction ", 1)
예제 #21
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/2-0060/"
        self.psu_presence = "psu{}_status"
        self.psu_oper_status = "psu{}_pg_status"
예제 #22
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/devices/platform/e1031.smc/"
        self.psu_presence = "psu{}_prs"
        self.psu_oper_status = "psu{}_status"
예제 #23
0
 def __init__(self):
     PsuBase.__init__(self)
     self.psu_status = "ipmitool raw 0x06 0x52 0x07 0x62 0x01 0x21"
예제 #24
0
 def __init__(self):
     self.ipmi_sensor = "ipmitool sensor"
     PsuBase.__init__(self)
예제 #25
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/var/run/hw-management/thermal/"
        self.psu_presence = "psu{}_pwr_status"
        self.psu_oper_status = "psu{}_pwr_status"
예제 #26
0
 def __init__(self):
     PsuBase.__init__(self)
     self.chassis = sonic_platform.platform.Platform().get_chassis()
예제 #27
0
파일: psuutil.py 프로젝트: netgp2020/test3
 def __init__(self):
     self.ipmi_raw = "docker exec -ti pmon ipmitool raw 0x4 0x2d"
     self.psu1_id = "0x2f"
     self.psu2_id = "0x39"
     PsuBase.__init__(self)
예제 #28
0
    def __init__(self):
        PsuBase.__init__(self)

        self.num = 4
        self.psu_path = "/sys/bus/platform/devices/minipack_psensor/"
        self.psu_voltage = "/in{0}_input"
예제 #29
0
 def __init__(self):
     PsuBase.__init__(self)
     self.psu_presence = "cat /sys/devices/platform/delta-ag9064-cpld.0/psu{}_scan"
     self.psu_status = "cat /sys/devices/platform/delta-ag9064-swpld1.0/psu{}_pwr_ok"
예제 #30
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/class/psu/psu{}/"
        self.psu_presence = "psu_presence"
        self.psu_oper_status = "psu_status"
예제 #31
0
    def __init__(self):
        PsuBase.__init__(self)

        self.num = 4
        self.psu_path = "/sys/bus/platform/devices/minipack_psensor/"
        self.psu_voltage = "/in{0}_input"
예제 #32
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/devices/platform/delta-et6248brb-gpio.0/PSU/psu{}_pg"
        self.psu_oper_status = "in1_input"
        self.psu_presence = "/sys/devices/platform/delta-et6248brb-gpio.0/PSU/psu{}_pres"
예제 #33
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/6-00{}/"
        self.psu_oper_status = "in1_input"
        self.psu_presence = "i2cget -y 6 0x{} 0x00"
예제 #34
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/bus/i2c/devices/6-00{}/"
        self.psu_oper_status = "in1_input"
        self.psu_presence = "i2cget -y 6 0x{} 0x00"
예제 #35
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/bsp/module/"
        self.psu_presence = "psu{}_status"
        self.psu_oper_status = "psu{}_pwr_status"
예제 #36
0
 def __init__(self):
     self.set_gpio_offset()
     PsuBase.__init__(self)
예제 #37
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/devices/platform/delta-et6248brb-gpio.0/PSU/psu{}_pg"
        self.psu_oper_status = "in1_input"
        self.psu_presence = "/sys/devices/platform/delta-et6248brb-gpio.0/PSU/psu{}_pres"
예제 #38
0
 def __init__(self):
     PsuBase.__init__(self)
     MAX_PSUS = 2
예제 #39
0
 def __init__(self):
     PsuBase.__init__(self)
예제 #40
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/var/run/hw-management/thermal/"
        self.psu_presence = "psu{}_pwr_status"
        self.psu_oper_status = "psu{}_pwr_status"
예제 #41
0
 def __init__(self):
     PsuBase.__init__(self)
예제 #42
0
    def __init__(self):
        PsuBase.__init__(self)

        self.psu_path = "/sys/class/psu/psu{}/"
        self.psu_presence = "psu_presence"
        self.psu_oper_status = "psu_status"