blob: efa31d5c97fa00686ab3a72d56670490008a9107 [file] [log] [blame]
Elia Battistonac8d23f2022-03-14 17:54:56 +01001module bbf-yang-types {
2 yang-version 1.1;
3 namespace "urn:bbf:yang:bbf-yang-types";
4 prefix bbf-yang;
5
6 organization
7 "Broadband Forum <https://www.broadband-forum.org>
8 Common YANG Work Area";
9 contact
10 "Comments or questions about this Broadband Forum YANG module
11 should be directed to <mailto:help@broadband-forum.org>.
12
13 Editor: Nick Hancock, ADTRAN
14
15 Editor: Ludwig Pauwels, Nokia
16
17 PS Leader: Joey Boyd, ADTRAN
18
19 WA Director: Joey Boyd, ADTRAN
20
21 WA Director: Sven Ooghe, Nokia";
22 description
23 "This module contains a collection of YANG definitions for
24 supporting the Broadband Forum requirements on reusable data
25 types as applicable to access network equipment. As such, this
26 module is specific to access network equipment (e.g.,
27 BBF-specified Access Nodes and FTTdp DPUs).
28
29 Specifically, this module defines common types used throughout
30 BBF data models.
31
32 Copyright (c) 2017-2022, Broadband Forum
33
34 Redistribution and use in source and binary forms, with or
35 without modification, are permitted provided that the following
36 conditions are met:
37
38 1. Redistributions of source code must retain the above copyright
39 notice, this list of conditions and the following disclaimer.
40
41 2. Redistributions in binary form must reproduce the above
42 copyright notice, this list of conditions and the following
43 disclaimer in the documentation and/or other materials
44 provided with the distribution.
45
46 3. Neither the name of the copyright holder nor the names of its
47 contributors may be used to endorse or promote products
48 derived from this software without specific prior written
49 permission.
50
51 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
52 CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,
53 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
54 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
55 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
56 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
57 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
58 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
59 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
60 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
61 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
62 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
63 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64
65 The above license is used as a license under copyright only.
66 Please reference the Forum IPR Policy for patent licensing terms
67 <https://www.broadband-forum.org/ipr-policy>.
68
69 Any moral rights which are necessary to exercise under the above
70 license grant are also deemed granted under this license.
71
72 This version of this YANG module is part of TR-383a5; see
73 the TR itself for full legal notices.";
74
75 revision 2022-03-01 {
76 description
77 "Amendment 5.
78 * Approval Date: 2022-03-01.
79 * Publication Date: 2022-03-01.";
80 reference
81 "TR-383a5: Common YANG Modules
82 <https://www.broadband-forum.org/technical/download/
83 TR-383_Amendment-5.pdf>";
84 }
85 revision 2021-06-02 {
86 description
87 "Amendment 4.
88 * Approval Date: 2021-06-02.
89 * Publication Date: 2021-06-02.";
90 reference
91 "TR-383a4: Common YANG Modules
92 <https://www.broadband-forum.org/technical/download/
93 TR-383_Amendment-4.pdf>";
94 }
95 revision 2020-10-13 {
96 description
97 "Amendment 3.
98 * Approval Date: 2020-10-13.
99 * Publication Date: 2020-10-13.";
100 reference
101 "TR-383a3: Common YANG Modules
102 <https://www.broadband-forum.org/technical/download/
103 TR-383_Amendment-3.pdf>";
104 }
105 revision 2019-10-21 {
106 description
107 "Amendment 2 Corrigendum 1.
108 * Approval Date: 2019-10-21.
109 * Publication Date: 2019-10-21.";
110 reference
111 "TR-383a2c1: Common YANG Modules
112 <https://www.broadband-forum.org/technical/download/
113 TR-383_Amendment-2.pdf>";
114 }
115 revision 2018-07-13 {
116 description
117 "Amendment 1.
118 * Approval Date: 2018-06-04.
119 * Publication Date: see revision date above.";
120 reference
121 "TR-383: Common YANG Modules
122 <https://www.broadband-forum.org/technical/download/
123 TR-383_Amendment-1.pdf>";
124 }
125 revision 2017-05-08 {
126 description
127 "Initial revision.
128 * Approval Date: see revision date above.
129 * Publication Date: 2017-06-02.";
130 reference
131 "TR-383: Common YANG Modules
132 <https://www.broadband-forum.org/technical/download/
133 TR-383.pdf>";
134 }
135 revision 2016-07-18 {
136 description
137 "Initial revision.
138 * Approval Date: see revision date above.
139 * Publication Date: 2016-08-05.";
140 reference
141 "TR-355: YANG Modules for FTTdp Management
142 <https://www.broadband-forum.org/technical/download/
143 TR-355.pdf>";
144 }
145
146 typedef name-string {
147 type string {
148 length "1..64";
149 }
150 description
151 "Used where a string is needed which has a maximum length of
152 64 characters and a minimum length of 1 character.";
153 }
154
155 typedef percent {
156 type uint8 {
157 range "0..100";
158 }
159 units "percentage";
160 description
161 "A percentage.";
162 }
163
164 typedef performance-counter32 {
165 type uint32;
166 description
167 "The 'performance-counter32' type represents a non-negative
168 integer that monotonically increases until it reaches a maximum
169 value of 2^32-1 (4294967295 decimal), but does not wrap around
170 once the maximum value is reached.";
171 }
172
173 typedef performance-counter32-or-inactive {
174 type union {
175 type uint32;
176 type enumeration {
177 enum inactive {
178 description
179 "Indicates that this counter is not active.";
180 }
181 }
182 }
183 description
184 "The 'performance-counter32-or-inactive' type represents a
185 non-negative integer that monotonically increases until it
186 reaches a maximum value of 2^32-1 (4294967295 decimal), but
187 does not wrap around once the maximum value is reached.
188
189 A special value (enum inactive) indicates that this counter
190 is not active.";
191 }
192
193 typedef performance-counter64 {
194 type uint64;
195 description
196 "The 'performance-counter64' type represents a non-negative
197 integer that monotonically increases until it reaches a maximum
198 value of 2^64-1 (18446744073709551615 decimal), but does not
199 wrap around once the maximum value is reached.";
200 }
201
202 typedef string-ascii63-or-empty {
203 type string {
204 length "0..63";
205 pattern '[ -~]*';
206 // allows the 95 printable ASCII characters
207 }
208 description
209 "Used where a string is needed which has a maximum length of
210 63 characters and also allows for a null string (length = 0).
211
212 The character set is limited to the 95 printable ASCII
213 characters.";
214 }
215
216 typedef string-ascii64 {
217 type string {
218 length "1..64";
219 pattern '[ -~]*';
220 }
221 description
222 "Used where a string is represented using at least 1 and no more
223 than 64 ASCII characters.
224
225 The character set is limited to the 95 printable ASCII
226 characters.";
227 }
228
229 typedef string-ascii64-or-empty {
230 type string {
231 length "0..64";
232 pattern '[ -~]*';
233 }
234 description
235 "Used where a string is needed which has a maximum length of
236 64 characters and also allows for a null string (length = 0).
237
238 The character set is limited to the 95 printable ASCII
239 characters.";
240 }
241
242 typedef undetermined {
243 type enumeration {
244 enum undetermined {
245 description
246 "Indicates the value is not determined.";
247 }
248 }
249 description
250 "A type which defines an enumeration representing when
251 the value for an object is not determined. Often, this is
252 combined with other data via a union acting as a special value
253 to indicate the undetermined state.";
254 }
255
256 typedef data-rate32 {
257 type uint32;
258 units "kbits/second";
259 description
260 "A type which represents the rate at which data is being
261 transferred.";
262 }
263
264 typedef data-rate32-or-undetermined {
265 type union {
266 type undetermined;
267 type data-rate32;
268 }
269 units "kbits/second";
270 description
271 "A type which represents the rate at which data is being
272 transferred. A special value, 'undetermined', is used to
273 indicate the data rate is undetermined.";
274 }
275}