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] show interface status added vlan and portchannels to command #483

Merged
merged 5 commits into from
Mar 21, 2019

Conversation

tsvanduyn
Copy link
Contributor

@tsvanduyn tsvanduyn commented Mar 13, 2019

- What I did
Updated the file to add a "VLAN" column that reports "routed", "VlanXXXX" "trunk", or "PortChannelXXXX" depending on how that interface is configured. This is how Arista/Cisco report on this command.

Also added PortChannels to the bottom on the command like Cisco/Arista.

- How I did it
Updated the intfutil file to add additonal methods to support this.

- How to verify it
run the "show int status" command on the sonic systems.

- Previous command output (if the output of a command-line utility has changed)

admin@str-s6000-acs-11:/usr/bin$ show int status
  Interface            Lanes    Speed    MTU           Alias    Oper    Admin    Type    Asym PFC
-----------  ---------------  -------  -----  --------------  ------  -------  ------  ----------
  Ethernet0      25,26,27,28      40G   9100    fortyGigE0/0      up       up   QSFP+         off
  Ethernet4      29,30,31,32      40G   9100    fortyGigE0/4      up       up   QSFP+         off
  Ethernet8      33,34,35,36      40G   9100    fortyGigE0/8      up       up   QSFP+         off
 Ethernet12      37,38,39,40      40G   9100   fortyGigE0/12      up       up   QSFP+         off
 Ethernet16      45,46,47,48      40G   9100   fortyGigE0/16      up       up   QSFP+         off
 Ethernet20      41,42,43,44      40G   9100   fortyGigE0/20      up       up   QSFP+         off
 Ethernet24          1,2,3,4      40G   9100   fortyGigE0/24      up       up   QSFP+         off
 Ethernet28          5,6,7,8      40G   9100   fortyGigE0/28      up       up   QSFP+         off
 Ethernet32      13,14,15,16      40G   9100   fortyGigE0/32      up       up   QSFP+         off
 Ethernet36       9,10,11,12      40G   9100   fortyGigE0/36      up       up   QSFP+         off
 Ethernet40      17,18,19,20      40G   9100   fortyGigE0/40      up       up   QSFP+         off
 Ethernet44      21,22,23,24      40G   9100   fortyGigE0/44      up       up   QSFP+         off
 Ethernet48      53,54,55,56      40G   9100   fortyGigE0/48      up       up   QSFP+         off
 Ethernet52      49,50,51,52      40G   9100   fortyGigE0/52      up       up   QSFP+         off
 Ethernet56      57,58,59,60      40G   9100   fortyGigE0/56    down       up   QSFP+         off
 Ethernet60      61,62,63,64      40G   9100   fortyGigE0/60      up       up     N/A         off
 Ethernet64      69,70,71,72      40G   9100   fortyGigE0/64      up       up   QSFP+         off
 Ethernet68      65,66,67,68      40G   9100   fortyGigE0/68      up       up   QSFP+         off
 Ethernet72      73,74,75,76      40G   9100   fortyGigE0/72      up       up   QSFP+         off
 Ethernet76      77,78,79,80      40G   9100   fortyGigE0/76      up       up   QSFP+         off
 Ethernet80  109,110,111,112      40G   9100   fortyGigE0/80      up       up   QSFP+         off
 Ethernet84  105,106,107,108      40G   9100   fortyGigE0/84      up       up   QSFP+         off
 Ethernet88  113,114,115,116      40G   9100   fortyGigE0/88      up       up   QSFP+         off
 Ethernet92  117,118,119,120      40G   9100   fortyGigE0/92      up       up   QSFP+         off
 Ethernet96  125,126,127,128      40G   9100   fortyGigE0/96      up       up   QSFP+         off
Ethernet100  121,122,123,124      40G   9100  fortyGigE0/100      up       up   QSFP+         off
Ethernet104      81,82,83,84      40G   9100  fortyGigE0/104      up       up   QSFP+         off
Ethernet108      85,86,87,88      40G   9100  fortyGigE0/108      up       up   QSFP+         off
Ethernet112      93,94,95,96      40G   9100  fortyGigE0/112      up       up   QSFP+         off
Ethernet116      89,90,91,92      40G   9100  fortyGigE0/116      up       up   QSFP+         off
Ethernet120  101,102,103,104      40G   9100  fortyGigE0/120      up       up   QSFP+         off
Ethernet124     97,98,99,100      40G   9100  fortyGigE0/124      up       up   QSFP+         off

- New command output (if the output of a command-line utility has changed)

admin@str-s6000-acs-11:/usr/bin$ show int status
      Interface            Lanes    Speed    MTU           Alias             Vlan    Oper    Admin    Type    Asym PFC
---------------  ---------------  -------  -----  --------------  ---------------  ------  -------  ------  ----------
      Ethernet0      25,26,27,28      40G   9100    fortyGigE0/0           routed      up       up   QSFP+         off
      Ethernet4      29,30,31,32      40G   9100    fortyGigE0/4           routed      up       up   QSFP+         off
      Ethernet8      33,34,35,36      40G   9100    fortyGigE0/8           routed      up       up   QSFP+         off
     Ethernet12      37,38,39,40      40G   9100   fortyGigE0/12           routed      up       up   QSFP+         off
     Ethernet16      45,46,47,48      40G   9100   fortyGigE0/16           routed      up       up   QSFP+         off
     Ethernet20      41,42,43,44      40G   9100   fortyGigE0/20           routed      up       up   QSFP+         off
     Ethernet24          1,2,3,4      40G   9100   fortyGigE0/24           routed      up       up   QSFP+         off
     Ethernet28          5,6,7,8      40G   9100   fortyGigE0/28           routed      up       up   QSFP+         off
     Ethernet32      13,14,15,16      40G   9100   fortyGigE0/32           routed      up       up   QSFP+         off
     Ethernet36       9,10,11,12      40G   9100   fortyGigE0/36           routed      up       up   QSFP+         off
     Ethernet40      17,18,19,20      40G   9100   fortyGigE0/40           routed      up       up   QSFP+         off
     Ethernet44      21,22,23,24      40G   9100   fortyGigE0/44            trunk      up       up   QSFP+         off
     Ethernet48      53,54,55,56      40G   9100   fortyGigE0/48           routed      up       up   QSFP+         off
     Ethernet52      49,50,51,52      40G   9100   fortyGigE0/52           routed      up       up   QSFP+         off
     Ethernet56      57,58,59,60      40G   9100   fortyGigE0/56           routed    down       up   QSFP+         off
     Ethernet60      61,62,63,64      40G   9100   fortyGigE0/60           routed      up       up     N/A         off
     Ethernet64      69,70,71,72      40G   9100   fortyGigE0/64           routed      up       up   QSFP+         off
     Ethernet68      65,66,67,68      40G   9100   fortyGigE0/68           routed      up       up   QSFP+         off
     Ethernet72      73,74,75,76      40G   9100   fortyGigE0/72           routed      up       up   QSFP+         off
     Ethernet76      77,78,79,80      40G   9100   fortyGigE0/76           routed      up       up   QSFP+         off
     Ethernet80  109,110,111,112      40G   9100   fortyGigE0/80           routed      up       up   QSFP+         off
     Ethernet84  105,106,107,108      40G   9100   fortyGigE0/84           routed      up       up   QSFP+         off
     Ethernet88  113,114,115,116      40G   9100   fortyGigE0/88           routed      up       up   QSFP+         off
     Ethernet92  117,118,119,120      40G   9100   fortyGigE0/92           routed      up       up   QSFP+         off
     Ethernet96  125,126,127,128      40G   9100   fortyGigE0/96           routed      up       up   QSFP+         off
    Ethernet100  121,122,123,124      40G   9100  fortyGigE0/100           routed      up       up   QSFP+         off
    Ethernet104      81,82,83,84      40G   9100  fortyGigE0/104           routed      up       up   QSFP+         off
    Ethernet108      85,86,87,88      40G   9100  fortyGigE0/108  PortChannel0001      up       up   QSFP+         off
    Ethernet112      93,94,95,96      40G   9100  fortyGigE0/112           routed      up       up   QSFP+         off
    Ethernet116      89,90,91,92      40G   9100  fortyGigE0/116           routed      up       up   QSFP+         off
    Ethernet120  101,102,103,104      40G   9100  fortyGigE0/120           routed      up       up   QSFP+         off
    Ethernet124     97,98,99,100      40G   9100  fortyGigE0/124           routed      up       up   QSFP+         off
    PortChannel0001          N/A      40G   9100             N/A           routed    down       up     N/A         N/A

@tsvanduyn tsvanduyn changed the title added vlan and portchannels to command [show] show interface status added vlan and portchannels to command Mar 13, 2019
scripts/intfutil Outdated Show resolved Hide resolved
scripts/intfutil Outdated Show resolved Hide resolved
scripts/intfutil Outdated Show resolved Hide resolved
scripts/intfutil Outdated Show resolved Hide resolved
scripts/intfutil Outdated Show resolved Hide resolved
scripts/intfutil Outdated Show resolved Hide resolved
scripts/intfutil Outdated Show resolved Hide resolved
scripts/intfutil Outdated Show resolved Hide resolved
@prsunny
Copy link
Contributor

prsunny commented Mar 19, 2019

What is the output if interface is member of multiple Vlans?

@jleveque
Copy link
Contributor

@tsvanduyn: Can you please update the new command output in the description above to reflect your latest change?

@tsvanduyn
Copy link
Contributor Author

Here is what the new output would look like:
admin@str-s6000-acs-11:/usr/bin$ show int status
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC


  Ethernet0      25,26,27,28      40G   9100    fortyGigE0/0           routed      up       up   QSFP+         off
  Ethernet4      29,30,31,32      40G   9100    fortyGigE0/4           routed      up       up   QSFP+         off
  Ethernet8      33,34,35,36      40G   9100    fortyGigE0/8           routed      up       up   QSFP+         off
 Ethernet12      37,38,39,40      40G   9100   fortyGigE0/12           routed      up       up   QSFP+         off
 Ethernet16      45,46,47,48      40G   9100   fortyGigE0/16           routed      up       up   QSFP+         off
 Ethernet20      41,42,43,44      40G   9100   fortyGigE0/20           routed      up       up   QSFP+         off
 Ethernet24          1,2,3,4      40G   9100   fortyGigE0/24           routed      up       up   QSFP+         off
 Ethernet28          5,6,7,8      40G   9100   fortyGigE0/28           routed      up       up   QSFP+         off
 Ethernet32      13,14,15,16      40G   9100   fortyGigE0/32           routed      up       up   QSFP+         off
 Ethernet36       9,10,11,12      40G   9100   fortyGigE0/36           routed      up       up   QSFP+         off
 Ethernet40      17,18,19,20      40G   9100   fortyGigE0/40           routed      up       up   QSFP+         off
 Ethernet44      21,22,23,24      40G   9100   fortyGigE0/44            trunk      up       up   QSFP+         off
 Ethernet48      53,54,55,56      40G   9100   fortyGigE0/48           routed      up       up   QSFP+         off
 Ethernet52      49,50,51,52      40G   9100   fortyGigE0/52           routed      up       up   QSFP+         off
 Ethernet56      57,58,59,60      40G   9100   fortyGigE0/56           routed    down       up   QSFP+         off
 Ethernet60      61,62,63,64      40G   9100   fortyGigE0/60           routed      up       up     N/A         off
 Ethernet64      69,70,71,72      40G   9100   fortyGigE0/64           routed      up       up   QSFP+         off
 Ethernet68      65,66,67,68      40G   9100   fortyGigE0/68           routed      up       up   QSFP+         off
 Ethernet72      73,74,75,76      40G   9100   fortyGigE0/72           routed      up       up   QSFP+         off
 Ethernet76      77,78,79,80      40G   9100   fortyGigE0/76           routed      up       up   QSFP+         off
 Ethernet80  109,110,111,112      40G   9100   fortyGigE0/80           routed      up       up   QSFP+         off
 Ethernet84  105,106,107,108      40G   9100   fortyGigE0/84           routed      up       up   QSFP+         off
 Ethernet88  113,114,115,116      40G   9100   fortyGigE0/88           routed      up       up   QSFP+         off
 Ethernet92  117,118,119,120      40G   9100   fortyGigE0/92           routed      up       up   QSFP+         off
 Ethernet96  125,126,127,128      40G   9100   fortyGigE0/96           routed      up       up   QSFP+         off
Ethernet100  121,122,123,124      40G   9100  fortyGigE0/100           routed      up       up   QSFP+         off
Ethernet104      81,82,83,84      40G   9100  fortyGigE0/104           routed      up       up   QSFP+         off
Ethernet108      85,86,87,88      40G   9100  fortyGigE0/108  PortChannel0001      up       up   QSFP+         off
Ethernet112      93,94,95,96      40G   9100  fortyGigE0/112           routed      up       up   QSFP+         off
Ethernet116      89,90,91,92      40G   9100  fortyGigE0/116           routed      up       up   QSFP+         off
Ethernet120  101,102,103,104      40G   9100  fortyGigE0/120           routed      up       up   QSFP+         off
Ethernet124     97,98,99,100      40G   9100  fortyGigE0/124           routed      up       up   QSFP+         off

PortChannel0001 N/A 40G 9100 N/A routed down up N/A N/A

@jleveque
Copy link
Contributor

@tsvanduyn: please update the output in the description of the PR to reflect the new change, because it currently doesn't match.

@tsvanduyn
Copy link
Contributor Author

@jleveque I've updated the description. Thanks Travis.

@jleveque jleveque requested a review from prsunny March 19, 2019 22:58
Copy link
Contributor

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

Output looks good to me

@jleveque
Copy link
Contributor

Retest this please

@jleveque jleveque merged commit 7030c97 into sonic-net:master Mar 21, 2019
elif intf_name.startswith('Ethernet'):
appl_db_keys = appl_db.keys(appl_db.APPL_DB, "PORT_TABLE:%s" % intf_name)
elif intf_name in front_panel_ports_list:
appl_db_keys = db.keys(appl_db.APPL_DB, "PORT_TABLE:%s" % intf_name)
Copy link

Choose a reason for hiding this comment

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

break #427 again

stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 18, 2022
Include below commits

sonic-swss-common
```
83d3351 2021-04-22 | [swig] fix ConfigDBConnector.db_name (sonic-net#483) [Qi Luo]
fdf296f 2021-04-09 | Fix: ConfigDBConnector call super init with proper parameter name (sonic-net#470) [Qi Luo]
4f580e3 2021-03-26 | [swig] translate SonicV2Connector::keys return type from C++ vector<string> to Python list (sonic-net#468) [Qi Luo]
```

sonic-snmpagent
```
c160c2b 2021-08-04 | CPU Spike because of redundant and flooded keyspace notifis handled (sonic-net#230) [Vivek Reddy]
a4dd3bf 2021-08-03 | Non-block reading counters to tolerate corrupted/delayed counters in COUNTERS_DB (sonic-net#231) [Qi Luo]
```
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.

5 participants