Skip to content

[201911] show interface portchannel support for Multi ASIC#1071

Merged
arlakshm merged 3 commits into201911from
masic_teamshow_201911
Sep 3, 2020
Merged

[201911] show interface portchannel support for Multi ASIC#1071
arlakshm merged 3 commits into201911from
masic_teamshow_201911

Conversation

@arlakshm
Copy link
Copy Markdown
Contributor

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan [email protected]

- What I did
Add support for multi ASIC CLI options for show interface portchannels
2 new options have added

  • [-n, --namespace] to allow user to display the information for given namespaces
    If this option is not present the information from all the namespaces will be displayed

  • [-d, --display] to allow user to display information related both internal and external interfaces
    If this option is not present only external interfaces/neighbors will be display

One single ASIC platform, this options are not valid, so the behavior remains unchanged

- How I did it

  • Change the teamshow script to get the port channel information from all the Namespaces
  • Add support for -n and -d options
    This new options are ignored for single ASIC platforms

- How to verify it
Help menu on multi ASIC platforms


admin@sonic:~$ show interface portchannel -h
Usage: show interface portchannel [OPTIONS]

  Show PortChannel information

Options:
  -d, --display [all|frontend]    Show internal interfacees  [default:
                                  frontend]
  -n, --namespace [asic0|asic1|asic2|asic3|asic4|asic5]
                                  Namespace name or all
  --verbose                       Enable verbose output
  -?, -h, --help                  Show this message and exit.
admin@sonic:~$ 

Sample output for show interface portchannel

admin@sonic:~$ show interface portchannel 
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,
       S - selected, D - deselected, * - not synced
  No.  Team Dev         Protocol     Ports
-----  ---------------  -----------  -----------------------------------------------------------------------------------------------------------------------------------------------
 1001  PortChannel1001  LACP(A)(Up)  Ethernet136(S)
 1002  PortChannel1002  LACP(A)(Up)  Ethernet0(S) Ethernet4(S)
 1003  PortChannel1003  LACP(A)(Up)  Ethernet144(S)
 1004  PortChannel1004  LACP(A)(Up)  Ethernet148(S)
 1005  PortChannel1005  LACP(A)(Up)  Ethernet20(S) Ethernet16(S)
 1006  PortChannel1006  LACP(A)(Up)  Ethernet152(S)
 1007  PortChannel1007  LACP(A)(Up)  Ethernet156(S)
 1008  PortChannel1008  LACP(A)(Up)  Ethernet64(S) Ethernet68(S)
 1009  PortChannel1009  LACP(A)(Up)  Ethernet168(S)
 1010  PortChannel1010  LACP(A)(Up)  Ethernet176(S)
 1011  PortChannel1011  LACP(A)(Up)  Ethernet80(S) Ethernet84(S)
 1012  PortChannel1012  LACP(A)(Up)  Ethernet180(S)
 1013  PortChannel1013  LACP(A)(Up)  Ethernet184(S)
 1014  PortChannel1014  LACP(A)(Up)  Ethernet188(S)
 1015  PortChannel1015  LACP(A)(Up)  Ethernet200(S)
 1016  PortChannel1016  LACP(A)(Up)  Ethernet208(S)
 1017  PortChannel1017  LACP(A)(Up)  Ethernet212(S)
 1018  PortChannel1018  LACP(A)(Up)  Ethernet216(S)
 1019  PortChannel1019  LACP(A)(Up)  Ethernet220(S)
 1020  PortChannel1020  LACP(A)(Up)  Ethernet232(S)
 1021  PortChannel1021  LACP(A)(Up)  Ethernet240(S)
 1022  PortChannel1022  LACP(A)(Up)  Ethernet244(S)
 1023  PortChannel1023  LACP(A)(Up)  Ethernet248(S)
 1024  PortChannel1024  LACP(A)(Up)  Ethernet252(S)

**Sample output for single ASIC **

admin@sonic:~$ show interface portchannel -n asic0
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,
       S - selected, D - deselected, * - not synced
  No.  Team Dev         Protocol     Ports
-----  ---------------  -----------  ---------------------------
 1002  PortChannel1002  LACP(A)(Up)  Ethernet0(S) Ethernet4(S)
 1005  PortChannel1005  LACP(A)(Up)  Ethernet20(S) Ethernet16(S)

admin@sonic:~$ show interface portchannel -n asic0 -d all
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,
       S - selected, D - deselected, * - not synced
  No.  Team Dev         Protocol     Ports
-----  ---------------  -----------  ---------------------------------------------------------------------------------------------------------------------------------------
 1002  PortChannel1002  LACP(A)(Up)  Ethernet0(S) Ethernet4(S)
 1005  PortChannel1005  LACP(A)(Up)  Ethernet20(S) Ethernet16(S)
 4001  PortChannel4001  LACP(A)(Up)  Ethernet-BP4(S) Ethernet-BP16(S) Ethernet-BP20(S) Ethernet-BP12(S) Ethernet-BP24(S) Ethernet-BP0(S) Ethernet-BP28(S) Ethernet-BP8(S)
 4002  PortChannel4002  LACP(A)(Up)  Ethernet-BP48(S) Ethernet-BP60(S) Ethernet-BP52(S) Ethernet-BP40(S) Ethernet-BP36(S) Ethernet-BP56(S) Ethernet-BP44(S) Ethernet-BP32(S)

- 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: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
@arlakshm arlakshm requested review from abdosi and jleveque August 25, 2020 13:54
@jleveque
Copy link
Copy Markdown
Contributor

Retest this please

@arlakshm arlakshm merged commit 43f2dac into 201911 Sep 3, 2020
@arlakshm arlakshm deleted the masic_teamshow_201911 branch September 3, 2020 18:11
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
Fix error when running 'show lldp table' or 'show lldp neighbor'
through SSH command. (sonic-net#1067)
[201911]: Multi asic show interface support (sonic-net#1070)
[counterpoll] Add new FC group for port buffer drop counters
(sonic-net#1024)
[201911] show interface portchannel support for Multi ASIC
(sonic-net#1071)
Fix a typo in mellanox_buffer_migrator (sonic-net#1090)
Fix pfcwd stats crash with invalid queue name (sonic-net#1077)
[PFCWD] Fix issue with "pfcwd show stats" command during SONiC init
(sonic-net#1018)
enable watchdog before running platform specific reboot plugin
(sonic-net#1037)
Add namespace of the process in the coredump filename. (sonic-net#1091)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants