Skip to content

Commit ac7ea4f

Browse files
authored
[sfputil]: Refactor and add support for presence, low-power mode and reset (sonic-net#90)
- Convert sfputil to 'Click'-based command line utility - Refactor sfputilbase.py: Clean up API and convert to proper abstract base class to make implementation more straightforward - Add support for querying SFP transceiver presence - Add support for querying & setting low-power mode - Add support for resetting SFP transceivers
1 parent c7f6ff6 commit ac7ea4f

File tree

7 files changed

+1203
-1526
lines changed

7 files changed

+1203
-1526
lines changed

data/etc/bash_completion.d/sfputil

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
_sfputil_completion() {
2+
COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \
3+
COMP_CWORD=$COMP_CWORD \
4+
_SFPUTIL_COMPLETE=complete $1 ) )
5+
return 0
6+
}
7+
8+
complete -F _sfputil_completion -o default sfputil;

0 commit comments

Comments
 (0)