-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Common functions for Multi ASIC (#4973)
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan arlakshm@microsoft.com The following common APIs are added for multi ASIC - an API to check if a given port is a internal or external port - an API to check if a given port-channel is internal or external - an API to check if a bgp-session is internal or external - an API to connect to the config and other dbs in the a given namespace - added common APIs to the sonic_py_common library. - update the sample port-config.ini with role column and add corresponding test to verify the ports configuration is - generated properly.
- Loading branch information
Showing
8 changed files
with
355 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
src/sonic-config-engine/tests/multi_npu_data/sample_port_config-0.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# name lanes alias asic_port_name | ||
Ethernet0 33,34,35,36 Ethernet1/1 Eth0-ASIC0 | ||
Ethernet4 29,30,31,32 Ethernet1/2 Eth1-ASIC0 | ||
Ethernet8 41,42,43,44 Ethernet1/3 Eth2-ASIC0 | ||
Ethernet12 37,38,39,40 Ethernet1/4 Eth3-ASIC0 | ||
Ethernet-BP0 13,14,15,16 Ethernet-BP0 Eth4-ASIC0 | ||
Ethernet-BP4 17,18,19,20 Ethernet-BP4 Eth5-ASIC0 | ||
Ethernet-BP8 21,22,23,24 Ethernet-BP8 Eth6-ASIC0 | ||
Ethernet-BP12 25,26,27,28 Ethernet-BP12 Eth7-ASIC0 | ||
# name lanes alias index asic_port_name role | ||
Ethernet0 33,34,35,36 Ethernet1/1 0 Eth0-ASIC0 Ext | ||
Ethernet4 29,30,31,32 Ethernet1/2 1 Eth1-ASIC0 Ext | ||
Ethernet8 41,42,43,44 Ethernet1/3 2 Eth2-ASIC0 Ext | ||
Ethernet12 37,38,39,40 Ethernet1/4 3 Eth3-ASIC0 Ext | ||
Ethernet-BP0 13,14,15,16 Ethernet-BP0 0 Eth4-ASIC0 Int | ||
Ethernet-BP4 17,18,19,20 Ethernet-BP4 1 Eth5-ASIC0 Int | ||
Ethernet-BP8 21,22,23,24 Ethernet-BP8 2 Eth6-ASIC0 Int | ||
Ethernet-BP12 25,26,27,28 Ethernet-BP12 3 Eth7-ASIC0 Int |
18 changes: 9 additions & 9 deletions
18
src/sonic-config-engine/tests/multi_npu_data/sample_port_config-1.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# name lanes alias asic_port_name | ||
Ethernet16 33,34,35,36 Ethernet1/5 Eth0-ASIC1 | ||
Ethernet20 29,30,31,32 Ethernet1/6 Eth1-ASIC1 | ||
Ethernet24 41,42,43,44 Ethernet1/7 Eth2-ASIC1 | ||
Ethernet28 37,38,39,40 Ethernet1/8 Eth3-ASIC1 | ||
Ethernet-BP16 13,14,15,16 Ethernet-BP16 Eth4-ASIC1 | ||
Ethernet-BP20 17,18,19,20 Ethernet-BP20 Eth5-ASIC1 | ||
Ethernet-BP24 21,22,23,24 Ethernet-BP24 Eth6-ASIC1 | ||
Ethernet-BP28 25,26,27,28 Ethernet-BP28 Eth7-ASIC1 | ||
# name lanes alias index asic_port_name role | ||
Ethernet16 33,34,35,36 Ethernet1/5 4 Eth0-ASIC1 Ext | ||
Ethernet20 29,30,31,32 Ethernet1/6 5 Eth1-ASIC1 Ext | ||
Ethernet24 41,42,43,44 Ethernet1/7 6 Eth2-ASIC1 Ext | ||
Ethernet28 37,38,39,40 Ethernet1/8 7 Eth3-ASIC1 Ext | ||
Ethernet-BP16 13,14,15,16 Ethernet-BP16 4 Eth4-ASIC1 Int | ||
Ethernet-BP20 17,18,19,20 Ethernet-BP20 5 Eth5-ASIC1 Int | ||
Ethernet-BP24 21,22,23,24 Ethernet-BP24 6 Eth6-ASIC1 Int | ||
Ethernet-BP28 25,26,27,28 Ethernet-BP28 7 Eth7-ASIC1 Int |
18 changes: 9 additions & 9 deletions
18
src/sonic-config-engine/tests/multi_npu_data/sample_port_config-2.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# name lanes alias asic_port_name | ||
Ethernet-BP256 61,62,63,64 Ethernet-BP256 Eth0-ASIC2 | ||
Ethernet-BP260 57,58,59,60 Ethernet-BP260 Eth1-ASIC2 | ||
Ethernet-BP264 53,54,55,56 Ethernet-BP264 Eth2-ASIC2 | ||
Ethernet-BP268 49,50,51,52 Ethernet-BP268 Eth3-ASIC2 | ||
Ethernet-BP272 45,46,47,48 Ethernet-BP272 Eth4-ASIC2 | ||
Ethernet-BP276 41,42,43,44 Ethernet-BP276 Eth5-ASIC2 | ||
Ethernet-BP280 37,38,39,40 Ethernet-BP280 Eth6-ASIC2 | ||
Ethernet-BP284 33,34,35,36 Ethernet-BP284 Eth7-ASIC2 | ||
# name lanes alias index asic_port_name role | ||
Ethernet-BP256 61,62,63,64 Ethernet-BP256 8 Eth0-ASIC2 Int | ||
Ethernet-BP260 57,58,59,60 Ethernet-BP260 9 Eth1-ASIC2 Int | ||
Ethernet-BP264 53,54,55,56 Ethernet-BP264 10 Eth2-ASIC2 Int | ||
Ethernet-BP268 49,50,51,52 Ethernet-BP268 11 Eth3-ASIC2 Int | ||
Ethernet-BP272 45,46,47,48 Ethernet-BP272 12 Eth4-ASIC2 Int | ||
Ethernet-BP276 41,42,43,44 Ethernet-BP276 13 Eth5-ASIC2 Int | ||
Ethernet-BP280 37,38,39,40 Ethernet-BP280 14 Eth6-ASIC2 Int | ||
Ethernet-BP284 33,34,35,36 Ethernet-BP284 15 Eth7-ASIC2 Int |
18 changes: 9 additions & 9 deletions
18
src/sonic-config-engine/tests/multi_npu_data/sample_port_config-3.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# name lanes alias asic_port_name | ||
Ethernet-BP384 29,30,31,32 Ethernet-BP384 Eth0-ASIC3 | ||
Ethernet-BP388 25,26,27,28 Ethernet-BP388 Eth1-ASIC3 | ||
Ethernet-BP392 21,22,23,24 Ethernet-BP392 Eth2-ASIC3 | ||
Ethernet-BP396 17,18,19,20 Ethernet-BP396 Eth3-ASIC3 | ||
Ethernet-BP400 13,14,15,16 Ethernet-BP400 Eth4-ASIC3 | ||
Ethernet-BP404 9,10,11,12 Ethernet-BP404 Eth5-ASIC3 | ||
Ethernet-BP408 5,6,7,8 Ethernet-BP408 Eth6-ASIC3 | ||
Ethernet-BP412 1,2,3,4 Ethernet-BP412 Eth7-ASIC3 | ||
# name lanes alias index asic_port_name role | ||
Ethernet-BP384 29,30,31,32 Ethernet-BP384 16 Eth0-ASIC3 Int | ||
Ethernet-BP388 25,26,27,28 Ethernet-BP388 17 Eth1-ASIC3 Int | ||
Ethernet-BP392 21,22,23,24 Ethernet-BP392 18 Eth2-ASIC3 Int | ||
Ethernet-BP396 17,18,19,20 Ethernet-BP396 19 Eth3-ASIC3 Int | ||
Ethernet-BP400 13,14,15,16 Ethernet-BP400 20 Eth4-ASIC3 Int | ||
Ethernet-BP404 9,10,11,12 Ethernet-BP404 21 Eth5-ASIC3 Int | ||
Ethernet-BP408 5,6,7,8 Ethernet-BP408 22 Eth6-ASIC3 Int | ||
Ethernet-BP412 1,2,3,4 Ethernet-BP412 23 Eth7-ASIC3 Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.