-
Notifications
You must be signed in to change notification settings - Fork 3
/
ietf-yang-revisions.yang
218 lines (176 loc) · 7.09 KB
/
ietf-yang-revisions.yang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
module ietf-yang-revisions {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-revisions";
prefix rev;
import ietf-yang-types {
prefix yang;
reference
"XXXX [ietf-netmod-rfc6991-bis]: Common YANG Data Types";
}
organization
"IETF NETMOD (Network Modeling) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
Author: Benoit Claise
<mailto:bclaise@cisco.com>
Author: Joe Clarke
<mailto:jclarke@cisco.com>
Author: Reshad Rahman
<mailto:rrahman@cisco.com>
Author: Robert Wilton
<mailto:rwilton@cisco.com>
Author: Kevin D'Souza
<mailto:kd6913@att.com>
Author: Balazs Lengyel
<mailto:balazs.lengyel@ericsson.com>
Author: Jason Sterne
<mailto:jason.sterne@nokia.com>";
description
"This YANG 1.1 module contains definitions and extensions to
support updated YANG revision handling.
Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
// RFC Ed.: update the date below with the date of RFC publication
// and remove this note.
// RFC Ed.: replace XXXX (inc above) with actual RFC number and
// remove this note.
revision 2019-09-18 {
description
"Initial version.";
reference
"XXXX: Updated YANG Module Revision Handling";
}
typedef revision-label {
type string {
length "1..255";
pattern '[^\s@]+';
pattern '\d{4}-\d{2}-\d{2}' {
modifier invert-match;
}
}
description
"A label associated with a YANG revision.
Excludes spaces and '@'. MUST NOT match revision-date.
Revision labels that classify as YANG semantic versions,
as defined by the ietf-yang-semver:version typedef,
MUST conform to the versioning behaviour defined in
XXXX [verdt]: YANG Semantic Versioning.";
reference
"XXXX: Updated YANG Module Revision Handling;
Section 3.3, Revision label";
}
typedef name-revision {
type string {
length "1..512";
pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*(@[^\s@]+)?';
pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*';
}
description
"Identifies a particular revision of a YANG asset (e.g. module
or package).
Takes the form '<name>' or '<name>@<revision>', where
<revision> could be either a revision-date or a revision label.";
}
typedef revision-date-or-label {
type union {
type yang:revision-identifier;
type revision-label;
}
description
"Represents either a YANG revision date or a revision label";
}
extension nbc-changes {
description
"This statement is used to indicate YANG module revisions that
contain non-backwards-compatible changes.
Each 'revision' statement MAY have a single 'nbc-changes'
substatement.
If a revision of a YANG module contains changes, relative to
the preceding revision in the revision history, that do not
conform to the module update rules defined in RFC-XXX, then
the 'nbc-changes' statement MUST be added as a substatement to
the revision statement.
Conversely, if a revision of a YANG module only contains
changes, relative to the preceding revision in the revision
history, that are classified as 'backwards-compatible' then
the revision statement MUST NOT contain any 'nbc-changes'
substatement.";
reference
"XXXX: Updated YANG Module Revision Handling;
Section 3.2, nbc-changes revision extension statement";
}
extension revision-label {
argument revision-label;
description
"The revision label can be used to provide an additional
versioning identifier associated with the revision. E.g., one
option for a versioning scheme that could be used is [TODO -
Reference semver draft].
The format of the revision-label argument MUST conform to the
pattern defined for the revision-label typedef.
Each 'revision' statement MAY have a single 'revision-label'
substatement.
Revision labels MUST be unique amongst all revisions of a
module.";
reference
"XXXX: Updated YANG Module Revision Handling;
Section 3.3, Revision label";
}
extension revision-or-derived {
argument revision-date-or-label;
description
"Restricts the revision of the module that may be imported to
one that matches or is derived from the specified
revision-date or revision-ñlabel.
The argument value MUST conform to the
'revision-date-or-label' defined type.
Each 'import' statement MAY have one or more
'revision-or-derived' substatements. If specified multiple
times, then any module revision that satifies at least one of
the 'revision-or-derived' statements is an acceptable revision
for import.
An 'import' statement MUST NOT contain both a
'revision-or-derived' extension statement and a
'revision-date' statement.
A particular revision of an imported module satisfies an
import's 'revision-or-derived' extension statement if the
imported module's revision history contains a revision
statement with a matching revision date or revision label.
The 'revision-or-derived' extension statement does not
gaurantee that all module revisions that satisfy an import
statement are necessarily compatible, it only gives an
indication that the revisions are more likely to be
compatible.";
reference
"XXXX: Updated YANG Module Revision Handling;
Section 4, Import by derived revision";
}
extension status-description {
argument description;
description
"Freeform text that describes why a given node has been
deprecated or made obsolete. E.g., the description could be
used to give the reason for removal, or it could point to an
alternative schema elements that can be used in lieu of the
given node.
Each 'status' statement MAY have a single 'status-description'
substatement.";
reference
"XXXX: Updated YANG Module Revision Handling;
Section 3.4, YANG status description extension statement";
}
}