e2a22407b0
* [device]: Add support for Mellanox MSN2100 MSN2100 runs on Spectrum silicon and has 16 100GbE ports. Signed-off-by: marian-pritsak <marianp@mellanox.com>
29 lines
731 B
Python
29 lines
731 B
Python
#! /usr/bin/python
|
|
|
|
try:
|
|
from sonic_sfp.sfputilbase import sfputilbase
|
|
except ImportError, e:
|
|
raise ImportError (str(e) + "- required module not found")
|
|
|
|
|
|
class sfputil(sfputilbase):
|
|
"""Platform specific sfputil class"""
|
|
|
|
port_start = 0
|
|
port_end = 15
|
|
ports_in_block = 16
|
|
|
|
eeprom_offset = 1
|
|
|
|
port_to_eeprom_mapping = {}
|
|
|
|
_qsfp_ports = range(0, ports_in_block + 1)
|
|
|
|
def __init__(self, port_num):
|
|
# Override port_to_eeprom_mapping for class initialization
|
|
eeprom_path = '/bsp/qsfp/qsfp{0}'
|
|
for x in range(0, self.port_end + 1):
|
|
self.port_to_eeprom_mapping[x] = eeprom_path.format(x + self.eeprom_offset)
|
|
sfputilbase.__init__(self, port_num)
|
|
|