sonic-buildimage/device/nokia/arm64-nokia_ixs7215_52xb-r0/plugins/psuutil.py
Pavan-Nokia c5d0507224
[arm64][Nokia-7215-A1]Add support for Nokia-7215-A1 platform (#13795)
Add new Nokia build target and establish an arm64 build:

    Platform: arm64-nokia_ixs7215_52xb-r0
    HwSKU: Nokia-7215-A1
    ASIC: marvell
    Port Config: 48x1G + 4x10G

How I did it

- Change make files for saiserver and syncd to use Bulleseye kernel
- Change Marvell SAI version to 1.11.0-1
- Add Prestera make files to build kernel, Flattened Device Tree blob and ramdisk for arm64 platforms
- Provide device and platform related files for new platform support (arm64-nokia_ixs7215_52xb-r0).
2023-05-18 14:24:05 -07:00

33 lines
930 B
Python
Executable File

try:
import sonic_platform.platform
import sonic_platform.chassis
from sonic_psu.psu_base import PsuBase
except ImportError as e:
raise ImportError(str(e) + "- required module not found")
class PsuUtil(PsuBase):
"""Platform-specific PSUutil class"""
def __init__(self):
PsuBase.__init__(self)
self.chassis = sonic_platform.platform.Platform().get_chassis()
def get_num_psus(self):
MAX_PSUS = 2
return MAX_PSUS
def get_psu_status(self, index):
# print " psuUtil redirect to PMON 2.0 "
if self.chassis is not None:
return self.chassis.get_psu(index-1).get_status()
else:
return False
def get_psu_presence(self, index):
# print " psuUtil redirect to PMON 2.0 "
if self.chassis is not None:
return self.chassis.get_psu(index-1).get_presence()
else:
return False