From c4d567f994fac0d7d5bbe52f45254cc7fb74be09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Mon, 20 May 2024 11:10:01 +0200 Subject: [PATCH] infamy: route: ospf: Adopt to changes done in 2c88e1bdf5 Now there is no guarantee that the control-plane-protocol array exist in operational. --- test/infamy/route.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/infamy/route.py b/test/infamy/route.py index f2373850..a981b5e4 100644 --- a/test/infamy/route.py +++ b/test/infamy/route.py @@ -40,8 +40,8 @@ def ipv6_route_exist(target, prefix, nexthop=None,source_protocol=None): def _get_ospf_status(target): - xpath="/ietf-routing:routing/control-plane-protocols/control-plane-protocol/ietf-ospf:ospf" - rib = target.get_data(xpath)["routing"]["control-plane-protocols"]["control-plane-protocol"] + xpath="/ietf-routing:routing/control-plane-protocols" + rib = target.get_data(xpath)["routing"]["control-plane-protocols"].get("control-plane-protocol", {}) for p in rib: if p["type"] == "ietf-ospf:ospfv2": return p["ospf"]