mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
infamy: route: ospf: Adopt to changes done in 2c88e1bdf5
Now there is no guarantee that the control-plane-protocol array exist in operational.
This commit is contained in:
committed by
Tobias Waldekranz
parent
05a46475ed
commit
c4d567f994
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user