[show] fix show muxcable metrics <port> for sorted output #1731
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: vaibhav-dahiya [email protected]
This PR fixes the display for show muxcable metrics by sorting the output based on the time of the event.
This is required for better display.
For example
admin@str2-7050cx3-acs-12:~$ show mux metrics Ethernet0
PORT EVENT TIME
--------- --------------------------- ---------------------------
Ethernet0 xcvrd_switch_standby_start 2021-Jul-21 02:03:28.784027
Ethernet0 orch_switch_standby_end 2021-Jul-21 02:03:28.788150
Ethernet0 linkmgrd_switch_standby_end 2021-Jul-21 02:03:28.790288
What I did
changed the output for muxcable metrics command for sorted time order
How I did it
made the changes inside the show/muxcable.py by sorting the output
How to verify it
unit-tests
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)