Skip to content

Commit

Permalink
[sfp_base] Raise exceptions (previously was incorrectly returning the…
Browse files Browse the repository at this point in the history
…m) (sonic-net#61)
  • Loading branch information
jleveque authored Sep 10, 2019
1 parent 087593e commit c21507e
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions sonic_platform_base/sfp_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_transceiver_info(self):
vendor_oui |1*255VCHAR |vendor OUI
========================================================================
"""
return NotImplementedError
raise NotImplementedError

def get_transceiver_bulk_status(self):
"""
Expand Down Expand Up @@ -69,7 +69,7 @@ def get_transceiver_bulk_status(self):
| |for example, tx2power stands for tx power of channel 2.
========================================================================
"""
return NotImplementedError
raise NotImplementedError

def get_transceiver_threshold_info(self):
"""
Expand Down Expand Up @@ -102,7 +102,7 @@ def get_transceiver_threshold_info(self):
txbiaslowwarning |FLOAT |Low Warning Threshold value of tx Bias Current in mA.
========================================================================
"""
return NotImplementedError
raise NotImplementedError

def get_reset_status(self):
"""
Expand All @@ -111,7 +111,7 @@ def get_reset_status(self):
Returns:
A Boolean, True if reset enabled, False if disabled
"""
return NotImplementedError
raise NotImplementedError

def get_rx_los(self):
"""
Expand All @@ -121,7 +121,7 @@ def get_rx_los(self):
A Boolean, True if SFP has RX LOS, False if not.
Note : RX LOS status is latched until a call to get_rx_los or a reset.
"""
return NotImplementedError
raise NotImplementedError

def get_tx_fault(self):
"""
Expand All @@ -131,7 +131,7 @@ def get_tx_fault(self):
A Boolean, True if SFP has TX fault, False if not
Note : TX fault status is lached until a call to get_tx_fault or a reset.
"""
return NotImplementedError
raise NotImplementedError

def get_tx_disable(self):
"""
Expand All @@ -140,7 +140,7 @@ def get_tx_disable(self):
Returns:
A Boolean, True if tx_disable is enabled, False if disabled
"""
return NotImplementedError
raise NotImplementedError

def get_tx_disable_channel(self):
"""
Expand All @@ -152,7 +152,7 @@ def get_tx_disable_channel(self):
As an example, a returned value of 0x5 indicates that channel 0
and channel 2 have been disabled.
"""
return NotImplementedError
raise NotImplementedError

def get_lpmode(self):
"""
Expand All @@ -161,7 +161,7 @@ def get_lpmode(self):
Returns:
A Boolean, True if lpmode is enabled, False if disabled
"""
return NotImplementedError
raise NotImplementedError

def get_power_override(self):
"""
Expand All @@ -170,7 +170,7 @@ def get_power_override(self):
Returns:
A Boolean, True if power-override is enabled, False if disabled
"""
return NotImplementedError
raise NotImplementedError

def get_temperature(self):
"""
Expand All @@ -179,7 +179,7 @@ def get_temperature(self):
Returns:
An integer number of current temperature in Celsius
"""
return NotImplementedError
raise NotImplementedError


def get_voltage(self):
Expand All @@ -189,7 +189,7 @@ def get_voltage(self):
Returns:
An integer number of supply voltage in mV
"""
return NotImplementedError
raise NotImplementedError

def get_tx_bias(self):
"""
Expand All @@ -200,7 +200,7 @@ def get_tx_bias(self):
for channel 0 to channel 4.
Ex. ['110.09', '111.12', '108.21', '112.09']
"""
return NotImplementedError
raise NotImplementedError

def get_rx_power(self):
"""
Expand All @@ -211,7 +211,7 @@ def get_rx_power(self):
power in mW for channel 0 to channel 4.
Ex. ['1.77', '1.71', '1.68', '1.70']
"""
return NotImplementedError
raise NotImplementedError

def get_tx_power(self):
"""
Expand All @@ -222,7 +222,7 @@ def get_tx_power(self):
for channel 0 to channel 4.
Ex. ['1.86', '1.86', '1.86', '1.86']
"""
return NotImplementedError
raise NotImplementedError

def reset(self):
"""
Expand All @@ -231,7 +231,7 @@ def reset(self):
Returns:
A boolean, True if successful, False if not
"""
return NotImplementedError
raise NotImplementedError

def tx_disable(self, tx_disable):
"""
Expand All @@ -244,7 +244,7 @@ def tx_disable(self, tx_disable):
Returns:
A boolean, True if tx_disable is set successfully, False if not
"""
return NotImplementedError
raise NotImplementedError

def tx_disable_channel(self, channel, disable):
"""
Expand All @@ -259,7 +259,7 @@ def tx_disable_channel(self, channel, disable):
Returns:
A boolean, True if successful, False if not
"""
return NotImplementedError
raise NotImplementedError

def set_lpmode(self, lpmode):
"""
Expand All @@ -272,7 +272,7 @@ def set_lpmode(self, lpmode):
Returns:
A boolean, True if lpmode is set successfully, False if not
"""
return NotImplementedError
raise NotImplementedError

def set_power_override(self, power_override, power_set):
"""
Expand All @@ -293,4 +293,4 @@ def set_power_override(self, power_override, power_set):
A boolean, True if power-override and power_set are set successfully,
False if not
"""
return NotImplementedError
raise NotImplementedError

0 comments on commit c21507e

Please sign in to comment.