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

[bgpcfgd]: Split one bgp mega-template to chunks. #4143

Merged
merged 34 commits into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7b109d3
New bgpcfgd
pavel-shirshov Dec 28, 2019
d10ff63
Disable unit tests for frr.
pavel-shirshov Feb 13, 2020
5beb656
Another full rewrite
pavel-shirshov Mar 25, 2020
cd06c31
Use correct path
pavel-shirshov Apr 14, 2020
af9fbfb
Remove fixme
pavel-shirshov Apr 14, 2020
e9dbfa3
Add specification to exception handlers
pavel-shirshov Apr 14, 2020
fc51718
Fix typo
pavel-shirshov Apr 15, 2020
c6d375d
Add comments
PksStudent Apr 16, 2020
212d23d
Improve wait_for_*
pavel-shirshov Apr 16, 2020
935abcc
Remove one excessive fixme
pavel-shirshov Apr 16, 2020
a333c82
Rename runner and inverse the dependency
pavel-shirshov Apr 16, 2020
d9b664e
Add log_* functions
pavel-shirshov Apr 16, 2020
b138bdc
Remove fixme
pavel-shirshov Apr 16, 2020
2d1104b
Partially restore support for PR#3888
pavel-shirshov Apr 16, 2020
c3f9bfe
Add db name for BGPPeerMgr
pavel-shirshov Apr 16, 2020
d0a183b
Porting PR#4260. EVPN support
pavel-shirshov Apr 16, 2020
40f16c9
Full support of PR#3888
pavel-shirshov Apr 17, 2020
a47389a
Restore frr.conf configuration
pavel-shirshov Apr 17, 2020
235e1c3
Implement 'set src' for zebra
PksStudent Apr 17, 2020
3d09126
Rename db_id into db_name
pavel-shirshov Apr 18, 2020
04129f6
Refactor list of managers
pavel-shirshov Apr 18, 2020
726c883
Enhancements
PksStudent Apr 18, 2020
dc01af7
Fixes after pylint report
pavel-shirshov Apr 19, 2020
9935885
Change debug mode parameters
PksStudent Apr 19, 2020
9debc26
Small changes
pavel-shirshov Apr 19, 2020
8f78750
Disable debug
PksStudent Apr 19, 2020
0bb4cd6
Restored tests
PksStudent Apr 21, 2020
5edd39e
Return set ipv6 next-hop prefer-global clause
PksStudent Apr 21, 2020
ea88cfd
Don't render parts related to Loopback0 ipv6 addresses if we don't ha…
PksStudent Apr 21, 2020
d44926e
Fixed typos
PksStudent Apr 22, 2020
1b9def0
Fix issues in bgp templates for general peers
pavel-shirshov Apr 22, 2020
d7e1d76
It's normal to have the 'local_addr' missing for the dynamic bgp sess…
PksStudent Apr 22, 2020
1272cd4
Don't announce anything to bgp monitors
PksStudent Apr 22, 2020
73b8266
Fix typo
lguohan Apr 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ route-map HIDE_INTERNAL permit 10
set community local-AS
!
{% endif %}
{% if DEVICE_METADATA['localhost']['type'] == 'InternalBackend' %}
route-map OVERRIDE_ORIGINATOR_ID permit 10
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
{% if prefix | ipv4 and name == 'Loopback0' %}
set originator-id {{ prefix | ip }}
{% endif %}
{% endfor %}
{% endif %}
!
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,34 @@
or (bgp_session['holdtime'] is defined and bgp_session['holdtime'] | int != 180) %}
neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }}
{% endif %}
!
{% if bgp_session.has_key('admin_status') and bgp_session['admin_status'] == 'down' or not bgp_session.has_key('admin_status') and CONFIG_DB__DEVICE_METADATA['localhost'].has_key('default_bgp_status') and CONFIG_DB__DEVICE_METADATA['localhost']['default_bgp_status'] == 'down' %}
neighbor {{ neighbor_addr }} shutdown
{% endif %}
!
{% if neighbor_addr | ipv4 %}
address-family ipv4
neighbor {{ neighbor_addr }} peer-group PEER_V4
{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'InternalBackend' %}
neighbor {{ neighbor_addr }} route-map FROM_BGP_PEER_V4_INT in
{% endif %}
{% elif neighbor_addr | ipv6 %}
address-family ipv6
{% if bgp_session['asn'] != bgp_asn %}
neighbor {{ neighbor_addr }} route-map set-next-hop-global-v6 in
{% endif %}
neighbor {{ neighbor_addr }} peer-group PEER_V6
{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'InternalBackend' %}
neighbor {{ neighbor_addr }} route-map FROM_BGP_PEER_V6_INT in
{% endif %}
{% endif %}
!
{% if bgp_session['rrclient'] | int != 0 %}
neighbor {{ neighbor_addr }} route-reflector-client
{% endif %}
!
{% if bgp_session['nhopself'] | int != 0 %}
neighbor {{ neighbor_addr }} next-hop-self
{% endif %}
!
{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'InternalBackend' %}
neighbor {{ neighbor_addr }} route-map OVERRIDE_ORIGINATOR_ID in
{% endif %}
!
{% if bgp_session["asn"] == bgp_asn
and CONFIG_DB__DEVICE_METADATA['localhost']['type'] == "SpineChassisFrontendRouter" %}
{% if bgp_session["asn"] == bgp_asn and CONFIG_DB__DEVICE_METADATA['localhost']['type'] == "SpineChassisFrontendRouter" %}
address-family l2vpn evpn
neighbor {{ neighbor_addr }} activate
advertise-all-vni
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
neighbor PEER_V4 allowas-in 1
{% endif %}
neighbor PEER_V4 soft-reconfiguration inbound
neighbor PEER_V4 route-map FROM_BGP_PEER_V4 in
neighbor PEER_V4 route-map TO_BGP_PEER_V4 out
exit-address-family
address-family ipv6
{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'ToRRouter' %}
neighbor PEER_V6 allowas-in 1
{% endif %}
neighbor PEER_V6 soft-reconfiguration inbound
neighbor PEER_V4 route-map FROM_BGP_PEER_V6 in
lguohan marked this conversation as resolved.
Show resolved Hide resolved
neighbor PEER_V6 route-map TO_BGP_PEER_V6 out
exit-address-family
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,29 @@
! template: bgpd/templates/general/policies.conf.j2
!
!
!
route-map FROM_BGP_PEER_V4 permit 100
!
route-map TO_BGP_PEER_V4 permit 100
!
!
route-map TO_BGP_PEER_V6 permit 1
set ipv6 next-hop prefer-global
route-map FROM_BGP_PEER_V6 permit 1
set ipv6 next-hop prefer-global
!
route-map FROM_BGP_PEER_V6 permit 100
!
route-map TO_BGP_PEER_V6 permit 100
!
{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'InternalBackend' %}
route-map FROM_BGP_PEER_V4_INT permit 2
set originator-id {{ loopback0_ipv4 | ip }}
!
route-map FROM_BGP_PEER_V6_INT permit 1
set ipv6 next-hop prefer-global
!
route-map FROM_BGP_PEER_V6_INT permit 2
set originator-id {{ loopback0_ipv4 | ip }}
{% endif %}
!
! end of template: bgpd/templates/general/policies.conf.j2
!