Skip to content
Merged
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
13 changes: 7 additions & 6 deletions sonic_platform_base/chassis_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,17 +468,18 @@ def get_all_sfps(self):
A list of objects derived from SfpBase representing all sfps
available on this chassis
"""
return self._sfp_list
return [ sfp for sfp in self._sfp_list if sfp is not None ]

def get_sfp(self, index):
"""
Retrieves sfp represented by (0-based) index <index>
Retrieves sfp corresponding to physical port <index>

Args:
index: An integer, the index (0-based) of the sfp to retrieve.
The index should be the sequence of a physical port in a chassis,
starting from 0.
For example, 0 for Ethernet0, 1 for Ethernet4 and so on.
index: An integer (>=0), the index of the sfp to retrieve.
The index should correspond to the physical port in a chassis.
For example:-
1 for Ethernet0, 2 for Ethernet4 and so on for one platform.
0 for Ethernet0, 1 for Ethernet4 and so on for another platform.

Returns:
An object dervied from SfpBase representing the specified sfp
Expand Down