예제 #1
0
    def getInformation(self, param={}):
        name = pal_get_platform_name()
        location = kv_get('tray_location')
        data = Popen('cat /sys/class/gpio/gpio108/value', \
                       shell=True, stdout=PIPE).stdout.read().decode().strip('\n')
        if data == "0":
            status = "In"
        elif data == "1":
            status = "Out"
        else:
            status = "Unknown"

        data = kv_get('system_identify', 1)
        identify_status = data.strip('\n')

        info = {
            "Description": name + " PCIe Expansion Board",
            "Tray Location": location,
            "Tray Status": status,
            "Status of identify LED": identify_status,
        }

        return info
예제 #2
0
    def getInformation(self, param={}):
        # Get Platform Name
        name = pal_get_platform_name()

        result = "NA"
        # Enclosure health LED status (GOOD/BAD)
        if name == "FBTTN":
            dpb_hlth = kv_get("dpb_sensor_health", FPERSIST)
            iom_hlth = kv_get("iom_sensor_health", FPERSIST)
            nic_hlth = kv_get("nic_sensor_health", FPERSIST)
            scc_hlth = kv_get("scc_sensor_health", FPERSIST)
            slot1_hlth = kv_get("slot1_sensor_health", FPERSIST)

            if ((dpb_hlth == "1")
                    & (iom_hlth == "1")
                    & (nic_hlth == "1")
                    & (scc_hlth == "1")
                    & (slot1_hlth == "1")):
                result = "Good"
            else:
                result = "Bad"
        elif name == "Lightning":
            peb_hlth = kv_get("peb_sensor_health")
            pdpb_hlth = kv_get("pdpb_sensor_health")
            fcb_hlth = kv_get("fcb_sensor_health")
            bmc_hlth = kv_get("bmc_health")

            if ((peb_hlth == "1") and (pdpb_hlth == "1") and (fcb_hlth == "1")
                    and (bmc_hlth == "1")):
                result = "Good"
            else:
                result = "Bad"

        info = {"Status of enclosure health LED": result}

        return info
    def getInformation(self, param={}):
        # Get Platform Name
        name = pal_get_platform_name()

        result = "NA"
        # Enclosure health LED status (GOOD/BAD)
        if name == "FBTTN":
            dpb_hlth = (
                Popen(
                    "cat /mnt/data/kv_store/dpb_sensor_health", shell=True, stdout=PIPE
                )
                .stdout.read()
                .decode()
            )
            iom_hlth = (
                Popen(
                    "cat /mnt/data/kv_store/iom_sensor_health", shell=True, stdout=PIPE
                )
                .stdout.read()
                .decode()
            )
            nic_hlth = (
                Popen(
                    "cat /mnt/data/kv_store/nic_sensor_health", shell=True, stdout=PIPE
                )
                .stdout.read()
                .decode()
            )
            scc_hlth = (
                Popen(
                    "cat /mnt/data/kv_store/scc_sensor_health", shell=True, stdout=PIPE
                )
                .stdout.read()
                .decode()
            )
            slot1_hlth = (
                Popen(
                    "cat /mnt/data/kv_store/slot1_sensor_health",
                    shell=True,
                    stdout=PIPE,
                )
                .stdout.read()
                .decode()
            )

            if (
                (dpb_hlth == "1")
                & (iom_hlth == "1")
                & (nic_hlth == "1")
                & (scc_hlth == "1")
                & (slot1_hlth == "1")
            ):
                result = "Good"
            else:
                result = "Bad"
        elif name == "Lightning":
            peb_hlth = kv_get("peb_sensor_health")
            pdpb_hlth = kv_get("pdpb_sensor_health")
            fcb_hlth = kv_get("fcb_sensor_health")
            bmc_hlth = kv_get("bmc_health")

            if (
                (peb_hlth == "1")
                and (pdpb_hlth == "1")
                and (fcb_hlth == "1")
                and (bmc_hlth == "1")
            ):
                result = "Good"
            else:
                result = "Bad"

        info = {"Status of enclosure health LED": result}

        return info
예제 #4
0
    def getInformation(self, param={}):
        identify_status = kv_get("identify_slot1", FPERSIST)
        info = {"Status of identify LED": identify_status}

        return info