Skip to content

Commit c424e01

Browse files
authored
Add next-hop-group to local-routing-network-instance. (openconfig#1325)
* Move next-hop-group to local-routing-network-instance. * use relative path for leaf-ref * set local-routing to next major version
1 parent 027d9cf commit c424e01

File tree

2 files changed

+69
-42
lines changed

2 files changed

+69
-42
lines changed

release/models/local-routing/openconfig-local-routing-network-instance.yang

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ module openconfig-local-routing-network-instance {
2121
"This module adds leaves that relate to network-instances
2222
to the local routing subtree.";
2323

24-
oc-ext:openconfig-version "1.0.0";
24+
oc-ext:openconfig-version "1.1.0";
25+
26+
revision "2025-07-01" {
27+
description
28+
"Add reference to static next-hop-group and augment the local routing
29+
module.";
30+
reference "1.1.0";
31+
}
2532

2633
revision "2025-06-30" {
2734
description
@@ -82,6 +89,59 @@ module openconfig-local-routing-network-instance {
8289
}
8390
}
8491

92+
grouping static-next-hop-group-networkinstance {
93+
description
94+
"Grouping of nodes for a reference to a static next-hop-group.";
95+
96+
container next-hop-group {
97+
description
98+
"Configuration and state parameters relating to the
99+
next-hop-group. In the future, this container will replace the container
100+
/network-instances/network-instance/protocols/protocol/static-routes/static/next-hops.
101+
If a statically configured next-hop-group is used for a static route
102+
prefix then the 'static-routes/static/next-hops' container must not
103+
be used.";
104+
105+
container config {
106+
description
107+
"Configuration parameters relating to the next-hop-group.";
108+
109+
uses next-hop-group-config;
110+
}
111+
112+
container state {
113+
config false;
114+
description
115+
"Operational parameters relating to the next-hop-group.";
116+
117+
uses next-hop-group-config;
118+
}
119+
}
120+
}
121+
122+
grouping next-hop-group-config {
123+
description
124+
"Grouping of configuration parameters for a reference to a
125+
static next-hop-group.";
126+
127+
leaf name {
128+
description
129+
"A user defined name to reference a static next-hop-group.";
130+
// we are at /network-instances/network-instance/protocols/protocol/static-routes/static/next-hop-group/config/name
131+
type leafref {
132+
path "../../../../../../../oc-ni:static/oc-ni:next-hop-groups/oc-ni:next-hop-group/oc-ni:config/oc-ni:name";
133+
}
134+
135+
}
136+
}
137+
138+
augment "/oc-ni:network-instances/oc-ni:network-instance/oc-ni:protocols/oc-ni:protocol/oc-ni:static-routes/oc-ni:static" {
139+
description
140+
"Add network-instance leaves to static routing next-hop container.";
141+
142+
uses static-next-hop-group-networkinstance;
143+
}
144+
85145
augment "/oc-ni:network-instances/oc-ni:network-instance/oc-ni:protocols/oc-ni:protocol/oc-ni:static-routes/oc-ni:static/oc-ni:next-hops/oc-ni:next-hop/oc-ni:config" {
86146
description
87147
"Add network-instance leaves to static routing next-hop container.";

release/models/local-routing/openconfig-local-routing.yang

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ module openconfig-local-routing {
4343
protocol-specific policy after importing the route into the
4444
protocol for distribution (again via routing policy).";
4545

46-
oc-ext:openconfig-version "3.0.0";
46+
oc-ext:openconfig-version "4.0.0";
47+
48+
revision "2025-07-01" {
49+
description
50+
"Move static next-hop-group to local-routing-network-instance and
51+
augment the local routing module.";
52+
reference "4.0.0";
53+
}
4754

4855
revision "2025-06-30" {
4956
description
@@ -324,31 +331,6 @@ module openconfig-local-routing {
324331
uses local-static-state;
325332
}
326333

327-
container next-hop-group {
328-
description
329-
"Configuration and state parameters relating to the
330-
next-hop-group. In the future, this container will replace the container
331-
/network-instances/network-instance/protocols/protocol/static-routes/static/next-hops.
332-
If a statically configured next-hop-group is used for a static route
333-
prefix then the 'static-routes/static/next-hops' container must not
334-
be used.";
335-
336-
container config {
337-
description
338-
"Configuration parameters relating to the next-hop-group.";
339-
340-
uses next-hop-group-config;
341-
}
342-
343-
container state {
344-
config false;
345-
description
346-
"Operational parameters relating to the next-hop-group.";
347-
348-
uses next-hop-group-config;
349-
}
350-
}
351-
352334
container next-hops {
353335
description
354336
"Configuration and state parameters relating
@@ -484,19 +466,4 @@ module openconfig-local-routing {
484466
}
485467
}
486468

487-
grouping next-hop-group-config {
488-
description
489-
"Grouping of configuration parameters for a static route's reference
490-
to a next-hop-group.";
491-
492-
leaf name {
493-
type leafref {
494-
path "/network-instances/network-instance/static/next-hop-groups/next-hop-group/name";
495-
}
496-
497-
description
498-
"A user defined name for a next-hop-group.";
499-
}
500-
}
501-
502469
}

0 commit comments

Comments
 (0)