Skip to content

Commit

Permalink
[sfp_base] Update return value documentation of channel-specific meth…
Browse files Browse the repository at this point in the history
…ods (sonic-net#98)

Update docstrings of `get_rx_los()`, `get_tx_fault()` and `get_tx_disable()` methods to reflect that they should return a list of values where each value reflect the status of an individual SFP channel. Also add more detail to other channel-specific method docstrings.
  • Loading branch information
jleveque authored Jun 24, 2020
1 parent 750cb81 commit 85edabb
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions sonic_platform_base/sfp_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ def get_rx_los(self):
Retrieves the RX LOS (loss-of-signal) status of SFP
Returns:
A Boolean, True if SFP has RX LOS, False if not.
A list of boolean values, representing the RX LOS status
of each available channel, value is True if SFP channel
has RX LOS, False if not.
E.g., for a tranceiver with four channels: [False, False, True, False]
Note : RX LOS status is latched until a call to get_rx_los or a reset.
"""
raise NotImplementedError
Expand All @@ -128,7 +131,10 @@ def get_tx_fault(self):
Retrieves the TX fault status of SFP
Returns:
A Boolean, True if SFP has TX fault, False if not
A list of boolean values, representing the TX fault status
of each available channel, value is True if SFP channel
has TX fault, False if not.
E.g., for a tranceiver with four channels: [False, False, True, False]
Note : TX fault status is lached until a call to get_tx_fault or a reset.
"""
raise NotImplementedError
Expand All @@ -138,7 +144,10 @@ def get_tx_disable(self):
Retrieves the tx_disable status of this SFP
Returns:
A Boolean, True if tx_disable is enabled, False if disabled
A list of boolean values, representing the TX disable status
of each available channel, value is True if SFP channel
is TX disabled, False if not.
E.g., for a tranceiver with four channels: [False, False, True, False]
"""
raise NotImplementedError

Expand Down Expand Up @@ -198,7 +207,7 @@ def get_tx_bias(self):
Returns:
A list of floats, representing TX bias in mA
for each available channel
Ex. ['110.09', '111.12', '108.21', '112.09']
E.g., for a tranceiver with four channels: ['110.09', '111.12', '108.21', '112.09']
"""
raise NotImplementedError

Expand All @@ -209,7 +218,7 @@ def get_rx_power(self):
Returns:
A list of floats, representing received optical
power in mW for each available channel
Ex. ['1.77', '1.71', '1.68', '1.70']
E.g., for a tranceiver with four channels: ['1.77', '1.71', '1.68', '1.70']
"""
raise NotImplementedError

Expand All @@ -220,7 +229,7 @@ def get_tx_power(self):
Returns:
A list of floats, representing TX power in mW
for each available channel
Ex. ['1.86', '1.86', '1.86', '1.86']
E.g., for a tranceiver with four channels: ['1.86', '1.86', '1.86', '1.86']
"""
raise NotImplementedError

Expand Down

0 comments on commit 85edabb

Please sign in to comment.