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

First code-drop dealing with intf_description and intf_status enhancements #158

Merged
merged 2 commits into from
Dec 6, 2017

Conversation

rodnymolina
Copy link
Contributor

I have taken care of the following items as part of this patch. There is another patch coming right after with changes made over a different repo:

  • Implemented a proper "show interface description" command -- i entirely removed the old one.
  • Enabled user to query system for a specific interface.
  • Extended "show interface status" command to do the same as above (query a specific interface).
  • Rewrote "show interface status" and integrated this code with "show interface description" one to prevent code-duplication and enhance modularity.
  • Added "speed" attribute as part of "show interface status" command.

admin@lnos-x1-a-asw02:~$ show interfaces description
Command: intfutil description
Interface Oper Admin Alias Description


Ethernet112 up up fiftyGigE1/9 Special interface no. 1
Ethernet114 down down fiftyGigE1/10 N/A
Ethernet116 up up fiftyGigE1/11 Special interface no. 2
Ethernet118 down down fiftyGigE1/12 N/A
Ethernet120 up up fiftyGigE1/13 N/A
Ethernet122 down down fiftyGigE1/14 N/A
Ethernet124 down up fiftyGigE1/15 N/A

admin@lnos-x1-a-asw02:~$ show interfaces status | more
Command: intfutil status
Interface Lanes Speed MTU Alias Oper Admin


Ethernet112 113,114 50G 9100 fiftyGigE1/9 up up
Ethernet114 115,116 N/A 1500 fiftyGigE1/10 down down
Ethernet116 117,118 50G 9100 fiftyGigE1/11 up up
Ethernet118 119,120 N/A 1500 fiftyGigE1/12 down down
Ethernet120 121,122 N/A 9100 fiftyGigE1/13 up up
Ethernet122 123,124 N/A 1500 fiftyGigE1/14 down down
Ethernet124 125,126 N/A 9100 fiftyGigE1/15 down up

…ments

I have taken care of the following items as part of this patch. There is another patch coming right after with changes made over a different repo:

 * Implemented a proper "show interface description" command -- i entirely removed the old one.
 * Enabled user to query system for a specific interface.
 * Extended "show interface status" command to do the same as above (query a specific interface).
 * Rewrote "show interface status" and integrated this code with "show interface description" one to prevent code-duplication and enhance modularity.
 * Added "speed" attribute as part of "show interface status" command.

admin@lnos-x1-a-asw02:~$ show interfaces description
Command: intfutil description
  Interface    Oper    Admin          Alias              Description
  -----------  ------  -------  -------------  -----------------------
  Ethernet112      up       up   fiftyGigE1/9  Special interface no. 1
  Ethernet114    down     down  fiftyGigE1/10                      N/A
  Ethernet116      up       up  fiftyGigE1/11  Special interface no. 2
  Ethernet118    down     down  fiftyGigE1/12                      N/A
  Ethernet120      up       up  fiftyGigE1/13                      N/A
  Ethernet122    down     down  fiftyGigE1/14                      N/A
  Ethernet124    down       up  fiftyGigE1/15                      N/A

admin@lnos-x1-a-asw02:~$ show interfaces status | more
Command: intfutil status
   Interface    Lanes    Speed    MTU          Alias    Oper    Admin
  -----------  -------  -------  -----  -------------  ------  -------
  Ethernet112  113,114      50G   9100   fiftyGigE1/9      up       up
  Ethernet114  115,116      N/A   1500  fiftyGigE1/10    down     down
  Ethernet116  117,118      50G   9100  fiftyGigE1/11      up       up
  Ethernet118  119,120      N/A   1500  fiftyGigE1/12    down     down
  Ethernet120  121,122      N/A   9100  fiftyGigE1/13      up       up
  Ethernet122  123,124      N/A   1500  fiftyGigE1/14    down     down
  Ethernet124  125,126      N/A   9100  fiftyGigE1/15    down       up
@rodnymolina
Copy link
Contributor Author

rodnymolina commented Dec 4, 2017

admin@lnos-x1-a-asw02:~$ show interfaces description
Command: intfutil description
  Interface    Oper    Admin          Alias              Description
  -----------  ------  -------  -------------  -----------------------
  Ethernet112      up       up   fiftyGigE1/9  Special interface no. 1
  Ethernet114    down     down  fiftyGigE1/10                      N/A
  Ethernet116      up       up  fiftyGigE1/11  Special interface no. 2
  Ethernet118    down     down  fiftyGigE1/12                      N/A
  Ethernet120      up       up  fiftyGigE1/13                      N/A
  Ethernet122    down     down  fiftyGigE1/14                      N/A
  Ethernet124    down       up  fiftyGigE1/15                      N/A

admin@lnos-x1-a-asw02:~$ show interfaces status
Command: intfutil status
   Interface    Lanes    Speed    MTU          Alias    Oper    Admin
  -----------  -------  -------  -----  -------------  ------  -------
  Ethernet112  113,114      50G   9100   fiftyGigE1/9      up       up
  Ethernet114  115,116      N/A   1500  fiftyGigE1/10    down     down
  Ethernet116  117,118      50G   9100  fiftyGigE1/11      up       up
  Ethernet118  119,120      N/A   1500  fiftyGigE1/12    down     down
  Ethernet120  121,122      N/A   9100  fiftyGigE1/13      up       up
  Ethernet122  123,124      N/A   1500  fiftyGigE1/14    down     down
  Ethernet124  125,126      N/A   9100  fiftyGigE1/15    down       up

rodnymolina pushed a commit to rodnymolina/sonic-buildimage that referenced this pull request Dec 4, 2017
…ements.

Here i'm adding minor extensions to support "show interface description" command. Please refer to PR#158 for more details: sonic-net/sonic-utilities#158
scripts/intfutil Outdated


def main(args):
#command, intf_name):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, will do

@lguohan lguohan merged commit 0c0a2f0 into sonic-net:master Dec 6, 2017
@rodnymolina rodnymolina deleted the intfutil branch December 6, 2017 09:08
lguohan pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Dec 7, 2017
…rface-status enhancements (#1207)

* Final code-drop for interface-description and interface-status enhancements.

Here i'm adding minor extensions to support "show interface description" command. Please refer to PR#158 for more details: sonic-net/sonic-utilities#158

* Add interface-description UT and adjust logic to have 'description' field being optional

RB=
G=lnos-reviewers
R=ntrianta,rjonnadu,rmolina,sfardeen,zxu
A=

* Updating reference to sonic-utilities to collect latest changes
@stcheng stcheng mentioned this pull request Jan 3, 2018
vdahiya12 pushed a commit to vdahiya12/sonic-utilities that referenced this pull request Jul 23, 2021
…on 3 (sonic-net#158)

xcvrd would crash on platforms which support media settings with Python 3 because division would result in a float rather than an int. Fix using floor division.
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
[Namespace]: Fix SAI_ID key used in cpfcIfTable and
csqIfQosGroupStatsTable implementation (sonic-net#138)
Implementation changes for CiscoBgp4MIB (sonic-net#158)
[ciscoSwitchQosMIB]: Remove invocation of update_data function
 during (sonic-net#161)

Signed-off-by: Abhishek Dosi <[email protected]>
mihirpat1 pushed a commit to mihirpat1/sonic-utilities that referenced this pull request Sep 15, 2023
…g Loopback, PRBS modes on the Y cable (sonic-net#158)

* [sonic_y_cable] Add support for measuring BER and EYE scan
 with Loopback, PRBS and Mission modes.

What is the motivation for this PR?
To add the necessary support for measuring BER and EYE scan, and run PRBS/Loopback modes on the Y cable 

How did you do it?
Added the changes in sonic-platform-common module in the y_cable.py file

How did you verify/test it?
opened a python shell and ran the API's manually and test verified
the values are correct.

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