Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sonic_platform_base/sfp_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,16 @@ def get_power_override(self):
"""
raise NotImplementedError

def get_power_override_support(self):
"""
Retrieves whether power override is supported by this SFP

Returns:
bool: True if power override is supported, False if not supported
None: if not implemented or xcvr_api is not available
"""
return None

def get_temperature(self):
"""
Retrieves the temperature of this SFP
Expand Down
10 changes: 10 additions & 0 deletions sonic_platform_base/sonic_xcvr/sfp_optoe_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,16 @@ def rx_disable_channel(self, channel, disable):
api = self.get_xcvr_api()
return api.rx_disable_channel(channel, disable) if api is not None else None

def get_power_override_support(self):
"""
Retrieves whether power override is supported by this SFP

Returns:
bool: True if power override is supported, False if not supported
None: if xcvr_api is not available
"""
api = self.get_xcvr_api()
return api.get_power_override_support() if api is not None else None
Comment thread
arista-hpandya marked this conversation as resolved.

def get_power_override(self):
api = self.get_xcvr_api()
Expand Down
Loading