-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chassis-packet] minigraph parsing and BGP template changes (#8966)
1. Changes for Generation LC-Graph for packet-based chassis. 2. Added Support Ipv6 Peering on Loopback4096 for voq also 3. Updated asic topology yml files to be offset of slot 4. Made slot_num to take string slot<number> instead of number 5. Consolidated template_dpg_voq_asic.j2 into dpg_asic.j2 6. Remove Loopback4096 from asic topology and parse as dut invertory for multi-asic 7. Updated topo_facts parsing for asic topology_ 8. Internal BGP Session rename from <VoqChassisInternal> to <ChassisInternal> and take switch_type as value. Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
- Loading branch information
Showing
16 changed files
with
745 additions
and
31 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
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
13 changes: 13 additions & 0 deletions
13
src/sonic-bgpcfgd/tests/data/internal/peer-group.conf/param_chasiss_packet.json
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"CONFIG_DB__DEVICE_METADATA": { | ||
"localhost": { | ||
"type": "SpineRouter", | ||
"sub_role": "BackEnd", | ||
"switch_type": "chassis-packet" | ||
} | ||
}, | ||
"CONFIG_DB__LOOPBACK_INTERFACE": { | ||
"Loopback4096|10.10.10.10/32": {}, | ||
"Loopback4096|2603:10e2:400::3/128": {} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/sonic-bgpcfgd/tests/data/internal/peer-group.conf/result_chasiss_packet.conf
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
! | ||
! template: bgpd/templates/internal/peer-group.conf.j2 | ||
! | ||
neighbor INTERNAL_PEER_V4 peer-group | ||
neighbor INTERNAL_PEER_V6 peer-group | ||
address-family ipv4 | ||
neighbor INTERNAL_PEER_V4 update-source 10.10.10.10 | ||
neighbor INTERNAL_PEER_V4 soft-reconfiguration inbound | ||
neighbor INTERNAL_PEER_V4 allowas-in 1 | ||
neighbor INTERNAL_PEER_V4 route-map FROM_BGP_INTERNAL_PEER_V4 in | ||
neighbor INTERNAL_PEER_V4 route-map TO_BGP_INTERNAL_PEER_V4 out | ||
exit-address-family | ||
address-family ipv6 | ||
neighbor INTERNAL_PEER_V4 update-source 2603:10e2:400::3 | ||
neighbor INTERNAL_PEER_V6 soft-reconfiguration inbound | ||
neighbor INTERNAL_PEER_V6 allowas-in 1 | ||
neighbor INTERNAL_PEER_V6 route-map FROM_BGP_INTERNAL_PEER_V6 in | ||
neighbor INTERNAL_PEER_V6 route-map TO_BGP_INTERNAL_PEER_V6 out | ||
exit-address-family | ||
! | ||
! end of template: bgpd/templates/internal/peer-group.conf.j2 | ||
! |
67 changes: 67 additions & 0 deletions
67
src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis.conf
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
! | ||
! template: bgpd/bgpd.main.conf.j2 | ||
! | ||
! bgp multiple-instance | ||
! | ||
! BGP configuration | ||
! | ||
! TSA configuration | ||
! | ||
ip prefix-list PL_LoopbackV4 permit 55.55.55.55/32 | ||
! | ||
ipv6 prefix-list PL_LoopbackV6 permit fc00::/64 | ||
! | ||
ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 5 permit 10.10.10.0/24 | ||
! | ||
ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 10 permit fc01::/64 | ||
! | ||
route-map HIDE_INTERNAL permit 10 | ||
set community no-export | ||
! | ||
! | ||
router bgp 55555 | ||
! | ||
bgp log-neighbor-changes | ||
no bgp default ipv4-unicast | ||
no bgp ebgp-requires-policy | ||
! | ||
bgp bestpath as-path multipath-relax | ||
! | ||
bgp graceful-restart restart-time 240 | ||
bgp graceful-restart | ||
bgp graceful-restart preserve-fw-state | ||
bgp graceful-restart select-defer-time 45 | ||
! | ||
bgp router-id 55.55.55.56 | ||
! | ||
network 55.55.55.55/32 | ||
network 55.55.55.56/32 route-map HIDE_INTERNAL | ||
! | ||
address-family ipv6 | ||
network fc00::1/64 | ||
exit-address-family | ||
address-family ipv6 | ||
network fc00::2/128 route-map HIDE_INTERNAL | ||
exit-address-family | ||
! | ||
network 10.10.10.1/24 | ||
address-family ipv6 | ||
network fc01::1/64 | ||
exit-address-family | ||
! | ||
address-family ipv4 | ||
redistribute connected route-map HIDE_INTERNAL | ||
exit-address-family | ||
address-family ipv6 | ||
redistribute connected route-map HIDE_INTERNAL | ||
exit-address-family | ||
! | ||
address-family ipv4 | ||
maximum-paths 64 | ||
exit-address-family | ||
address-family ipv6 | ||
maximum-paths 64 | ||
exit-address-family | ||
! | ||
! end of template: bgpd/bgpd.main.conf.j2 | ||
! |
35 changes: 35 additions & 0 deletions
35
src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis.json
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"DEVICE_METADATA": { | ||
"localhost": { | ||
"bgp_asn": "55555", | ||
"sub_role": "FrontEnd", | ||
"switch_type": "chassis-packet" | ||
} | ||
}, | ||
"LOOPBACK_INTERFACE": { | ||
"Loopback0|55.55.55.55/32": {}, | ||
"Loopback0|fc00::1/128": {}, | ||
"Loopback4096|55.55.55.56/32": {}, | ||
"Loopback4096|fc00::2/128": {} | ||
}, | ||
"VLAN_INTERFACE": { | ||
"Vlan10|10.10.10.1/24": {}, | ||
"Vlan10|fc01::1/64": {}, | ||
"Vlan20": {"vnet_name": "Vnet1"}, | ||
"Vlan20|20.20.20.1/24": {}, | ||
"Vlan20|fd01::1/64": {} | ||
}, | ||
"constants": { | ||
"bgp": { | ||
"multipath_relax": { | ||
"enabled": true | ||
}, | ||
"graceful_restart": { | ||
"enabled": true | ||
}, | ||
"maximum_paths": { | ||
"enabled": true | ||
} | ||
} | ||
} | ||
} |
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.