]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: extend the bmp test to support bmp loc-rib 11800/head
authorFarid MIHOUB <farid.mihoub@6wind.com>
Fri, 11 Aug 2023 14:18:17 +0000 (16:18 +0200)
committerMaxence Younsi <mx.yns@outlook.fr>
Sat, 4 Nov 2023 11:19:30 +0000 (12:19 +0100)
Configure the bmp monitor unicast loc-rib.
Check the logging messages for the updated/withdrawn prefixes with
the presence of the loc-rib peer-type.

Signed-off-by: Farid MIHOUB <farid.mihoub@6wind.com>
tests/topotests/bgp_bmp/test_bgp_bmp.py
tests/topotests/lib/bmp_collector/bmp.py

index 1aeb2d9c19934e46e5f60d4b1eacef5829c8fbf1..250f1cb90d0e8aa6684c1db0adbbdc9cbbf14eb0 100644 (file)
@@ -49,6 +49,7 @@ SEQ = 0
 
 PRE_POLICY = "pre-policy"
 POST_POLICY = "post-policy"
+LOC_RIB = "loc-rib"
 
 
 def build_topo(tgen):
@@ -239,6 +240,8 @@ def test_bmp_bgp_unicast():
     unicast_prefixes(PRE_POLICY)
     logger.info("*** Unicast prefixes post-policy logging ***")
     unicast_prefixes(POST_POLICY)
+    logger.info("*** Unicast prefixes loc-rib logging ***")
+    unicast_prefixes(LOC_RIB)
 
 
 if __name__ == "__main__":
index 4ac4fdb0a9301a6ec367c32a1bb1fd05b0291dbf..57f642aa0ef4460042c2b67570f9a38278996af7 100644 (file)
@@ -252,6 +252,7 @@ class BMPPerPeerMessage:
 
         if peer_type == 0x03:
             msg['is_filtered'] = bool(peer_flags & IS_FILTERED)
+            msg['policy'] = 'loc-rib'
         else:
             # peer_flags = 0x0000 0000
             # ipv6, post-policy, as-path, adj-rib-out, reserverdx4