From 35276cb2e8bf1c902eb067c14fd055a19f2e9986 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 22 Sep 2024 20:30:29 +0200 Subject: [PATCH] confd: rename ietf-routing prefix, ietf-r: -> rt: For consistency with the other IETF routing models, e.g., OSPF, let's use the same model prefix for internal references. Signed-off-by: Joachim Wiberg --- src/confd/yang/confd.inc | 2 +- src/confd/yang/infix-routing@2024-09-21.yang | 473 ------------------ src/confd/yang/infix-routing@2024-09-22.yang | 477 +++++++++++++++++++ 3 files changed, 478 insertions(+), 474 deletions(-) delete mode 100644 src/confd/yang/infix-routing@2024-09-21.yang create mode 100644 src/confd/yang/infix-routing@2024-09-22.yang diff --git a/src/confd/yang/confd.inc b/src/confd/yang/confd.inc index 215113b0..539e5bd6 100644 --- a/src/confd/yang/confd.inc +++ b/src/confd/yang/confd.inc @@ -27,7 +27,7 @@ MODULES=( "ieee802-dot1q-types@2022-10-29.yang" "infix-ip@2024-09-16.yang" "infix-if-type@2024-01-29.yang" - "infix-routing@2024-09-21.yang" + "infix-routing@2024-09-22.yang" "ieee802-dot1ab-lldp@2022-03-15.yang" "infix-lldp@2023-08-23.yang" "infix-dhcp-client@2024-09-20.yang" diff --git a/src/confd/yang/infix-routing@2024-09-21.yang b/src/confd/yang/infix-routing@2024-09-21.yang deleted file mode 100644 index cd1fb570..00000000 --- a/src/confd/yang/infix-routing@2024-09-21.yang +++ /dev/null @@ -1,473 +0,0 @@ -module infix-routing { - yang-version 1.1; - namespace "urn:infix:routing:ns:yang:1.0"; - prefix infix-r; - import ietf-routing { - prefix ietf-r; - } - - import ietf-ipv4-unicast-routing { - prefix v4ur; - } - - import ietf-ipv6-unicast-routing { - prefix v6ur; - } - import ietf-ospf { - prefix ospf; - } - - import ietf-interfaces { - prefix if; - } - - import ietf-routing-types { - prefix rt-types; - } - revision 2024-09-21 { - description "Drop RIB source-protocol deviation for standard, add kernel proto."; - reference "internal"; - } - revision 2024-09-20 { - description "Deviate to only show supported routing types"; - reference "internal"; - } - revision 2024-09-13 { - description "Declare deviations for non-supported OSPF RPCs and Notifications"; - reference "internal"; - } - revision 2024-03-06 { - description "Obsolete leaf enable in favor for enabled in default-route-advertise"; - reference "internal"; - } - revision 2024-01-09 { - description "Add operational, area, bfd support - and other minor features"; - reference "internal"; - } - revision 2023-11-23 { - description "Limit to one instance per control plane protocol, - and change to infix (iproute2) specific source protocol names - for routes"; - reference "internal"; - } - revision 2023-10-27 { - description "Initial revision."; - reference "internal"; - } - - /* General routing */ - deviation "/ietf-r:routing/ietf-r:interfaces" { - description "Initial limitation"; - deviate not-supported; - } - - deviation "/ietf-r:routing/ietf-r:router-id" { - description "Set in OSPF"; - deviate not-supported; - } - deviation "/ietf-r:routing-state" { - description "Obsolete"; - deviate not-supported; - } - - identity kernel { - base ietf-r:routing-protocol; - description - "'Kernel' routing pseudo-protocol."; - } - - typedef infix-distribute-protocol { - type enumeration { - enum ospf { - description "Redistribute Ospf"; - } - enum static { - description "Redistribute Static routes"; - } - enum connected { - description "Redistribute Connected routes"; - } - } - } - - identity infix-routing-type { - description "Infix routing type"; - } - identity ospfv2 { - base ospf:ospfv2; - base infix-routing-type; - description "OSPv2 (IPv4) routing protocol"; - } - identity static { - base ietf-r:static; - base infix-routing-type; - description "Static route"; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ietf-r:type" { - deviate replace { - type identityref { - base infix-routing-type; - } - } - } - - /* Static routes */ - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ietf-r:static-routes/v4ur:ipv4/v4ur:route/v4ur:next-hop/v4ur:next-hop-options/v4ur:next-hop-list" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ietf-r:static-routes/v6ur:ipv6/v6ur:route/v6ur:next-hop/v6ur:next-hop-options/v6ur:next-hop-list" { - deviate not-supported; - } - /* show routes */ - deviation "/ietf-r:routing/ietf-r:ribs/ietf-r:rib/ietf-r:default-rib" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:ribs/ietf-r:rib/ietf-r:active-route" { - deviate not-supported; - } - - deviation "/ietf-r:routing/ietf-r:ribs/ietf-r:rib/ietf-r:routes/ietf-r:route/ospf:metric" { - deviate not-supported; - } - - deviation "/ietf-r:routing/ietf-r:ribs/ietf-r:rib/ietf-r:routes/ietf-r:route/ospf:tag" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:ribs/ietf-r:rib/ietf-r:routes/ietf-r:route/ospf:route-type" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:ribs/ietf-r:rib/ietf-r:routes/ietf-r:route/ietf-r:active" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:ribs/ietf-r:rib/ietf-r:routes/ietf-r:route/ietf-r:last-updated" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:ribs/ietf-r:rib/ietf-r:description" { - deviate not-supported; - } - - /* OSPF */ - typedef infix-ospf-interface-type { - type enumeration { - enum broadcast { - description - "Specifies an OSPF broadcast multi-access network."; - } - enum point-to-point { - description - "Specifies an OSPF point-to-point network."; - } - } - } - - - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol" { - deviate add { - must "count(../control-plane-protocol[type = current()/type]) = 1" { - error-message "Only one instance per routing protocol is allowed."; - } - } - } -/* - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ietf-r:type" { - deviate add { - must "derived-from-or-self(., 'ospf:ospfv2') or "+ - "derived-from-or-self(., 'ietf-r:static')" { - description "Only OSPFv2 and Static routes are supported in Infix."; - } - } - } -*/ - augment "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf" { - description "ietf-ospf lack the setting to generate a default route"; - container default-route-advertise { - description "Distribute default route to network"; - leaf enable { - status obsolete; - description "Legacy, replaced by 'enabled'."; - type boolean; - } - leaf enabled { - description "Distribute default route"; - type boolean; - } - leaf always { - description "Always distribute default route, even if no local default route exist. - If set to false, a default route will only be distributed if a default route exist - in the local routing table."; - type boolean; - } - } - } - augment "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf" { - description "ietf-ospf does not contain redistribution - 7. How should route redistribution be configured? I see ietf-rip.yang has a separate - container for that purpose, but ietf-ospf.yang (and other IGP modules) don't do the - same. I also noticed the BGP model is using definition from ietf-routing-policy.yang. - - Different vendors handle redistribution in different ways. This could be added with - an augmentation if there were agreement. - - https://marc.info/?l=ms-ospf&m=166258444409552&w=2"; - container redistribute { - list redistribute { - key "protocol"; - description "Redistribute protocols into OSPF"; - leaf protocol { - type infix-distribute-protocol; - description "Set protocol to redistribute"; - } - } - } - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface" { - deviate add { - must "current()/name = 'lo' or count(../../../../ospf:areas/ospf:area/ospf:interfaces/ospf:interface[ospf:name=current()/name]) <= 1" { - error-message "Only one area per interface is allowed."; - } - } - } - - 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:interface-type" { - deviate replace { - type infix-ospf-interface-type; - } - } - - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:auto-cost" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:database" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:graceful-restart" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:enabled" { - deviate not-supported; - } - - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:spf-control" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:preference" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:stub-router" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:topologies" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:statistics" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:database-control" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:lsa-log" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:spf-log" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:fast-reroute" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:node-tags" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:mpls" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:nsr" { - deviate not-supported; - } - - /* OSPF Area */ - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:virtual-links" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:sham-links" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:ranges" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:database" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:topologies" { - deviate not-supported; - } - - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:statistics" { - deviate not-supported; - } - - /* OSPF Local RIB */ - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:local-rib/ospf:route/ospf:metric" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:local-rib/ospf:route/ospf:route-tag" { - deviate not-supported; - } - /* OSPF Area Interface */ - 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:static-neighbors" - { - 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:multi-areas" { - 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:node-flag" { - 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:bfd/ospf:local-multiplier" - { - 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:bfd/ospf:interval-config-type" - { - 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:priority" - { - 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:fast-reroute" - { - 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:authentication" - { - 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:statistics" - { - 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:neighbors/ospf:neighbor/ospf:statistics" - { - 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:neighbors/ospf:neighbor/ospf:cost" - { - 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:database" - { - 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:topologies" - { - 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:instance-id" - { - 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:interface-id" - { - 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:demand-circuit" - { - 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:ttl-security" - { - 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:lls" - { - 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:mtu-ignore" - { - 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:prefix-suppression" - { - 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; - } - 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:wait-timer" - { - deviate not-supported; - } - - /* OSPF database */ - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv3" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:external" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:summary" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:router" { - deviate not-supported; - } - deviation "/ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:header" { - deviate not-supported; - } - - /* OSPF RPCs */ - deviation "/ospf:clear-neighbor" { - deviate not-supported; - } - - deviation "/ospf:clear-database" { - deviate not-supported; - } - - /* OSPF Notifications */ - deviation "/ospf:if-state-change" { - deviate not-supported; - } - - deviation "/ospf:if-config-error" { - deviate not-supported; - } - - deviation "/ospf:nbr-state-change" { - deviate not-supported; - } - - deviation "/ospf:nbr-restart-helper-status-change" { - deviate not-supported; - } - - deviation "/ospf:if-rx-bad-packet" { - deviate not-supported; - } - - deviation "/ospf:lsdb-approaching-overflow" { - deviate not-supported; - } - - deviation "/ospf:lsdb-overflow" { - deviate not-supported; - } - - deviation "/ospf:nssa-translator-status-change" { - deviate not-supported; - } - - deviation "/ospf:restart-status-change" { - deviate not-supported; - } - -} diff --git a/src/confd/yang/infix-routing@2024-09-22.yang b/src/confd/yang/infix-routing@2024-09-22.yang new file mode 100644 index 00000000..8b8c196e --- /dev/null +++ b/src/confd/yang/infix-routing@2024-09-22.yang @@ -0,0 +1,477 @@ +module infix-routing { + yang-version 1.1; + namespace "urn:infix:routing:ns:yang:1.0"; + prefix infix-rt; + import ietf-routing { + prefix rt; + } + + import ietf-ipv4-unicast-routing { + prefix v4ur; + } + + import ietf-ipv6-unicast-routing { + prefix v6ur; + } + import ietf-ospf { + prefix ospf; + } + + import ietf-interfaces { + prefix if; + } + + import ietf-routing-types { + prefix rt-types; + } + revision 2024-09-22 { + description "Adjust YANG prefix for consistency: ietf-r: -> rt:"; + reference "internal"; + } + revision 2024-09-21 { + description "Drop RIB source-protocol deviation for standard, add kernel proto."; + reference "internal"; + } + revision 2024-09-20 { + description "Deviate to only show supported routing types"; + reference "internal"; + } + revision 2024-09-13 { + description "Declare deviations for non-supported OSPF RPCs and Notifications"; + reference "internal"; + } + revision 2024-03-06 { + description "Obsolete leaf enable in favor for enabled in default-route-advertise"; + reference "internal"; + } + revision 2024-01-09 { + description "Add operational, area, bfd support + and other minor features"; + reference "internal"; + } + revision 2023-11-23 { + description "Limit to one instance per control plane protocol, + and change to infix (iproute2) specific source protocol names + for routes"; + reference "internal"; + } + revision 2023-10-27 { + description "Initial revision."; + reference "internal"; + } + + /* General routing */ + deviation "/rt:routing/rt:interfaces" { + description "Initial limitation"; + deviate not-supported; + } + + deviation "/rt:routing/rt:router-id" { + description "Set in OSPF"; + deviate not-supported; + } + deviation "/rt:routing-state" { + description "Obsolete"; + deviate not-supported; + } + + identity kernel { + base rt:routing-protocol; + description + "'Kernel' routing pseudo-protocol."; + } + + typedef infix-distribute-protocol { + type enumeration { + enum ospf { + description "Redistribute Ospf"; + } + enum static { + description "Redistribute Static routes"; + } + enum connected { + description "Redistribute Connected routes"; + } + } + } + + identity infix-routing-type { + description "Infix routing type"; + } + identity ospfv2 { + base ospf:ospfv2; + base infix-routing-type; + description "OSPv2 (IPv4) routing protocol"; + } + identity static { + base rt:static; + base infix-routing-type; + description "Static route"; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:type" { + deviate replace { + type identityref { + base infix-routing-type; + } + } + } + + /* Static routes */ + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:static-routes/v4ur:ipv4/v4ur:route/v4ur:next-hop/v4ur:next-hop-options/v4ur:next-hop-list" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:static-routes/v6ur:ipv6/v6ur:route/v6ur:next-hop/v6ur:next-hop-options/v6ur:next-hop-list" { + deviate not-supported; + } + /* show routes */ + deviation "/rt:routing/rt:ribs/rt:rib/rt:default-rib" { + deviate not-supported; + } + deviation "/rt:routing/rt:ribs/rt:rib/rt:active-route" { + deviate not-supported; + } + + deviation "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/ospf:metric" { + deviate not-supported; + } + + deviation "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/ospf:tag" { + deviate not-supported; + } + deviation "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/ospf:route-type" { + deviate not-supported; + } + deviation "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/rt:active" { + deviate not-supported; + } + deviation "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/rt:last-updated" { + deviate not-supported; + } + deviation "/rt:routing/rt:ribs/rt:rib/rt:description" { + deviate not-supported; + } + + /* OSPF */ + typedef infix-ospf-interface-type { + type enumeration { + enum broadcast { + description + "Specifies an OSPF broadcast multi-access network."; + } + enum point-to-point { + description + "Specifies an OSPF point-to-point network."; + } + } + } + + + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol" { + deviate add { + must "count(../control-plane-protocol[type = current()/type]) = 1" { + error-message "Only one instance per routing protocol is allowed."; + } + } + } +/* + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:type" { + deviate add { + must "derived-from-or-self(., 'ospf:ospfv2') or "+ + "derived-from-or-self(., 'rt:static')" { + description "Only OSPFv2 and Static routes are supported in Infix."; + } + } + } +*/ + augment "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf" { + description "ietf-ospf lack the setting to generate a default route"; + container default-route-advertise { + description "Distribute default route to network"; + leaf enable { + status obsolete; + description "Legacy, replaced by 'enabled'."; + type boolean; + } + leaf enabled { + description "Distribute default route"; + type boolean; + } + leaf always { + description "Always distribute default route, even if no local default route exist. + If set to false, a default route will only be distributed if a default route exist + in the local routing table."; + type boolean; + } + } + } + augment "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf" { + description "ietf-ospf does not contain redistribution + 7. How should route redistribution be configured? I see ietf-rip.yang has a separate + container for that purpose, but ietf-ospf.yang (and other IGP modules) don't do the + same. I also noticed the BGP model is using definition from ietf-routing-policy.yang. + + Different vendors handle redistribution in different ways. This could be added with + an augmentation if there were agreement. + + https://marc.info/?l=ms-ospf&m=166258444409552&w=2"; + container redistribute { + list redistribute { + key "protocol"; + description "Redistribute protocols into OSPF"; + leaf protocol { + type infix-distribute-protocol; + description "Set protocol to redistribute"; + } + } + } + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface" { + deviate add { + must "current()/name = 'lo' or count(../../../../ospf:areas/ospf:area/ospf:interfaces/ospf:interface[ospf:name=current()/name]) <= 1" { + error-message "Only one area per interface is allowed."; + } + } + } + + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:interface-type" { + deviate replace { + type infix-ospf-interface-type; + } + } + + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:auto-cost" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:graceful-restart" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:enabled" { + deviate not-supported; + } + + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:spf-control" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:preference" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:stub-router" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:topologies" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:statistics" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database-control" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:lsa-log" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:spf-log" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:fast-reroute" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:node-tags" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:mpls" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:nsr" { + deviate not-supported; + } + + /* OSPF Area */ + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:virtual-links" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:sham-links" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:ranges" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:database" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:topologies" { + deviate not-supported; + } + + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:statistics" { + deviate not-supported; + } + + /* OSPF Local RIB */ + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:local-rib/ospf:route/ospf:metric" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:local-rib/ospf:route/ospf:route-tag" { + deviate not-supported; + } + /* OSPF Area Interface */ + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:static-neighbors" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:multi-areas" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:node-flag" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:bfd/ospf:local-multiplier" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:bfd/ospf:interval-config-type" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:priority" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:fast-reroute" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:authentication" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:statistics" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:neighbors/ospf:neighbor/ospf:statistics" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:neighbors/ospf:neighbor/ospf:cost" + { + deviate not-supported; + } + + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:database" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:topologies" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:instance-id" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:interface-id" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:demand-circuit" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:ttl-security" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:lls" + { + deviate not-supported; + } + + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:mtu-ignore" + { + deviate not-supported; + } + + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:prefix-suppression" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:hello-timer" + { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:wait-timer" + { + deviate not-supported; + } + + /* OSPF database */ + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv3" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:external" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:summary" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:router" { + deviate not-supported; + } + deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:header" { + deviate not-supported; + } + + /* OSPF RPCs */ + deviation "/ospf:clear-neighbor" { + deviate not-supported; + } + + deviation "/ospf:clear-database" { + deviate not-supported; + } + + /* OSPF Notifications */ + deviation "/ospf:if-state-change" { + deviate not-supported; + } + + deviation "/ospf:if-config-error" { + deviate not-supported; + } + + deviation "/ospf:nbr-state-change" { + deviate not-supported; + } + + deviation "/ospf:nbr-restart-helper-status-change" { + deviate not-supported; + } + + deviation "/ospf:if-rx-bad-packet" { + deviate not-supported; + } + + deviation "/ospf:lsdb-approaching-overflow" { + deviate not-supported; + } + + deviation "/ospf:lsdb-overflow" { + deviate not-supported; + } + + deviation "/ospf:nssa-translator-status-change" { + deviate not-supported; + } + + deviation "/ospf:restart-status-change" { + deviate not-supported; + } + +}