blob: 513cee83c7228f6cceee65910151b0d6ce1a71ba [file] [log] [blame]
Elia Battiston4750d3c2022-07-14 13:24:56 +00001submodule bbf-xpon-channel-termination-body {
2 yang-version 1.1;
3 belongs-to bbf-xpon {
4 prefix bbf-xpon;
5 }
6
7 import ietf-interfaces {
8 prefix if;
9 }
10 import bbf-xpon-types {
11 prefix bbf-xpon-types;
12 }
13 import bbf-xpon-if-type {
14 prefix bbf-xponift;
15 }
16 include bbf-xpon-base;
17
18 organization
19 "Broadband Forum <https://www.broadband-forum.org>
20 Fiber Access Networks Work Area";
21 contact
22 "Comments or questions about this Broadband Forum YANG module
23 should be directed to <mailto:help@broadband-forum.org>.
24
25 Editor: Joey Boyd, ADTRAN
26
27 Editor: Samuel Chen, Broadcom
28
29 Editor: Robert Peschi, Nokia
30
31 WA Director: Marta Seda, Calix
32
33 WA Director: Lin Wei, Huawei";
34 description
35 "This submodule contains a collection of YANG definitions for
36 managing channel terminations.
37
38 Copyright (c) 2018, Broadband Forum
39
40 Redistribution and use in source and binary forms, with or
41 without modification, are permitted provided that the following
42 conditions are met:
43
44 1. Redistributions of source code must retain the above copyright
45 notice, this list of conditions and the following disclaimer.
46
47 2. Redistributions in binary form must reproduce the above
48 copyright notice, this list of conditions and the following
49 disclaimer in the documentation and/or other materials
50 provided with the distribution.
51
52 3. Neither the name of the copyright holder nor the names of its
53 contributors may be used to endorse or promote products
54 derived from this software without specific prior written
55 permission.
56
57 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
58 CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,
59 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
60 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
61 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
62 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
63 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
64 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
65 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
66 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
67 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
68 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
69 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
70
71 The above license is used as a license under copyright only.
72 Please reference the Forum IPR Policy for patent licensing terms
73 <https://www.broadband-forum.org/ipr-policy>.
74
75 Any moral rights which are necessary to exercise under the above
76 license grant are also deemed granted under this license.
77
78 This version of this YANG module is part of TR-385; see
79 the TR itself for full legal notices.";
80
81 revision 2019-02-25 {
82 description
83 "Initial revision.
84 * Approval Date: 2019-02-25.
85 * Publication Date: 2019-02-25.";
86 reference
87 "TR-385: ITU-T PON YANG Modules
88 <https://www.broadband-forum.org/technical/download/
89 TR-385.pdf>";
90 }
91
92 grouping channel-termination-config-data {
93 description
94 "All configuration data for a channel termination.";
95 leaf channel-pair-ref {
96 type if:interface-ref;
97 must "derived-from-or-self(/if:interfaces"
98 + "/if:interface[if:name=current()]/if:type,"
99 + "'bbf-xponift:channel-pair') and "
100 + "/if:interfaces/if:interface[if:name=current()]/"
101 + "bbf-xpon:channel-pair/bbf-xpon:channel-pair-type = "
102 + "../bbf-xpon:channel-termination-type" {
103 error-message
104 "Must reference a channel pair with the same xPON type as
105 the channel termination.";
106 }
107 description
108 "Reference to a channel pair.";
109 }
110 leaf channel-termination-type {
111 type identityref {
112 base bbf-xpon-types:channel-pair-type-base;
113 }
114 mandatory true;
115 description
116 "Represents the type of channel termination (e.g.
117 TWDM NG-PON2, PtP NG-PON2, XGS-PON, XG-PON, G-PON).";
118 }
119 leaf meant-for-type-b-primary-role {
120 type boolean;
121 description
122 "When true, the channel termination is meant to play type B
123 protection Primary role when it refers to a channel pair.
124 When false, the channel termination is meant to play
125 type B protection Secondary role when it refers to a
126 channel pair.";
127 reference
128 "ITU-T G.898.3 Amendment 1 (11/2016), section 18.1.";
129 }
130 leaf ngpon2-twdm-admin-label {
131 when "derived-from-or-self"
132 + "(../bbf-xpon:channel-termination-type,"
133 + "'bbf-xpon-types:ngpon2-twdm')";
134 type uint32 {
135 range "0..268435455" {
136 description
137 "0 to 2^28-1.";
138 }
139 }
140 description
141 "For TWDM NG-PON2, the admin-label is configurable and is
142 28 bits long. It is the configurable part of the PON-ID
143 which is available as state data.";
144 reference
145 "ITU-T G.989.3 section 6.1.5.3";
146 }
147 leaf ngpon2-ptp-admin-label {
148 when "derived-from-or-self"
149 + "(../bbf-xpon:channel-termination-type,"
150 + "'bbf-xpon-types:ngpon2-ptp')";
151 type uint32 {
152 range "0..4194303" {
153 description
154 "0 to 2^22-1.";
155 }
156 }
157 description
158 "For PtP NG-PON2, the admin-label is configurable and is
159 22 bits long. It is the configurable part of the PON-ID
160 which is available as state data.";
161 reference
162 "ITU-T G.989.3 section 6.1.5.3";
163 }
164 leaf xgs-pon-id {
165 when "derived-from-or-self"
166 + "(../bbf-xpon:channel-termination-type,"
167 + "'bbf-xpon-types:xgs')";
168 type uint32;
169 description
170 "For XGS-PON, the PON-ID is entirely configurable and is
171 32 bits long. The PON-ID is also available as state
172 data.";
173 reference
174 "ITU-T G.9807.1 section C.10.1.1.1.3";
175 }
176 leaf xgpon-pon-id {
177 when "derived-from-or-self"
178 + "(../bbf-xpon:channel-termination-type,"
179 + "'bbf-xpon-types:xgpon')";
180 type uint32;
181 description
182 "For XG-PON, the PON-ID is entirely configurable and is
183 32 bits long. The PON-ID is also available as state
184 data.";
185 reference
186 "ITU-T G.987.3 section E.2";
187 }
188 leaf gpon-pon-id {
189 when "derived-from-or-self"
190 + "(../bbf-xpon:channel-termination-type,"
191 + "'bbf-xpon-types:gpon')";
192 type bbf-xpon-types:string-hex14;
193 description
194 "For G-PON, the PON-ID is entirely configurable with
195 any binary value over 7 bytes. The PON-ID is also
196 available as state data.";
197 reference
198 "ITU-T G.984.3 section C.2.2";
199 }
200 leaf pon-tag {
201 when "not(derived-from-or-self"
202 + "(../bbf-xpon:channel-termination-type,"
203 + "'bbf-xpon-types:gpon'))";
204 type string {
205 pattern '[0-9a-fA-F]{16}';
206 }
207 description
208 "8 bytes. Each octet is represented by two hex values.
209 Used to specify channel-pair-TAG attribute in NG-PON2,
210 XGS-PON and XG-PON downstream PLOAM messages.
211 The PON-TAG is not relevant for G-PON.";
212 }
213 leaf ber-calc-period {
214 type uint32 {
215 range "1..864000";
216 }
217 units "0.1s";
218 default "10";
219 description
220 "Measurement period used to determine if an SDi alarm
221 has occurred for an ONU.";
222 reference
223 "ITU-T G.984.3 section 11.1.3";
224 }
225 leaf location {
226 type identityref {
227 base bbf-xpon-types:location-base;
228 }
229 description
230 "Indicates whether the CT is physically inside the OLT i.e.
231 can be related to a port in the OLT hardware model or
232 physically part of another OLT.";
233 }
234 }
235
236 grouping channel-termination-oper-data {
237 description
238 "All oper data for a channel termination";
239 leaf pon-id-display {
240 type bbf-xpon-types:pon-id-display-type;
241 description
242 "The PON-ID of the channel termination.
243 Per ITU-T G.989.3, ITU-T G.9807.1, ITU-T G.987.3 and
244 ITU-T G.984.3, depending of the xPON type some part
245 of this object is configured by the operator and the
246 other part is genuine operational data determined by
247 the system.";
248 }
249 leaf type-b-state {
250 type identityref {
251 base bbf-xpon-types:type-b-state-base;
252 }
253 description
254 "The type B protection state of the CT; it will typically
255 be active/standby. When the channel termination is not yet
256 referring to a channel pair, it is not part of any type B
257 protection scheme (and not usable either, btw); in that
258 case its type-b-state has the value 'not-part-of-type-b.";
259 reference
260 "ITU-T G.989.3 Amendment 1 clause 18.2";
261 }
262 leaf location {
263 type identityref {
264 base bbf-xpon-types:location-base;
265 }
266 description
267 "Indicates whether the CT is physically inside the OLT i.e.
268 can be related to a port in the OLT hardware model or
269 physically part of another OLT.";
270 }
271 }
272
273 augment '/if:interfaces/if:interface/bbf-xpon:channel-termination' {
274 description
275 "Configuration of an xPON channel termination.";
276 uses channel-termination-config-data;
277 }
278
279 augment '/if:interfaces-state/if:interface/bbf-xpon:channel-'
280 + 'termination' {
281 description
282 "State data of an xPON channel termination.";
283 uses channel-termination-oper-data;
284 }
285}