summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/topotests/rip_allow_ecmp/test_rip_allow_ecmp.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/topotests/rip_allow_ecmp/test_rip_allow_ecmp.py b/tests/topotests/rip_allow_ecmp/test_rip_allow_ecmp.py
index b0ba146984..acc0aea9e8 100644
--- a/tests/topotests/rip_allow_ecmp/test_rip_allow_ecmp.py
+++ b/tests/topotests/rip_allow_ecmp/test_rip_allow_ecmp.py
@@ -52,10 +52,18 @@ def test_rip_allow_ecmp():
r1 = tgen.gears["r1"]
def _show_rip_routes():
- output = json.loads(
- r1.vtysh_cmd("show yang operational-data /frr-ripd:ripd ripd")
+ xpath = (
+ "/frr-ripd:ripd/instance[vrf='default']"
+ "/state/routes/route[prefix='10.10.10.1/32']"
)
try:
+ output = json.loads(
+ r1.vtysh_cmd(f"show yang operational-data {xpath} ripd")
+ )
+ except Exception:
+ return False
+
+ try:
output = output["frr-ripd:ripd"]["instance"][0]["state"]["routes"]
except KeyError:
return False