OSPF: Add operational support to se router state per interface

This commit is contained in:
Mattias Walström
2024-01-15 16:29:06 +01:00
committed by Joachim Wiberg
parent aa68cd73c7
commit 43fbe4e8b1
2 changed files with 14 additions and 4 deletions
+14
View File
@@ -259,6 +259,20 @@ def add_ospf(ospf):
if(iface["networkType"] == "BROADCAST"):
interface["interface-type"] = "broadcast"
if iface.get("state"):
map = {
"DependUpon": "down", # Do not know what this is, never seen it and no entry in yang, but it listed before down in list in frr
"Down": "down",
"Waiting": "waiting",
"Loopback": "loopback",
"Point-To-Point": "point-to-point",
"DROther": "dr-other",
"Backup": "bdr",
"DR": "dr"
}
val = map.get(iface["state"], "unknown")
interface["state"] = val
neighbors = []
for neigh in iface["neighbors"]:
neighbor={}
@@ -385,10 +385,6 @@ module infix-routing {
{
deviate not-supported;
}
deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:state"
{
deviate not-supported;
}
deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:hello-timer"
{
deviate not-supported;