Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[show] fix show muxcable metrics <port> for sorted output #1731

Merged
merged 4 commits into from
Jul 28, 2021

Conversation

vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Jul 28, 2021

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)

Signed-off-by: vaibhav-dahiya <[email protected]>
Signed-off-by: vaibhav-dahiya <[email protected]>
tahmed-dev
tahmed-dev previously approved these changes Jul 28, 2021
Signed-off-by: vaibhav-dahiya <[email protected]>
@vdahiya12 vdahiya12 merged commit c2ac2d2 into sonic-net:master Jul 28, 2021
@vdahiya12 vdahiya12 deleted the metrics-change branch July 28, 2021 17:47
qiluo-msft pushed a commit that referenced this pull request Jul 29, 2021
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

Signed-off-by: vaibhav-dahiya <[email protected]>
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 18, 2022
This PR updates the following commits

a9606fb [show] fix show muxcable metrics <port> for sorted output (sonic-net#1731)
7355016 [minigraph][port_config] Use imported config.main and add conditional patch (sonic-net#1728)
cc1d6e4 [configlet] Python3 compatible syntax for extracting a key from the dict (sonic-net#1721)

Signed-off-by: vaibhav-dahiya <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants