Skip to content

Commit af790dd

Browse files
committed
doc: ospfd / ospf6d: document RFC 9129 ietf-ospf config-write scope
Replace the older "operational data only" sections in doc/user/ospfd.rst and doc/user/ospf6d.rst with a YANG / NETCONF Support entry that lists every config-write leaf the ietf-ospf series now supports plus the deliberate scope gaps: * redistribute and default-information-originate remain legacy-CLI only (RFC 9129 / RFC 8349 leave them to a separate import / export mechanism). * Per-address overrides (e.g. `ip ospf cost N A.B.C.D`) have no RFC 9129 counterpart; YANG is strictly per-interface. * FRR-specific NSSA augments (translator-role, suppress-fa, default-information-originate) are not in the RFC 9129 area grouping; they remain legacy-CLI-only. * `router ospf [vrf NAME]` instance creation is still CLI-only; YANG operations that target a non-existent instance are rejected at VALIDATE with a clear error pointing at `router ospf`. * ospf6d has no per-area stub default-cost knob; the leaf is not implemented (mgmtd reports "no backend handles this path"). This matches the existing v3 CLI surface, not a regression introduced by this conversion. * ospf6 interface-type rejects non-broadcast and hybrid at VALIDATE (ospf6d only accepts broadcast, point-to-point and point-to-multipoint). Adds a worked example showing mgmt set-config / commit apply for the explicit-router-id leaf so operators see the end-to-end mgmtd path. Documents the frr-deviations-ietf-routing-ospf interface-name leafref relaxation and the restoration of referential checks inside the per-interface callbacks. Signed-off-by: lamestllama <eric@eparsonage.com>
1 parent cb1e3ec commit af790dd

2 files changed

Lines changed: 107 additions & 18 deletions

File tree

doc/user/ospf6d.rst

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -933,21 +933,46 @@ Showing OSPF6 information
933933
This command shows the graceful-restart helper details including helper
934934
configuration parameters.
935935

936-
YANG Operational Data
937-
---------------------
938-
939-
OSPFv3 operational state is available through the standard :rfc:`9129`
940-
``ietf-ospf`` YANG model. The current support is operational data only; OSPFv3
941-
configuration is still managed through the existing FRR CLI.
936+
YANG / NETCONF Support
937+
----------------------
942938

943-
The following example retrieves the OSPFv3 instance from the mgmtd operational
944-
datastore:
939+
OSPFv3 operational state and a subset of OSPFv3 configuration are exposed
940+
through the standard :rfc:`9129` ``ietf-ospf`` YANG model. The OSPFv3
941+
instance itself remains owned by the legacy ``router ospf6`` CLI, but
942+
per-area, per-interface and per-instance configuration leaves are routed
943+
through the mgmtd northbound and can be read, set, and committed through
944+
NETCONF / RESTCONF / ``vtysh``'s ``mgmt`` subcommands as well as the legacy
945+
CLI.
946+
947+
The supported set mirrors the OSPFv2 side documented in :ref:`ospfd`, with
948+
two v3-specific gaps:
949+
950+
* ``areas/area/default-cost``: ospf6d has no per-area stub default-cost
951+
knob, so this leaf is not implemented. Setting it via YANG is rejected
952+
by mgmtd as ``no backend handles this path``. This matches FRR's existing
953+
v3 CLI surface (which has no ``area X default-cost`` equivalent) and is a
954+
pre-existing v2/v3 feature gap, not introduced by this conversion.
955+
* ``interface-type``: RFC 9129 declares ``broadcast``, ``non-broadcast``,
956+
``point-to-multipoint``, ``point-to-point`` and ``hybrid``. ospf6d only
957+
accepts ``broadcast``, ``point-to-point`` and ``point-to-multipoint``;
958+
the NB callback rejects ``non-broadcast`` and ``hybrid`` at VALIDATE
959+
with a clear error.
960+
961+
Otherwise the set of supported leaves (router-id, area lifecycle,
962+
area-type, area summary, ranges, per-interface attachment, cost,
963+
hello-interval, dead-interval, retransmit-interval, priority, mtu-ignore,
964+
passive, preference) is identical to OSPFv2.
965+
966+
Examples
967+
~~~~~~~~
968+
969+
Retrieve the OSPFv3 instance from the operational datastore:
945970

946971
.. code-block:: shell
947972
948973
vtysh -c 'show mgmt get-data /ietf-routing:routing/control-plane-protocols/control-plane-protocol[type="ietf-ospf:ospfv3"][name="default"] datastore operational'
949974
950-
To retrieve the merged operational datastore, including the OSPFv3 protocol
975+
Retrieve the merged operational datastore, including the OSPFv3 protocol
951976
entry and the ``ietf-interfaces`` data used by OSPF interface leafrefs:
952977

953978
.. code-block:: shell

doc/user/ospfd.rst

Lines changed: 73 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,27 +1083,91 @@ Showing Information
10831083
Displays the Graceful Restart Helper details including helper
10841084
config changes.
10851085

1086-
YANG Operational Data
1087-
---------------------
1088-
1089-
OSPF operational state is available through the standard :rfc:`9129`
1090-
``ietf-ospf`` YANG model. The current support is operational data only; OSPF
1091-
configuration is still managed through the existing FRR CLI.
1086+
YANG / NETCONF Support
1087+
----------------------
10921088

1093-
The following example retrieves the OSPFv2 instance from the mgmtd operational
1094-
datastore:
1089+
OSPF operational state and a subset of OSPF configuration are exposed through
1090+
the standard :rfc:`9129` ``ietf-ospf`` YANG model. The OSPF instance itself
1091+
remains owned by the legacy ``router ospf`` CLI, but per-area, per-interface
1092+
and per-instance configuration leaves are routed through the mgmtd northbound
1093+
so they can be read, set and committed via NETCONF / RESTCONF / ``vtysh``'s
1094+
``mgmt`` subcommands as well as the legacy CLI.
1095+
1096+
Supported configuration leaves
1097+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1098+
1099+
Under ``/ietf-routing:routing/control-plane-protocols/control-plane-protocol[type='ietf-ospf:ospfv2']/ietf-ospf:ospf``:
1100+
1101+
* ``explicit-router-id``
1102+
* ``preference/{all,intra-area,inter-area,internal,external}`` (admin distance)
1103+
* ``areas/area`` (list create / destroy keyed by ``area-id``)
1104+
* ``areas/area/area-type`` (``normal-area``, ``stub-area``, ``nssa-area``)
1105+
* ``areas/area/summary`` (totally-stubby toggle; RFC 9129 inverts FRR's
1106+
``no-summary`` sense)
1107+
* ``areas/area/default-cost`` (stub / NSSA only)
1108+
* ``areas/area/ranges/range`` (list create / destroy), with ``advertise``
1109+
and ``cost`` leaves
1110+
* ``areas/area/interfaces/interface`` (list create / destroy: assigns an
1111+
interface to the area), plus the per-interface leaves
1112+
``cost``, ``hello-interval``, ``dead-interval``, ``retransmit-interval``,
1113+
``priority``, ``mtu-ignore``, ``interface-type``, ``passive``
1114+
1115+
Out of scope for this slice
1116+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1117+
1118+
* ``redistribute`` and ``default-information-originate`` are FRR-specific
1119+
concepts that RFC 9129 / :rfc:`8349` leave to a separate import / export
1120+
mechanism. They stay reachable through the legacy CLI on the
1121+
direct-mutation path.
1122+
* Per-address overrides (e.g. ``ip ospf cost N A.B.C.D``) have no RFC 9129
1123+
counterpart; the YANG model is strictly per-interface. The legacy CLI
1124+
with an explicit address argument continues to use direct mutation.
1125+
* FRR-specific area NSSA augments (translator-role,
1126+
default-information-originate, suppress-fa) are not in the RFC 9129 area
1127+
grouping; they remain legacy-CLI-only.
1128+
* The ``router ospf [vrf NAME]`` instance creation step is still
1129+
CLI-only; YANG operations that target a non-existent instance are
1130+
rejected at VALIDATE with a clear error pointing at ``router ospf``.
1131+
1132+
Examples
1133+
~~~~~~~~
1134+
1135+
Retrieve the OSPFv2 instance from the operational datastore:
10951136

10961137
.. code-block:: shell
10971138
10981139
vtysh -c 'show mgmt get-data /ietf-routing:routing/control-plane-protocols/control-plane-protocol[type="ietf-ospf:ospfv2"][name="default"] datastore operational'
10991140
1100-
To retrieve the merged operational datastore, including the OSPF protocol
1141+
Retrieve the merged operational datastore, including the OSPF protocol
11011142
entry and the ``ietf-interfaces`` data used by OSPF interface leafrefs:
11021143

11031144
.. code-block:: shell
11041145
11051146
vtysh -c 'show mgmt get-data /* datastore operational'
11061147
1148+
Set the router-id through mgmtd, then commit:
1149+
1150+
.. code-block:: shell
1151+
1152+
vtysh -c 'configure terminal file-lock' \
1153+
-c 'mgmt set-config /ietf-routing:routing/control-plane-protocols/control-plane-protocol[type="ietf-ospf:ospfv2"][name="default"]/ietf-ospf:ospf/explicit-router-id "10.0.0.1"' \
1154+
-c 'mgmt commit apply'
1155+
1156+
The corresponding ``ospf router-id 10.0.0.1`` legacy CLI command takes the
1157+
same path through the northbound; both surfaces converge on the same
1158+
candidate datastore.
1159+
1160+
Interface leafref relaxation
1161+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1162+
1163+
RFC 9129's per-interface entry keys on a leafref into
1164+
``/ietf-interfaces:interfaces/interface/name``. The
1165+
``frr-deviations-ietf-routing-ospf`` deviation relaxes this so OSPF config
1166+
can be staged ahead of interface plumbing (useful when emitting config from
1167+
an external orchestrator). The relaxation removes libyang's referential
1168+
check; the NB callbacks restore it themselves, rejecting unknown interface
1169+
names at VALIDATE with a clear error.
1170+
11071171
.. _opaque-lsa:
11081172

11091173
Opaque LSA

0 commit comments

Comments
 (0)