Skip to content

Commit b8e83b3

Browse files
committed
yang: Fix pyang errors in frr-staticd.yang
Fix pyang errors or warnings in frr-staticd.yang frr-staticd.yang:31: warning: imported module "ietf-srv6-types" not used frr-staticd.yang:70: error: RFC 8407: 4.8: statement "revision" must have a "reference" substatement frr-staticd.yang:81: error: RFC 8407: 4.14: statement "grouping" must have a "description" substatement frr-staticd.yang:82: error: RFC 8407: 4.14: statement "list" must have a "description" substatement frr-staticd.yang:110: error: keyword "description" not in canonical order, expected "type" (see RFC 7950, Section 14) frr-staticd.yang:111: error: keyword "type" not in canonical order (see RFC 7950, Section 14) frr-staticd.yang:165: error: RFC 8407: 4.14: statement "augment" must have a "description" substatement frr-staticd.yang:201: error: keyword "must" not in canonical order (see RFC 7950, Section 14) frr-staticd.yang:204: error: RFC 8407: 4.14: statement "augment" must have a "description" substatement frr-staticd.yang:208: error: keyword "presence" not in canonical order (see RFC 7950, Section 14) frr-staticd.yang:211: error: keyword "when" not in canonical order (see RFC 7950, Section 14) frr-staticd.yang:230: error: keyword "key" not in canonical order (see RFC 7950, Section 14) frr-staticd.yang:251: error: RFC 8407: 4.14: statement "list" must have a "description" substatement Signed-off-by: y-bharath14 <[email protected]>
1 parent 19c540e commit b8e83b3

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

yang/frr-staticd.yang

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ module frr-staticd {
2828
prefix frr-vrf;
2929
}
3030

31-
import ietf-srv6-types {
32-
prefix srv6-types;
33-
}
34-
3531
organization
3632
"FRRouting";
3733
contact
@@ -70,6 +66,7 @@ module frr-staticd {
7066
revision 2019-12-03 {
7167
description
7268
"Initial revision.";
69+
reference "FRRouting";
7370
}
7471

7572
identity staticd {
@@ -79,8 +76,12 @@ module frr-staticd {
7976
}
8077

8178
grouping staticd-prefix-attributes {
79+
description
80+
"Grouping for staticd prefix attributes.";
8281
list path-list {
8382
key "table-id distance";
83+
description
84+
"List of paths associated with a staticd prefix.";
8485
leaf table-id {
8586
type uint32;
8687
description
@@ -105,9 +106,6 @@ module frr-staticd {
105106
}
106107

107108
typedef srv6-behavior-codepoint {
108-
description
109-
"SRv6 Endpoint Behaviors Codepoints as per
110-
https://www.iana.org/assignments/segment-routing/segment-routing.xhtml.";
111109
type enumeration {
112110
enum End {
113111
value 1;
@@ -160,9 +158,14 @@ module frr-staticd {
160158
"This enum indicates End.DT46 with NEXT-CSID endpoint behavior.";
161159
}
162160
}
161+
description
162+
"SRv6 Endpoint Behaviors Codepoints as per
163+
https://www.iana.org/assignments/segment-routing/segment-routing.xhtml.";
163164
}
164165

165166
augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol" {
167+
description
168+
"Augments the control-plane-protocol container with staticd pseudo-protocol instance.";
166169
container staticd {
167170
when "../frr-rt:type = 'frr-staticd:staticd'" {
168171
description
@@ -173,6 +176,12 @@ module frr-staticd {
173176
"Support for a 'staticd' pseudo-protocol instance
174177
consists of a list of routes.";
175178
list route-list {
179+
/* note dst-src routes are semantically invalid in MRIB */
180+
must "afi-safi = 'frr-rt:ipv6-unicast'
181+
or afi-safi = 'frr-rt:ipv6-labeled-unicast'
182+
or afi-safi = 'frr-rt:l3vpn-ipv6-unicast'
183+
or src-prefix = '::/0'
184+
";
176185
key "prefix src-prefix afi-safi";
177186
description
178187
"List of staticd IP routes.";
@@ -193,22 +202,18 @@ module frr-staticd {
193202
description
194203
"AFI-SAFI type.";
195204
}
196-
/* note dst-src routes are semantically invalid in MRIB */
197-
must "afi-safi = 'frr-rt:ipv6-unicast'
198-
or afi-safi = 'frr-rt:ipv6-labeled-unicast'
199-
or afi-safi = 'frr-rt:l3vpn-ipv6-unicast'
200-
or src-prefix = '::/0'
201-
";
202205

203206
uses staticd-prefix-attributes {
204207
augment "path-list/frr-nexthops/nexthop" {
208+
description
209+
"Augments the nexthop container with BFD monitoring options.";
205210
container bfd-monitoring {
206-
description "BFD monitoring options.";
211+
when "../nh-type = 'ip4' or ../nh-type = 'ip4-ifindex' or
212+
../nh-type = 'ip6' or ../nh-type = 'ip6-ifindex'";
207213
presence
208214
"Present if BFD configuration is available.";
215+
description "BFD monitoring options.";
209216

210-
when "../nh-type = 'ip4' or ../nh-type = 'ip4-ifindex' or
211-
../nh-type = 'ip6' or ../nh-type = 'ip6-ifindex'";
212217
uses frr-bfdd:bfd-monitoring;
213218
}
214219
}
@@ -225,9 +230,9 @@ module frr-staticd {
225230
description
226231
"This container lists the SRv6 Static SIDs instantiated on the local node.";
227232
list sid {
233+
key "sid";
228234
description
229235
"List of SRv6 Static SIDs.";
230-
key "sid";
231236
leaf sid {
232237
type inet:ipv6-prefix;
233238
description
@@ -250,6 +255,8 @@ module frr-staticd {
250255
}
251256
list paths {
252257
key "path-index";
258+
description
259+
"List of paths for the SRv6 Static SID.";
253260
leaf path-index {
254261
type uint8;
255262
description

0 commit comments

Comments
 (0)