summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/topotests/bgp_bmp/bgpbmp.py15
-rw-r--r--tests/topotests/bgp_bmp/test_bgp_bmp_1.py2
-rw-r--r--tests/topotests/bgp_bmp/test_bgp_bmp_2.py2
3 files changed, 12 insertions, 7 deletions
diff --git a/tests/topotests/bgp_bmp/bgpbmp.py b/tests/topotests/bgp_bmp/bgpbmp.py
index 41995e2b5e..5e8b0d9be7 100644
--- a/tests/topotests/bgp_bmp/bgpbmp.py
+++ b/tests/topotests/bgp_bmp/bgpbmp.py
@@ -216,11 +216,16 @@ def bmp_check_for_peer_message(
]
# get the list of pairs (prefix, policy, seq) for the given message type
- peers = [
- m["peer_ip"]
- for m in messages
- if "peer_ip" in m.keys() and m["bmp_log_type"] == bmp_log_type
- ]
+ peers = []
+ for m in messages:
+ if (
+ "peer_ip" in m.keys()
+ and m["peer_ip"] != "0.0.0.0"
+ and m["bmp_log_type"] == bmp_log_type
+ ):
+ peers.append(m["peer_ip"])
+ elif m["policy"] == "loc-rib" and m["bmp_log_type"] == bmp_log_type:
+ peers.append("0.0.0.0")
# check for prefixes
for ep in expected_peers:
diff --git a/tests/topotests/bgp_bmp/test_bgp_bmp_1.py b/tests/topotests/bgp_bmp/test_bgp_bmp_1.py
index 6142863441..be3e07929a 100644
--- a/tests/topotests/bgp_bmp/test_bgp_bmp_1.py
+++ b/tests/topotests/bgp_bmp/test_bgp_bmp_1.py
@@ -192,7 +192,7 @@ def test_peer_up():
"""
tgen = get_topogen()
- peers = ["192.168.0.2", "192:168::2"]
+ peers = ["192.168.0.2", "192:168::2", "0.0.0.0"]
logger.info("checking for BMP peers up messages")
diff --git a/tests/topotests/bgp_bmp/test_bgp_bmp_2.py b/tests/topotests/bgp_bmp/test_bgp_bmp_2.py
index b45452e7c4..e8f67515bd 100644
--- a/tests/topotests/bgp_bmp/test_bgp_bmp_2.py
+++ b/tests/topotests/bgp_bmp/test_bgp_bmp_2.py
@@ -200,7 +200,7 @@ def test_peer_up():
"""
tgen = get_topogen()
- peers = ["192.168.0.2", "192:168::2"]
+ peers = ["192.168.0.2", "192:168::2", "0.0.0.0"]
logger.info("checking for BMP peers up messages")