From c1e1e975c77e2021f0a974b55f1ceb13c8dda081 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 21 Mar 2024 10:54:29 -0700 Subject: [PATCH 01/12] fix ospf lsdb router-lsa link list --- .../models/ospf/openconfig-ospfv2-lsdb.yang | 77 ++++++++++++++----- 1 file changed, 59 insertions(+), 18 deletions(-) diff --git a/release/models/ospf/openconfig-ospfv2-lsdb.yang b/release/models/ospf/openconfig-ospfv2-lsdb.yang index e1eda9fdd..5402158c7 100644 --- a/release/models/ospf/openconfig-ospfv2-lsdb.yang +++ b/release/models/ospf/openconfig-ospfv2-lsdb.yang @@ -180,6 +180,63 @@ submodule openconfig-ospfv2-lsdb { } + grouping ospfv2-lsdb-router-lsa-link-specification { + description + "Attributes used to identify links within OSPFv2 router lsa."; + + container links { + list link { + key "link-id"; + description + "A router-lsa may have multiple link-id entries."; + + leaf link-id { + type yang:dotted-quad; + description + "The identifier for the link specified. The value of the link + identifier is dependent upon the type of the LSA. The value is + specified to be, per sub-type: + 1) Neighbouring router's router ID. + 2) IP address of DR. + 3) IP network address. + 4) Neighbouring router router's ID."; + } + + leaf type { + type identityref { + base "oc-ospf-types:ROUTER_LSA_TYPES"; + } + description + "The sub-type of the Router LSA."; + } + + leaf link-data { + type union { + type yang:dotted-quad; + type uint32; + } + description + "The data associated with the link type. The value is + dependent upon the subtype of the LSA. When the connection is + to a stub network it represents the mask; for p2p connections + that are unnumbered it represents the ifIndex value of the + router's interface; for all other connections it represents + the local system's IP address"; + } + + leaf number-tos-metrics { + type uint16; + description + "The number of different TOS metrics given for this link, not + including the link metric (which is referred to as TOS 0)."; + } + + uses ospfv2-lsdb-generic-lsa-tos-metric-structure; + + } + } + } + grouping ospfv2-lsdb-common-unknown-tlv { description "A generic specification of a TLV to be used when the @@ -360,8 +417,6 @@ submodule openconfig-ospfv2-lsdb { "State parameters of the router LSA"; uses ospfv2-lsdb-router-lsa-state; } - - uses ospfv2-lsdb-generic-lsa-tos-metric-structure; } } @@ -1167,16 +1222,6 @@ submodule openconfig-ospfv2-lsdb { description "Parameters of the router LSA"; - leaf type { - type identityref { - base "oc-ospf-types:ROUTER_LSA_TYPES"; - } - description - "The sub-type of the Router LSA."; - } - - uses ospfv2-lsdb-common-link-specification; - leaf metric { type oc-ospf-types:ospf-metric; description @@ -1189,12 +1234,8 @@ submodule openconfig-ospfv2-lsdb { "The number of links that are described within the LSA"; } - leaf number-tos-metrics { - type uint16; - description - "The number of different TOS metrics given for this link, not - including the link metric (which is referred to as TOS 0)."; - } + uses ospfv2-lsdb-router-lsa-link-specification; + } grouping ospfv2-lsdb-network-lsa-state { From 1bff5e167f80beeb181e98bac93a206c94b3b125 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 21 Mar 2024 11:07:32 -0700 Subject: [PATCH 02/12] obsolete link-id --- release/models/ospf/openconfig-ospfv2-lsdb.yang | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/release/models/ospf/openconfig-ospfv2-lsdb.yang b/release/models/ospf/openconfig-ospfv2-lsdb.yang index 5402158c7..affa72338 100644 --- a/release/models/ospf/openconfig-ospfv2-lsdb.yang +++ b/release/models/ospf/openconfig-ospfv2-lsdb.yang @@ -184,6 +184,15 @@ submodule openconfig-ospfv2-lsdb { description "Attributes used to identify links within OSPFv2 router lsa."; + leaf link-id { + type yang:dotted-quad; + status obsolete; + description + "The identifier for the link specified. This leaf is + obsolete because a router-lsa contains a list of links. + The links container should be used instand of link-id."; + } + container links { list link { key "link-id"; From c15267da7db50f1fa6a3a383b27273493593d0bd Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 21 Mar 2024 11:10:40 -0700 Subject: [PATCH 03/12] update revision --- release/models/ospf/openconfig-ospfv2-lsdb.yang | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/release/models/ospf/openconfig-ospfv2-lsdb.yang b/release/models/ospf/openconfig-ospfv2-lsdb.yang index affa72338..b2c65fc69 100644 --- a/release/models/ospf/openconfig-ospfv2-lsdb.yang +++ b/release/models/ospf/openconfig-ospfv2-lsdb.yang @@ -22,7 +22,13 @@ submodule openconfig-ospfv2-lsdb { "An OpenConfig model for the Open Shortest Path First (OSPF) version 2 link-state database (LSDB)"; - oc-ext:openconfig-version "0.5.1"; + oc-ext:openconfig-version "0.6.0"; + + revision "2024-03-21" { + description + "Refactor router-lsa link-id to a list of links."; + reference "0.6.0"; + } revision "2023-11-01" { description @@ -188,7 +194,7 @@ submodule openconfig-ospfv2-lsdb { type yang:dotted-quad; status obsolete; description - "The identifier for the link specified. This leaf is + "The identifier for the link specified. This leaf is obsolete because a router-lsa contains a list of links. The links container should be used instand of link-id."; } From 48337a457d4fd3273ca91ebf04b87e57092f50af Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 21 Mar 2024 11:28:38 -0700 Subject: [PATCH 04/12] update revision --- release/models/ospf/openconfig-ospfv2-area-interface.yang | 8 +++++++- release/models/ospf/openconfig-ospfv2-area.yang | 8 +++++++- release/models/ospf/openconfig-ospfv2-common.yang | 8 +++++++- release/models/ospf/openconfig-ospfv2-global.yang | 8 +++++++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/release/models/ospf/openconfig-ospfv2-area-interface.yang b/release/models/ospf/openconfig-ospfv2-area-interface.yang index 3045ad03c..f66287c42 100644 --- a/release/models/ospf/openconfig-ospfv2-area-interface.yang +++ b/release/models/ospf/openconfig-ospfv2-area-interface.yang @@ -25,7 +25,13 @@ submodule openconfig-ospfv2-area-interface { "This submodule provides OSPFv2 configuration and operational state parameters that are specific to the area context"; - oc-ext:openconfig-version "0.5.1"; + oc-ext:openconfig-version "0.6.0"; + + revision "2024-03-21" { + description + "Refactor router-lsa link-id to a list of links."; + reference "0.6.0"; + } revision "2023-11-01" { description diff --git a/release/models/ospf/openconfig-ospfv2-area.yang b/release/models/ospf/openconfig-ospfv2-area.yang index e0f0020f8..218b00c2b 100644 --- a/release/models/ospf/openconfig-ospfv2-area.yang +++ b/release/models/ospf/openconfig-ospfv2-area.yang @@ -23,7 +23,13 @@ submodule openconfig-ospfv2-area { "This submodule provides OSPFv2 configuration and operational state parameters that are specific to the area context"; - oc-ext:openconfig-version "0.5.1"; + oc-ext:openconfig-version "0.6.0"; + + revision "2024-03-21" { + description + "Refactor router-lsa link-id to a list of links."; + reference "0.6.0"; + } revision "2023-11-01" { description diff --git a/release/models/ospf/openconfig-ospfv2-common.yang b/release/models/ospf/openconfig-ospfv2-common.yang index 8bfd890b4..c3a0f063a 100644 --- a/release/models/ospf/openconfig-ospfv2-common.yang +++ b/release/models/ospf/openconfig-ospfv2-common.yang @@ -17,7 +17,13 @@ submodule openconfig-ospfv2-common { "This submodule provides OSPFv2 configuration and operational state parameters that are shared across multiple contexts"; - oc-ext:openconfig-version "0.5.1"; + oc-ext:openconfig-version "0.6.0"; + + revision "2024-03-21" { + description + "Refactor router-lsa link-id to a list of links."; + reference "0.6.0"; + } revision "2023-11-01" { description diff --git a/release/models/ospf/openconfig-ospfv2-global.yang b/release/models/ospf/openconfig-ospfv2-global.yang index e6c0256ec..091d7d0ca 100644 --- a/release/models/ospf/openconfig-ospfv2-global.yang +++ b/release/models/ospf/openconfig-ospfv2-global.yang @@ -23,7 +23,13 @@ submodule openconfig-ospfv2-global { "This submodule provides OSPFv2 configuration and operational state parameters that are global to a particular OSPF instance"; - oc-ext:openconfig-version "0.5.1"; + oc-ext:openconfig-version "0.6.0"; + + revision "2024-03-21" { + description + "Refactor router-lsa link-id to a list of links."; + reference "0.6.0"; + } revision "2023-11-01" { description From 33bfe0c289011e5c559da5348d1fa1b258bb31f7 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 21 Mar 2024 11:54:22 -0700 Subject: [PATCH 05/12] update revision --- release/models/ospf/openconfig-ospfv2.yang | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/release/models/ospf/openconfig-ospfv2.yang b/release/models/ospf/openconfig-ospfv2.yang index fb5a7e031..a99cc1e10 100644 --- a/release/models/ospf/openconfig-ospfv2.yang +++ b/release/models/ospf/openconfig-ospfv2.yang @@ -34,7 +34,13 @@ module openconfig-ospfv2 { "An OpenConfig model for Open Shortest Path First (OSPF) version 2"; - oc-ext:openconfig-version "0.5.1"; + oc-ext:openconfig-version "0.6.0"; + + revision "2024-03-21" { + description + "Refactor router-lsa link-id to a list of links."; + reference "0.6.0"; + } revision "2023-11-01" { description From 92ee029277fca4a60c84e5918942ff6c3cc94dea Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 21 Mar 2024 12:11:57 -0700 Subject: [PATCH 06/12] fix list definition --- .../models/ospf/openconfig-ospfv2-lsdb.yang | 92 ++++++++++++------- 1 file changed, 57 insertions(+), 35 deletions(-) diff --git a/release/models/ospf/openconfig-ospfv2-lsdb.yang b/release/models/ospf/openconfig-ospfv2-lsdb.yang index b2c65fc69..6c3b0d725 100644 --- a/release/models/ospf/openconfig-ospfv2-lsdb.yang +++ b/release/models/ospf/openconfig-ospfv2-lsdb.yang @@ -186,6 +186,52 @@ submodule openconfig-ospfv2-lsdb { } +grouping ospfv2-lsdb-router-lsa-link-state-specification { + + leaf link-id { + type yang:dotted-quad; + description + "The identifier for the link specified. The value of the link + identifier is dependent upon the type of the LSA. The value is + specified to be, per sub-type: + 1) Neighbouring router's router ID. + 2) IP address of DR. + 3) IP network address. + 4) Neighbouring router router's ID."; + } + + leaf type { + type identityref { + base "oc-ospf-types:ROUTER_LSA_TYPES"; + } + description + "The sub-type of the Router LSA."; + } + + leaf link-data { + type union { + type yang:dotted-quad; + type uint32; + } + description + "The data associated with the link type. The value is + dependent upon the subtype of the LSA. When the connection is + to a stub network it represents the mask; for p2p connections + that are unnumbered it represents the ifIndex value of the + router's interface; for all other connections it represents + the local system's IP address"; + } + + leaf number-tos-metrics { + type uint16; + description + "The number of different TOS metrics given for this link, not + including the link metric (which is referred to as TOS 0)."; + } + + uses ospfv2-lsdb-generic-lsa-tos-metric-structure; +} + grouping ospfv2-lsdb-router-lsa-link-specification { description "Attributes used to identify links within OSPFv2 router lsa."; @@ -200,54 +246,30 @@ submodule openconfig-ospfv2-lsdb { } container links { + description + "Container for list of Router LSA links."; + + list link { key "link-id"; description "A router-lsa may have multiple link-id entries."; leaf link-id { - type yang:dotted-quad; - description - "The identifier for the link specified. The value of the link - identifier is dependent upon the type of the LSA. The value is - specified to be, per sub-type: - 1) Neighbouring router's router ID. - 2) IP address of DR. - 3) IP network address. - 4) Neighbouring router router's ID."; - } - - leaf type { - type identityref { - base "oc-ospf-types:ROUTER_LSA_TYPES"; + type leafref { + path "../state/link-id"; } description - "The sub-type of the Router LSA."; + "Reference to the type of service identifier which is + specified in the LSA"; } - leaf link-data { - type union { - type yang:dotted-quad; - type uint32; - } + container state { description - "The data associated with the link type. The value is - dependent upon the subtype of the LSA. When the connection is - to a stub network it represents the mask; for p2p connections - that are unnumbered it represents the ifIndex value of the - router's interface; for all other connections it represents - the local system's IP address"; - } + "Per-link parameters for a router-lsa."; - leaf number-tos-metrics { - type uint16; - description - "The number of different TOS metrics given for this link, not - including the link metric (which is referred to as TOS 0)."; + uses ospfv2-lsdb-router-lsa-link-state-specification; } - - uses ospfv2-lsdb-generic-lsa-tos-metric-structure; - } } } From 062470f73cd7f53689b2ceffc07a1cf7be99697d Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 21 Mar 2024 13:25:44 -0700 Subject: [PATCH 07/12] fix state container organization --- release/models/ospf/openconfig-ospfv2-lsdb.yang | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/release/models/ospf/openconfig-ospfv2-lsdb.yang b/release/models/ospf/openconfig-ospfv2-lsdb.yang index 6c3b0d725..fe8b82f33 100644 --- a/release/models/ospf/openconfig-ospfv2-lsdb.yang +++ b/release/models/ospf/openconfig-ospfv2-lsdb.yang @@ -454,6 +454,8 @@ grouping ospfv2-lsdb-router-lsa-link-state-specification { "State parameters of the router LSA"; uses ospfv2-lsdb-router-lsa-state; } + uses ospfv2-lsdb-router-lsa-link-specification; + } } @@ -1270,9 +1272,6 @@ grouping ospfv2-lsdb-router-lsa-link-state-specification { description "The number of links that are described within the LSA"; } - - uses ospfv2-lsdb-router-lsa-link-specification; - } grouping ospfv2-lsdb-network-lsa-state { From de56906700727e06f5d121697c63bcc6adc62d47 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 21 Mar 2024 13:40:59 -0700 Subject: [PATCH 08/12] fix tos state organization --- .../models/ospf/openconfig-ospfv2-lsdb.yang | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/release/models/ospf/openconfig-ospfv2-lsdb.yang b/release/models/ospf/openconfig-ospfv2-lsdb.yang index fe8b82f33..36bcef0fb 100644 --- a/release/models/ospf/openconfig-ospfv2-lsdb.yang +++ b/release/models/ospf/openconfig-ospfv2-lsdb.yang @@ -229,22 +229,12 @@ grouping ospfv2-lsdb-router-lsa-link-state-specification { including the link metric (which is referred to as TOS 0)."; } - uses ospfv2-lsdb-generic-lsa-tos-metric-structure; } grouping ospfv2-lsdb-router-lsa-link-specification { description "Attributes used to identify links within OSPFv2 router lsa."; - leaf link-id { - type yang:dotted-quad; - status obsolete; - description - "The identifier for the link specified. This leaf is - obsolete because a router-lsa contains a list of links. - The links container should be used instand of link-id."; - } - container links { description "Container for list of Router LSA links."; @@ -270,6 +260,8 @@ grouping ospfv2-lsdb-router-lsa-link-state-specification { uses ospfv2-lsdb-router-lsa-link-state-specification; } + uses ospfv2-lsdb-generic-lsa-tos-metric-structure; + } } } @@ -1261,6 +1253,15 @@ grouping ospfv2-lsdb-router-lsa-link-state-specification { description "Parameters of the router LSA"; + leaf link-id { + type yang:dotted-quad; + status obsolete; + description + "The identifier for the link specified. This leaf is + obsolete because a router-lsa contains a list of links. + The links container should be used instand of link-id."; + } + leaf metric { type oc-ospf-types:ospf-metric; description From afe68c93f558354f933f115292c359526abed6f8 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 21 Mar 2024 13:45:36 -0700 Subject: [PATCH 09/12] add router-lsa description --- release/models/ospf/openconfig-ospfv2-lsdb.yang | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/models/ospf/openconfig-ospfv2-lsdb.yang b/release/models/ospf/openconfig-ospfv2-lsdb.yang index 36bcef0fb..f7043063c 100644 --- a/release/models/ospf/openconfig-ospfv2-lsdb.yang +++ b/release/models/ospf/openconfig-ospfv2-lsdb.yang @@ -187,6 +187,8 @@ submodule openconfig-ospfv2-lsdb { } grouping ospfv2-lsdb-router-lsa-link-state-specification { + description + "Attributes used to identify router-lsa links within OSPFv2."; leaf link-id { type yang:dotted-quad; From afe0c6fbf2e4535aaac9a611a140543ebbfee347 Mon Sep 17 00:00:00 2001 From: dplore Date: Fri, 22 Mar 2024 15:54:05 -0700 Subject: [PATCH 10/12] set link-id to deprecated status --- release/models/ospf/openconfig-ospfv2-lsdb.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/ospf/openconfig-ospfv2-lsdb.yang b/release/models/ospf/openconfig-ospfv2-lsdb.yang index f7043063c..1bc21e179 100644 --- a/release/models/ospf/openconfig-ospfv2-lsdb.yang +++ b/release/models/ospf/openconfig-ospfv2-lsdb.yang @@ -1257,7 +1257,7 @@ grouping ospfv2-lsdb-router-lsa-link-state-specification { leaf link-id { type yang:dotted-quad; - status obsolete; + status deprecated; description "The identifier for the link specified. This leaf is obsolete because a router-lsa contains a list of links. From 944d097a701087b31405f24a5004ce6650b4265e Mon Sep 17 00:00:00 2001 From: dplore Date: Fri, 22 Mar 2024 15:54:19 -0700 Subject: [PATCH 11/12] set link-id to deprecated status --- release/models/ospf/openconfig-ospfv2-lsdb.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/ospf/openconfig-ospfv2-lsdb.yang b/release/models/ospf/openconfig-ospfv2-lsdb.yang index 1bc21e179..856b8e6f6 100644 --- a/release/models/ospf/openconfig-ospfv2-lsdb.yang +++ b/release/models/ospf/openconfig-ospfv2-lsdb.yang @@ -1260,7 +1260,7 @@ grouping ospfv2-lsdb-router-lsa-link-state-specification { status deprecated; description "The identifier for the link specified. This leaf is - obsolete because a router-lsa contains a list of links. + deprecated because a router-lsa contains a list of links. The links container should be used instand of link-id."; } From f95709ab7f949df5e7ab168f8a49ef740352bf1d Mon Sep 17 00:00:00 2001 From: dplore Date: Tue, 26 Mar 2024 10:10:34 -0700 Subject: [PATCH 12/12] delete link-id --- release/models/ospf/openconfig-ospfv2-lsdb.yang | 9 --------- 1 file changed, 9 deletions(-) diff --git a/release/models/ospf/openconfig-ospfv2-lsdb.yang b/release/models/ospf/openconfig-ospfv2-lsdb.yang index 856b8e6f6..342a8a1ac 100644 --- a/release/models/ospf/openconfig-ospfv2-lsdb.yang +++ b/release/models/ospf/openconfig-ospfv2-lsdb.yang @@ -1255,15 +1255,6 @@ grouping ospfv2-lsdb-router-lsa-link-state-specification { description "Parameters of the router LSA"; - leaf link-id { - type yang:dotted-quad; - status deprecated; - description - "The identifier for the link specified. This leaf is - deprecated because a router-lsa contains a list of links. - The links container should be used instand of link-id."; - } - leaf metric { type oc-ospf-types:ospf-metric; description