Skip to content

Commit

Permalink
OSPF: Add operational support to se router state per interface
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaswal authored and troglobit committed Jan 15, 2024
1 parent aa68cd7 commit 43fbe4e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 14 additions & 0 deletions board/netconf/rootfs/libexec/infix/yanger
Original file line number Diff line number Diff line change
Expand Up @@ -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={}
Expand Down
4 changes: 0 additions & 4 deletions src/confd/yang/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 43fbe4e

Please sign in to comment.