Skip to content

Commit

Permalink
Implement is_copper for SFP (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
Junchao-Mellanox authored Nov 15, 2023
1 parent 5cc3e30 commit 30fb0ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sonic_platform_base/sonic_xcvr/api/public/sff8472.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,6 @@ def get_lpmode_support(self):

def get_power_override_support(self):
return False

def is_copper(self):
return self.xcvr_eeprom.read(consts.SFP_CABLE_TECH_FIELD) == 'Passive Cable'
1 change: 1 addition & 0 deletions tests/sonic_xcvr/test_sff8472.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def test_api(self):
self.api.get_transceiver_thresholds_support()
self.api.get_lpmode_support()
self.api.get_power_override_support()
self.api.is_copper()

def test_temp(self):
temp_field = self.mem_map.get_field(consts.TEMPERATURE_FIELD)
Expand Down

0 comments on commit 30fb0ce

Please sign in to comment.