mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 12:33:02 +02:00
OSPF: Add operational support to se router state per interface
This commit is contained in:
committed by
Joachim Wiberg
parent
aa68cd73c7
commit
43fbe4e8b1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user