OSPF database support (ietf-ospf.yang)
Description
List OSPF database via NETCONF is not supported, as the associated yang branch of "ietf-ospf.yang" is deviated as not supported by "infix-routing.yang". This feature request concerns listing what is currently available via CLI "show ospf database" also via YANG.
Additional Information
The database branch of the "ietf-ospf" yang model is huge. Determining what is supported by Infix today is the first step in order to suggest the scope for this feature request. An rudimentary example of what can be shown by CLI today is given below.
admin@R6:/> show ospf database
OSPF Router with ID (10.1.1.6)
Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Link count
10.1.1.1 10.1.1.1 1523 0x80000007 0x03ce 3
10.1.1.2 10.1.1.2 1494 0x80000009 0x366c 4
10.1.1.3 10.1.1.3 1493 0x80000009 0xaeed 4
10.1.1.4 10.1.1.4 1502 0x80000007 0x596d 3
10.1.1.5 10.1.1.5 1561 0x80000009 0xb4e4 4
10.1.1.6 10.1.1.6 1510 0x80000009 0xe4ae 4
admin@R6:/>
General Information
Anyone can help out by sponsoring development of new features or contributing pull requests. Please use this issue for discussions related to the feature.
I include a discussion proposal for infix-routing.yang for ospf database support in infix. [email protected]
A diff towards the current infix-routing yang is also provided diff-ospf-database.txt
In short, the idea is to open up support for OSPF database in "ietf-ospf.yang" for OSPFv2, but skipping any "opaque LSA" support. Hopefully this matches what FRR gives us. See the "ro ospf:database" branch in the pyang output below.
PC :~infix/src/confd/yang (main)$ pyang -f tree [email protected] [email protected] [email protected]
[email protected]:20: warning: imported module "ietf-interfaces" not used
[email protected]:24: warning: imported module "ietf-routing-types" not used
module: ietf-routing
+--rw routing
+--rw control-plane-protocols
| +--rw control-plane-protocol* [type name]
| +--rw type identityref
| +--rw name string
| +--rw static-routes
| | +--rw v4ur:ipv4
| | | +--rw v4ur:route* [destination-prefix]
| | | +--rw v4ur:destination-prefix inet:ipv4-prefix
| | | +--rw v4ur:description? string
| | | +--rw v4ur:next-hop
| | | +--rw (v4ur:next-hop-options)
| | | +--:(v4ur:simple-next-hop)
| | | | +--rw v4ur:outgoing-interface? if:interface-ref
| | | | +--rw v4ur:next-hop-address? inet:ipv4-address
| | | +--:(v4ur:special-next-hop)
| | | +--rw v4ur:special-next-hop? enumeration
| | +--rw v6ur:ipv6
| | +--rw v6ur:route* [destination-prefix]
| | +--rw v6ur:destination-prefix inet:ipv6-prefix
| | +--rw v6ur:description? string
| | +--rw v6ur:next-hop
| | +--rw (v6ur:next-hop-options)
| | +--:(v6ur:simple-next-hop)
| | | +--rw v6ur:outgoing-interface? if:interface-ref
| | | +--rw v6ur:next-hop-address? inet:ipv6-address
| | +--:(v6ur:special-next-hop)
| | +--rw v6ur:special-next-hop? enumeration
| +--rw ospf:ospf
| +--rw ospf:address-family? iana-rt-types:address-family
| +--rw ospf:explicit-router-id? rt-types:router-id {explicit-router-id}?
| +--ro ospf:router-id? rt-types:router-id
| +--ro ospf:local-rib
| | +--ro ospf:route* [prefix]
| | +--ro ospf:prefix inet:ip-prefix
| | +--ro ospf:next-hops
| | | +--ro ospf:next-hop* []
| | | +--ro ospf:outgoing-interface? if:interface-ref
| | | +--ro ospf:next-hop? inet:ip-address
| | +--ro ospf:route-type? route-type
| +--ro ospf:database
| | +--ro ospf:as-scope-lsa-type* [lsa-type]
| | +--ro ospf:lsa-type uint16
| | +--ro ospf:as-scope-lsas
| | +--ro ospf:as-scope-lsa* [lsa-id adv-router]
| | +--ro ospf:lsa-id union
| | +--ro ospf:adv-router rt-types:router-id
| | +--ro ospf:decode-completed? boolean
| | +--ro ospf:raw-data? yang:hex-string
| | +--ro (ospf:version)?
| | +--:(ospf:ospfv2)
| | +--ro ospf:ospfv2
| | +--ro ospf:header
| | | +--ro ospf:lsa-options
| | | | +--ro ospf:lsa-options* identityref
| | | +--ro ospf:lsa-id yang:dotted-quad
| | | +--ro ospf:age uint16
| | | +--ro ospf:type identityref
| | | +--ro ospf:adv-router rt-types:router-id
| | | +--ro ospf:seq-num uint32
| | | +--ro ospf:checksum fletcher-checksum16-type
| | | +--ro ospf:length uint16
| | +--ro ospf:body
| | +--ro ospf:router
| | | +--ro ospf:router-bits
| | | | +--ro ospf:rtr-lsa-bits* identityref
| | | +--ro ospf:num-of-links? uint16
| | | +--ro ospf:links
| | | +--ro ospf:link* []
| | | +--ro ospf:link-id? union
| | | +--ro ospf:link-data? union
| | | +--ro ospf:type? router-link-type
| | | +--ro ospf:topologies
| | | +--ro ospf:topology* []
| | | +--ro ospf:mt-id? uint8
| | | +--ro ospf:metric? uint16
| | +--ro ospf:network
| | | +--ro ospf:network-mask? yang:dotted-quad
| | | +--ro ospf:attached-routers
| | | +--ro ospf:attached-router* inet:ipv4-address
| | +--ro ospf:summary
| | | +--ro ospf:network-mask? inet:ipv4-address
| | | +--ro ospf:topologies
| | | +--ro ospf:topology* []
| | | +--ro ospf:mt-id? uint8
| | | +--ro ospf:metric? ospf-metric
| | +--ro ospf:external
| | +--ro ospf:network-mask? inet:ipv4-address
| | +--ro ospf:topologies
| | +--ro ospf:topology* []
| | +--ro ospf:mt-id? uint8
| | +--ro ospf:flags? bits
| | +--ro ospf:metric? ospf-metric
| | +--ro ospf:forwarding-address? inet:ipv4-address
| | +--ro ospf:external-route-tag? uint32
| +--rw ospf:areas
| | +--rw ospf:area* [area-id]
| | +--rw ospf:area-id area-id-type
| | +--rw ospf:area-type? identityref
| | +--rw ospf:summary? boolean
| | +--rw ospf:default-cost? ospf-metric
| | +--rw ospf:interfaces
| | +--rw ospf:interface* [name]
| | +--rw ospf:name if:interface-ref
| | +--rw ospf:interface-type? infix-r:infix-ospf-interface-type
| | +--rw ospf:passive? boolean
| | +--rw ospf:bfd {bfd}?
| | | +--rw ospf:enabled? boolean
| | +--rw ospf:hello-interval? uint16
| | +--rw ospf:dead-interval? uint16
| | +--rw ospf:retransmit-interval? uint16
| | +--rw ospf:transmit-delay? uint16
| | +--rw ospf:enabled? boolean
| | +--rw ospf:cost? ospf-link-metric
| | +--ro ospf:state? if-state-type
| | +--ro ospf:dr-router-id? rt-types:router-id
| | +--ro ospf:dr-ip-addr? inet:ip-address
| | +--ro ospf:bdr-router-id? rt-types:router-id
| | +--ro ospf:bdr-ip-addr? inet:ip-address
| | +--ro ospf:neighbors
| | +--ro ospf:neighbor* [neighbor-router-id]
| | +--ro ospf:neighbor-router-id rt-types:router-id
| | +--ro ospf:address? inet:ip-address
| | +--ro ospf:dr-router-id? rt-types:router-id
| | +--ro ospf:dr-ip-addr? inet:ip-address
| | +--ro ospf:bdr-router-id? rt-types:router-id
| | +--ro ospf:bdr-ip-addr? inet:ip-address
| | +--ro ospf:state? nbr-state-type
| | +--ro ospf:dead-timer? rt-types:timer-value-seconds16
| +--rw infix-r:default-route-advertise
| | o--rw infix-r:enable? boolean
| | +--rw infix-r:enabled? boolean
| | +--rw infix-r:always? boolean
| +--rw infix-r:redistribute
| +--rw infix-r:redistribute* [protocol]
| +--rw infix-r:protocol infix-distribute-protocol
+--rw ribs
+--rw rib* [name]
+--rw name string
+--rw address-family identityref
+--ro routes
+--ro route* []
+--ro route-preference? route-preference
+--ro next-hop
| +--ro (next-hop-options)
| +--:(simple-next-hop)
| | +--ro outgoing-interface? if:interface-ref
| | +--ro v4ur:next-hop-address? inet:ipv4-address
| | +--ro v6ur:next-hop-address? inet:ipv6-address
| +--:(special-next-hop)
| | +--ro special-next-hop? enumeration
| +--:(next-hop-list)
| +--ro next-hop-list
| +--ro next-hop* []
| +--ro outgoing-interface? if:interface-ref
| +--ro v4ur:address? inet:ipv4-address
| +--ro v6ur:address? inet:ipv6-address
+--ro source-protocol identityref
+--ro v4ur:destination-prefix? inet:ipv4-prefix
+--ro v6ur:destination-prefix? inet:ipv6-prefix
PC :~/infix/src/confd/yang (main)$
Also relevant, issue #647