c5d0507224
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).
33 lines
930 B
Python
Executable File
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
|