Ejemplo n.º 1
0
    def __init__(self):
        ChassisBase.__init__(self)
        self.config_data = {}
        for fant_index in range(0, NUM_FAN_TRAY):
            for fan_index in range(0, NUM_FAN):
                fan = Fan(fant_index, fan_index)
                self._fan_list.append(fan)
        for index in range(0, NUM_PSU):
            psu = Psu(index)
            self._psu_list.append(psu)
        for index in range(0, NUM_THERMAL):
            thermal = Thermal(index)
            self._thermal_list.append(thermal)
        # sfp index start from 1
        self._sfp_list.append(None)
        for index in range(1, NUM_SFP + 1):
            sfp = Sfp(index)
            self._sfp_list.append(sfp)
        for index in range(0, NUM_COMPONENT):
            component = Component(index)
            self._component_list.append(component)
        self._reboot_cause_path = HOST_REBOOT_CAUSE_PATH if self.__is_host(
        ) else PMON_REBOOT_CAUSE_PATH

        self._eeprom = Tlv()
Ejemplo n.º 2
0
    def __init__(self):
        super(Chassis, self).__init__()

        for fantray_index in range(0, NUM_FAN_TRAY):
            for fan_index in range(0, NUM_FAN):
                fan = Fan(fantray_index, fan_index)
                self._fan_list.append(fan)
        for index in range(0, NUM_PSU):
            psu = Psu(index)
            self._psu_list.append(psu)
        for index in range(0, NUM_THERMAL):
            thermal = Thermal(index)
            self._thermal_list.append(thermal)

        self.PORT_START = SFP_PORT_START
        self.QSFP_PORT_START = QSFP_PORT_START
        self.PORT_END = QSFP_PORT_END
        for index in range(0, NUM_SFP):
            if index in range(self.QSFP_PORT_START, self.QSPORT_END + 1):
                sfp_module = Sfp(index, 'QSFP')
            else:
                sfp_module = Sfp(index, 'SFP')
            self._sfp_list.append(sfp_module)
        self._component_name_list = COMPONENT_NAME_LIST
        self._watchdog = Watchdog()
        self._eeprom = Tlv()
        logger.log_info("Chassis loaded successfully")
Ejemplo n.º 3
0
    def __init__(self):
        self.config_data = {}
        ChassisBase.__init__(self)
        self._eeprom = Tlv()
        self._api_helper = APIHelper()

        for fant_index in range(0, NUM_FAN_TRAY):
            for fan_index in range(0, NUM_FAN):
                fan = Fan(fant_index, fan_index)
                self._fan_list.append(fan)
Ejemplo n.º 4
0
 def __init__(self):
     self.config_data = {}
     for index in range(0, NUM_FAN):
         fan = Fan(index)
         self._fan_list.append(fan)
     for index in range(0, NUM_PSU):
         psu = Psu(index)
         self._psu_list.append(psu)
     for index in range(0, NUM_THERMAL):
         thermal = Thermal(index)
         self._thermal_list.append(thermal)
     for index in range(0, NUM_SFP):
         sfp = Sfp(index)
         self._sfp_list.append(sfp)
     ChassisBase.__init__(self)
     self._component_name_list = COMPONENT_NAME_LIST
     self._watchdog = Watchdog()
     self._eeprom = Tlv()
Ejemplo n.º 5
0
 def __init__(self):
     self.config_data = {}
     for index in range(0, NUM_FAN):
         fan = Fan(index)
         self._fan_list.append(fan)
     for index in range(0, NUM_PSU):
         psu = Psu(index)
         self._psu_list.append(psu)
     for index in range(0, NUM_THERMAL):
         thermal = Thermal(index)
         self._thermal_list.append(thermal)
     for index in range(0, NUM_SFP):
         sfp = Sfp(index)
         self._sfp_list.append(sfp)
     ChassisBase.__init__(self)
     self._reboot_cause_path = HOST_REBOOT_CAUSE_PATH if self.__is_host(
     ) else PMON_REBOOT_CAUSE_PATH
     self._component_name_list = COMPONENT_NAME_LIST
     self._watchdog = Watchdog()
     self._eeprom = Tlv()
Ejemplo n.º 6
0
    def __init__(self):
        super(Chassis, self).__init__()

        for fan_index in range(0, NUM_FAN):
            fan = Fan(fan_index)
            self._fan_list.append(fan)

        for index in range(0, NUM_PSU):
            psu = Psu(index)
            self._psu_list.append(psu)

        for index in range(0, NUM_THERMAL):
            thermal = Thermal(index)
            self._thermal_list.append(thermal)

        for index in range(0, NUM_SFP):
            sfp_module = Sfp(index, 'QSFP-DD')
            self._sfp_list.append(sfp_module)
        self._component_name_list = COMPONENT_NAME_LIST
        self._eeprom = Tlv()
        self._transceiver_presence = self._get_sfp_presence()
Ejemplo n.º 7
0
    def __init__(self):
        ChassisBase.__init__(self)
        self.config_data = {}
        for fant_index in range(0, NUM_FAN_TRAY):
            for fan_index in range(0, NUM_FAN):
                fan = Fan(fant_index, fan_index)
                self._fan_list.append(fan)
        for index in range(0, NUM_PSU):
            psu = Psu(index)
            self._psu_list.append(psu)
        for index in range(0, NUM_THERMAL):
            thermal = Thermal(index)
            self._thermal_list.append(thermal)
        for index in range(0, NUM_SFP):
            sfp = Sfp(index)
            self._sfp_list.append(sfp)
        for index in range(0, NUM_COMPONENT):
            component = Component(index)
            self._component_list.append(component)

        self._watchdog = Watchdog()
        self._eeprom = Tlv()
Ejemplo n.º 8
0
 def __initialize_eeprom(self):
     from sonic_platform.eeprom import Tlv
     self._eeprom = Tlv()