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 interface status <interface-name> throws error (fixes #427) #440

Merged
merged 10 commits into from
Mar 7, 2019

Conversation

kirankella
Copy link
Contributor

@kirankella kirankella commented Jan 23, 2019

- What I did
Wrong db variable is passed when getting the keys for a particular interface from app-db.

- How I did it
Pass the proper db variable in intfutil when getting the keys for a particular interface from app-db.

- How to verify it
show interface status Ethernet0

- Previous command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show interface status Ethernet0
Traceback (most recent call last):
File "/usr/bin/intfutil", line 204, in
main(sys.argv[1:])
File "/usr/bin/intfutil", line 197, in main
interface_stat = IntfStatus(intf_name)
File "/usr/bin/intfutil", line 129, in init
appl_db_keys = appl_db_keys_get(self.appl_db, intf_name)
File "/usr/bin/intfutil", line 41, 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

- New command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show interface status Ethernet0
Interface Lanes Speed MTU Alias Oper Admin Type

Ethernet0 13 N/A 9100 tenGigE0 up up SFP

-->

KKK and others added 10 commits January 4, 2019 16:01
…terface status

A bug in intfutil script that gets the keys object from the app-db for a specific interface

Signed-off-by: kiran.kella@broadcom.com
…stead of the optional alias attribute

* Addressed review comment for sonic-net#424
* Undone the change in intfutil file to push that fix in a seperate PR.

Signed-off-by: kiran.kella@broadcom.com
…c interface.

* While getting the keys from port table for a specific interface, wrong db is passed, fixed the bug

Signed-off-by: kiran.kella@broadcom.com
…c interface.

* While getting the keys from port table for a specific interface, wrong db is passed, fixed the bug

Signed-off-by: kiran.kella@broadcom.com
@kirankella kirankella changed the title show interface status <interface-name> throws error show interface status <interface-name> throws error (fixes #427) Jan 23, 2019
@jleveque jleveque added the Bug label Feb 1, 2019
@jleveque
Copy link
Contributor

Retest this please

@kirankella
Copy link
Contributor Author

Retest this please

Retested to be working fine.

@lguohan lguohan merged commit 72b7069 into sonic-net:master Mar 7, 2019
yxieca pushed a commit that referenced this pull request Mar 19, 2019
* sonic-utilities: Bug fix while showing interface status for a specific interface.

* While getting the keys from port table for a specific interface, wrong db is passed, fixed the bug

Signed-off-by: kiran.kella@broadcom.com
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.

4 participants