Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ospf lsdb router-lsa link list #1080

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
8 changes: 7 additions & 1 deletion release/models/ospf/openconfig-ospfv2-area-interface.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion release/models/ospf/openconfig-ospfv2-area.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion release/models/ospf/openconfig-ospfv2-common.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion release/models/ospf/openconfig-ospfv2-global.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
109 changes: 90 additions & 19 deletions release/models/ospf/openconfig-ospfv2-lsdb.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -180,6 +186,88 @@ 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;
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).";
}

}

grouping ospfv2-lsdb-router-lsa-link-specification {
description
"Attributes used to identify links within OSPFv2 router lsa.";

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 leafref {
path "../state/link-id";
}
description
"Reference to the type of service identifier which is
specified in the LSA";
}

container state {
description
"Per-link parameters for a router-lsa.";

uses ospfv2-lsdb-router-lsa-link-state-specification;
}
uses ospfv2-lsdb-generic-lsa-tos-metric-structure;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm is this an extra uses that is no longer necessary - i didn't notice this before that there are now 2 metrics?


}
}
}

grouping ospfv2-lsdb-common-unknown-tlv {
description
"A generic specification of a TLV to be used when the
Expand Down Expand Up @@ -360,8 +448,8 @@ submodule openconfig-ospfv2-lsdb {
"State parameters of the router LSA";
uses ospfv2-lsdb-router-lsa-state;
}
uses ospfv2-lsdb-router-lsa-link-specification;

uses ospfv2-lsdb-generic-lsa-tos-metric-structure;
}
}

Expand Down Expand Up @@ -1167,16 +1255,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
Expand All @@ -1188,13 +1266,6 @@ submodule openconfig-ospfv2-lsdb {
description
"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).";
}
}

grouping ospfv2-lsdb-network-lsa-state {
Expand Down
8 changes: 7 additions & 1 deletion release/models/ospf/openconfig-ospfv2.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading