From 88a33926cc1116930a712dc552918fa96356f959 Mon Sep 17 00:00:00 2001 From: Jemston Fernando Date: Sun, 30 Jun 2024 10:52:31 +0000 Subject: [PATCH] Generate media key in platform sepcific way Add API to support the generation of the preemphasis key in a platform vendor dictated way instead of generic one --- sonic_platform_base/sfp_base.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sonic_platform_base/sfp_base.py b/sonic_platform_base/sfp_base.py index 804b51ab8..fc2e3661e 100644 --- a/sonic_platform_base/sfp_base.py +++ b/sonic_platform_base/sfp_base.py @@ -467,3 +467,22 @@ def get_xcvr_api(self): if self._xcvr_api is None: self.refresh_xcvr_api() return self._xcvr_api + + def get_platform_media_key(self, transceiver_dict, port_speed, lane_count): + """ + Retrieves the media key constructed in a platform specific way, + to be used for parsing the media settings + + Args: + transceiver_dict : + SFP transceived EEPROM dictionary + port_speed: + Configured port speed + lane_count: + Number of lanes assigned for that port + + Returns: + a dictionary with string values defined for keys, + {'vendor_key':'', 'media_key':'', 'lane_speed_key':'') + """ + raise NotImplementedError