005702ba0e
- Why I did it Update the routine is_bgp_session_internal() by checking the BGP_INTERNAL_NEIGHBOR table. Additionally to address the review comment #5520 (comment) Add timer settings as will in the internal session templates and keep it minimal as these sessions which will always be up. Updates to the internal tests data + add all of it to template tests. - How I did it Updated the APIs and the template files. - How to verify it Verified the internal BGP sessions are displayed correctly with show commands with this API is_bgp_session_internal()
36 lines
1.1 KiB
Django/Jinja
36 lines
1.1 KiB
Django/Jinja
!
|
|
! template: bgpd/templates/internal/instance.conf.j2
|
|
!
|
|
neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }}
|
|
neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }}
|
|
neighbor {{ neighbor_addr }} timers 3 10
|
|
!
|
|
{% if neighbor_addr | ipv4 %}
|
|
address-family ipv4
|
|
neighbor {{ neighbor_addr }} peer-group INTERNAL_PEER_V4
|
|
!
|
|
{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
|
|
neighbor {{ neighbor_addr }} route-map FROM_BGP_INTERNAL_PEER_V4 in
|
|
{% endif %}
|
|
!
|
|
{% elif neighbor_addr | ipv6 %}
|
|
address-family ipv6
|
|
neighbor {{ neighbor_addr }} peer-group INTERNAL_PEER_V6
|
|
!
|
|
{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
|
|
neighbor {{ neighbor_addr }} route-map FROM_BGP_INTERNAL_PEER_V6 in
|
|
{% endif %}
|
|
{% endif %}
|
|
!
|
|
{% if bgp_session.has_key('rrclient') and bgp_session['rrclient'] | int != 0 %}
|
|
neighbor {{ neighbor_addr }} route-reflector-client
|
|
{% endif %}
|
|
!
|
|
neighbor {{ neighbor_addr }} next-hop-self force
|
|
!
|
|
neighbor {{ neighbor_addr }} activate
|
|
exit-address-family
|
|
!
|
|
! end of template: bgpd/templates/internal/instance.conf.j2
|
|
!
|