Skip to content

Commit c0f5779

Browse files
andywongaristabyu343
authored andcommitted
Add dummy get/set_lpmode API for SFF8472
The get/set_lpmode API is not applicable to SFF8472 but it should be included anyway to avoid AttributeErrors from SfpOptoeBase.get/set_lpmode.
1 parent 59babf5 commit c0f5779

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

  • sonic_platform_base/sonic_xcvr/api/public

sonic_platform_base/sonic_xcvr/api/public/sff8472.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_transceiver_info(self):
3737
if len > 0:
3838
cable_len = len
3939
cable_type = type
40-
40+
4141
xcvr_info = {
4242
"type": serial_id[consts.ID_FIELD],
4343
"type_abbrv_name": serial_id[consts.ID_ABBRV_FIELD],
@@ -296,5 +296,26 @@ def get_lpmode_support(self):
296296
def get_power_override_support(self):
297297
return False
298298

299+
def get_lpmode(self):
300+
'''
301+
Retrieves low power mode status
302+
303+
Returns:
304+
bool: True if module in low power else returns False.
305+
'''
306+
return False
307+
308+
def set_lpmode(self, lpmode):
309+
'''
310+
This function sets LPMode for the module.
311+
312+
Args:
313+
lpmode (bool): False means LPMode Off, True means LPMode On
314+
315+
Returns:
316+
bool: True if the provision succeeds, False if it fails
317+
'''
318+
return False
319+
299320
def is_copper(self):
300321
return self.xcvr_eeprom.read(consts.SFP_CABLE_TECH_FIELD) == 'Passive Cable'

0 commit comments

Comments
 (0)