@@ -1852,6 +1852,7 @@ def test_bgp_99_bmp(self):
18521852 mirror_buffer = '32000000'
18531853 bmp_path = base_path + ['bmp' ]
18541854 target_path = bmp_path + ['target' , target_name ]
1855+ source_iface = 'eth0'
18551856
18561857 # by default the 'bmp' module not loaded for the bgpd expect Error
18571858 self .cli_set (bmp_path )
@@ -1879,6 +1880,7 @@ def test_bgp_99_bmp(self):
18791880
18801881 # config other bmp options
18811882 self .cli_set (target_path + ['address' , target_address ])
1883+ self .cli_set (target_path + ['source-interface' , source_iface ])
18821884 self .cli_set (bmp_path + ['mirror-buffer-limit' , mirror_buffer ])
18831885 self .cli_set (target_path + ['port' , target_port ])
18841886 self .cli_set (target_path + ['min-retry' , min_retry ])
@@ -1899,7 +1901,18 @@ def test_bgp_99_bmp(self):
18991901 self .assertIn (f'bmp monitor ipv6 unicast { monitor_ipv6 } ' , frrconfig )
19001902 self .assertIn (f'bmp monitor ipv4 unicast loc-rib' , frrconfig )
19011903 self .assertIn (f'bmp monitor ipv6 unicast loc-rib' , frrconfig )
1902- self .assertIn (f'bmp connect { target_address } port { target_port } min-retry { min_retry } max-retry { max_retry } ' , frrconfig )
1904+ self .assertIn (f'bmp connect { target_address } port { target_port } min-retry { min_retry } max-retry { max_retry } source-interface { source_iface } ' , frrconfig )
1905+
1906+ # verify source-interface is removed from FRR config after deletion
1907+ self .cli_delete (target_path + ['source-interface' ])
1908+ self .cli_commit ()
1909+
1910+ frrconfig = self .getFRRconfig (f'router bgp { ASN } ' , stop_section = '^exit' )
1911+ self .assertIn (
1912+ f'bmp connect { target_address } port { target_port } min-retry { min_retry } max-retry { max_retry } ' ,
1913+ frrconfig
1914+ )
1915+ self .assertNotIn ('source-interface' , frrconfig )
19031916
19041917 def test_bgp_100_link_state (self ):
19051918 router_id = '127.0.0.1'
0 commit comments