-
Notifications
You must be signed in to change notification settings - Fork 661
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
[sonic-utilities] : Refactoring interfaces status to interfaces status brief/details #552
base: master
Are you sure you want to change the base?
Conversation
retest this please |
1 similar comment
retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As part of this PR, please also update the documentation at https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md to reflect these changes.
Updated the PR with documentation. |
retest this please |
5 similar comments
retest this please |
retest this please |
retest this please |
retest this please |
retest this please |
Retest this please |
retest this please |
@jleveque @stcheng console output (https://sonic-jenkins.westus2.cloudapp.azure.com/job/common/job/sonic-utilities-build-pr/76/console) says operation not permitted for last 3-4 builds I have tried, is there any issue with the jenkin server ? |
retest this please |
1 similar comment
retest this please |
@jleveque Please help reviewing the changes. Also the backend changes sonic-net/sonic-swss#928 to reflect it on the show commands Thanks, |
Following features are added as the part of this PR-
Signed-off-by: Prem Prakash prprakash@linkedin.com
- What I did
Refactored show interfaces status to show interfaces status brief/details with other enhancements like flap counter and last flap time and clearing flap counter.
- How to verify it
After the code changes python-sonic-utilities debian package had to be built, copied it on the switch and installed (along with this had to install the docker-orchagent.gz to test the functionality of flap counter and last flap time)
- Previous command output (if the output of a command-line utility has changed)
Previous Output-
admin@lnos-x1-a-fab01:~$ show interfaces status
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC
Ethernet0 65,66,67,68 100G 9100 Eth1 routed up up QSFP28 or later N/A
Ethernet4 69,70,71,72 100G 9100 Eth2 routed up up N/A N/A
per interface-
admin@lnos-x1-a-fab01:
$ show interfaces status Ethernet4$Traceback (most recent call last):
File "/usr/bin/intfutil", line 424, in
main(sys.argv[1:])
File "/usr/bin/intfutil", line 417, in main
interface_stat = IntfStatus(intf_name)
File "/usr/bin/intfutil", line 337, in init
appl_db_keys = appl_db_keys_get(self.appl_db, self.front_panel_ports_list, intf_name)
File "/usr/bin/intfutil", line 90, in appl_db_keys_get
appl_db_keys = db.keys(appl_db.APPL_DB, "PORT_TABLE:%s" % intf_name)
NameError: global name 'db' is not defined
admin@lnos-x1-a-fab01:
- New command output (if the output of a command-line utility has changed)
-->
admin@lnos-x1-a-csw02:~$ show interfaces status
Usage: show interfaces status [OPTIONS] COMMAND [ARGS]...
Show interface status information
Options:
-?, -h, --help Show this message and exit.
Commands:
brief Show Interface status brief information
details Show Interface status details information
admin@lnos-x1-a-csw02:~$
admin@lnos-x1-a-csw02:~$ show interfaces status bri
Last cached time was 2019-06-12 09:06:58.306766
Interface Lanes Speed MTU Alias Vlan Oper Admin
Ethernet0 65,66,67,68 100G 9100 Eth1 routed down up
Ethernet4 69,70,71,72 100G 9100 Eth2 routed up up
admin@lnos-x1-a-csw02:~$ show interfaces status bri Ethernet4
Last cached time was 2019-06-12 09:06:58.306766
Interface Lanes Speed MTU Alias Vlan Oper Admin
Ethernet4 69,70,71,72 100G 9100 Eth2 routed up up
admin@lnos-x1-a-csw02:~$
admin@lnos-x1-a-csw02:~$ show interfaces status details
Last cached time was 2019-06-12 09:06:58.306766
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC Flaps Last Flap (in UTC)
Ethernet0 65,66,67,68 100G 9100 Eth1 routed down up QSFP28 or later N/A 0 N/A
Ethernet4 69,70,71,72 100G 9100 Eth2 routed up up QSFP28 or later N/A 0 Wed Jun 12 06:46:18 2019
admin@lnos-x1-a-csw02:~$ show interfaces status details Ethernet4
Last cached time was 2019-06-12 09:06:58.306766
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC Flaps Last Flap (in UTC)
Ethernet4 69,70,71,72 100G 9100 Eth2 routed up up QSFP28 or later N/A 0 Wed Jun 12 06:46:18 2019
admin@lnos-x1-a-csw02:
$ sudo config interface shutdown Ethernet4$ show interfaces status details Ethernet4admin@lnos-x1-a-csw02:
Last cached time was 2019-06-12 09:06:58.306766
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC Flaps Last Flap (in UTC)
Ethernet4 69,70,71,72 100G 9100 Eth2 routed down down QSFP28 or later N/A 1 Wed Jun 12 09:21:45 2019
admin@lnos-x1-a-csw02:
$ sudo config interface startup Ethernet4$ show interfaces status details Ethernet4admin@lnos-x1-a-csw02:
Last cached time was 2019-06-12 09:06:58.306766
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC Flaps Last Flap (in UTC)
Ethernet4 69,70,71,72 100G 9100 Eth2 routed up up QSFP28 or later N/A 2 Wed Jun 12 09:22:01 2019
admin@lnos-x1-a-csw02:~$ sudo sonic-clear counters
Cleared counters
admin@lnos-x1-a-csw02:~$ show interfaces status details Ethernet4
Last cached time was 2019-06-12 09:22:19.263575
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC Flaps Last Flap (in UTC)
Ethernet4 69,70,71,72 100G 9100 Eth2 routed up up QSFP28 or later N/A 0 Wed Jun 12 09:22:01 2019
admin@lnos-x1-a-csw02:~$