Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion data/templates/frr/bgpd.frr.j2
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@
neighbor {{ neighbor }} activate
exit-address-family
!
{# j2lint: disable=jinja-statements-delimeter #}

Check warning on line 261 in data/templates/frr/bgpd.frr.j2

View workflow job for this annotation

GitHub Actions / typos

"delimeter" should be "delimiter".
{% endfor %}
{% endif %}
{# j2lint: disable=jinja-statements-delimeter #}

Check warning on line 264 in data/templates/frr/bgpd.frr.j2

View workflow job for this annotation

GitHub Actions / typos

"delimeter" should be "delimiter".
{%- endmacro -%}
!
router bgp {{ system_as }} {{ 'vrf ' ~ vrf if vrf is vyos_defined }} {{ 'as-notation ' ~ parameters.as_notation | replace('as', '') if parameters.as_notation is vyos_defined }}
Expand Down Expand Up @@ -538,7 +538,7 @@
{% endif %}
{% endif %}
{% if bmp_config.address is vyos_defined %}
bmp connect {{ bmp_config.address }} port {{ bmp_config.port }} min-retry {{ bmp_config.min_retry }} max-retry {{ bmp_config.max_retry }}
bmp connect {{ bmp_config.address }} port {{ bmp_config.port }} min-retry {{ bmp_config.min_retry }} max-retry {{ bmp_config.max_retry }} {{ 'source-interface ' ~ bmp_config.source_interface if bmp_config.source_interface is vyos_defined }}
{% endif %}
{% endfor %}
exit
Expand All @@ -547,14 +547,14 @@
{% if peer_group is vyos_defined %}
{% for peer, config in peer_group.items() %}
{{ bgp_neighbor(peer, config, true) }}
{# j2lint: disable=jinja-statements-delimeter #}

Check warning on line 550 in data/templates/frr/bgpd.frr.j2

View workflow job for this annotation

GitHub Actions / typos

"delimeter" should be "delimiter".
{%- endfor %}
{% endif %}
!
{% if neighbor is vyos_defined %}
{% for peer, config in neighbor.items() %}
{{ bgp_neighbor(peer, config) }}
{# j2lint: disable=jinja-statements-delimeter #}

Check warning on line 557 in data/templates/frr/bgpd.frr.j2

View workflow job for this annotation

GitHub Actions / typos

"delimeter" should be "delimiter".
{%- endfor %}
{% endif %}
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@
<children>
#include <include/address-ipv4-ipv6-single.xml.i>
#include <include/port-number.xml.i>
#include <include/source-interface.xml.i>
<leafNode name="port">
<defaultValue>5000</defaultValue>
</leafNode>
Expand Down
18 changes: 17 additions & 1 deletion smoketest/scripts/cli/test_protocols_bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1852,6 +1852,7 @@ def test_bgp_99_bmp(self):
mirror_buffer = '32000000'
bmp_path = base_path + ['bmp']
target_path = bmp_path + ['target', target_name]
source_iface = 'eth0'

# by default the 'bmp' module not loaded for the bgpd expect Error
self.cli_set(bmp_path)
Expand Down Expand Up @@ -1879,6 +1880,7 @@ def test_bgp_99_bmp(self):

# config other bmp options
self.cli_set(target_path + ['address', target_address])
self.cli_set(target_path + ['source-interface', source_iface])
self.cli_set(bmp_path + ['mirror-buffer-limit', mirror_buffer])
self.cli_set(target_path + ['port', target_port])
self.cli_set(target_path + ['min-retry', min_retry])
Expand All @@ -1899,7 +1901,21 @@ def test_bgp_99_bmp(self):
self.assertIn(f'bmp monitor ipv6 unicast {monitor_ipv6}', frrconfig)
self.assertIn(f'bmp monitor ipv4 unicast loc-rib', frrconfig)
self.assertIn(f'bmp monitor ipv6 unicast loc-rib', frrconfig)
self.assertIn(f'bmp connect {target_address} port {target_port} min-retry {min_retry} max-retry {max_retry}', frrconfig)
self.assertIn(
f'bmp connect {target_address} port {target_port} min-retry {min_retry} max-retry {max_retry} source-interface {source_iface}',
frrconfig,
)

# verify source-interface is removed from FRR config after deletion
self.cli_delete(target_path + ['source-interface'])
self.cli_commit()

frrconfig = self.getFRRconfig(f'router bgp {ASN}', stop_section='^exit')
self.assertIn(
f'bmp connect {target_address} port {target_port} min-retry {min_retry} max-retry {max_retry}',
frrconfig,
)
self.assertNotIn('source-interface', frrconfig)

def test_bgp_100_link_state(self):
router_id = '127.0.0.1'
Expand Down
Loading