blob: 44e2d0d94491ca02789ac68cf6165a97c8bddb39 [file] [log] [blame]
Marc De Leenheerf20c7fb2017-05-05 10:24:41 -07001module org-openroadm-otn-odu-interfaces {
2 namespace "http://org/openroadm/otn-odu-interfaces";
3 prefix org-openroadm-otn-odu-interfaces;
4
5 import org-openroadm-device {
6 prefix org-openroadm-device;
7 }
8 import org-openroadm-interfaces {
9 prefix openROADM-if;
10 }
11 import org-openroadm-maintenance-testsignal {
12 prefix org-openroadm-maint-testsignal;
13 }
14
15 organization "Open ROADM MSA";
16 contact
17 "OpenROADM.org";
18 description
19 "YANG definitions for device facility otnodu interfaces.
20
21 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
22 AT&T Intellectual Property. All other rights reserved.
23
24 Redistribution and use in source and binary forms, with or without modification,
25 are permitted provided that the following conditions are met:
26
27 * Redistributions of source code must retain the above copyright notice, this
28 list of conditions and the following disclaimer.
29 * Redistributions in binary form must reproduce the above copyright notice,
30 this list of conditions and the following disclaimer in the documentation and/or
31 other materials provided with the distribution.
32 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
33 contributors may be used to endorse or promote products derived from this software
34 without specific prior written permission.
35
36 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
37 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
39 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
40 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
41 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
42 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
43 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
44 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45 POSSIBILITY OF SUCH DAMAGE.
46
47 Also contains code components extracted from IETF Interfaces. These code components
48 are copyrighted and licensed as follows:
49
50 Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
51 All rights reserved.
52
53 This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
54 to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
55 publication of this document. Please review these documents carefully, as they
56 describe your rights and restrictions with respect to this document. Code Components
57 extracted from this document must include Simplified BSD License text as described in
58 Section 4.e of the Trust Legal Provisions and are provided without warranty as
59 described in the Simplified BSD License.";
60
61 revision 2016-10-14 {
62 description
63 "Version 1.2";
64 }
65
66 identity odu-rate-identity {
67 description
68 "A unique rate identification of the ODUk.";
69 }
70
71 identity ODU4 {
72 base odu-rate-identity;
73 description
74 "Identity for an ODU4";
75 }
76
77 identity ODU3 {
78 base odu-rate-identity;
79 description
80 "Identity for an ODU3";
81 }
82
83 identity ODU2 {
84 base odu-rate-identity;
85 description
86 "Identity for an ODU2";
87 }
88
89 identity ODU2e {
90 base odu-rate-identity;
91 description
92 "Identity for an ODU2e";
93 }
94
95 identity ODU1 {
96 base odu-rate-identity;
97 description
98 "Identity for an ODU1";
99 }
100
101 identity ODU0 {
102 base odu-rate-identity;
103 description
104 "Identity for an ODU0";
105 }
106
107 identity ODUflex {
108 base odu-rate-identity;
109 description
110 "Identity for an ODUflex";
111 }
112
113 identity odtu-type-identity {
114 description
115 "A unique identification for the MSI odtu type.";
116 }
117
118 identity ODTU4.ts-Allocated {
119 base odtu-type-identity;
120 description
121 "OPU4 MSI - ODTU4.ts, TS is occupied/allocated";
122 }
123
124 identity ODTU4.1 {
125 base odtu-type-identity;
126 description
127 "ODTU4.1 MSI type";
128 }
129
130 identity ODTU4.2 {
131 base odtu-type-identity;
132 description
133 "ODTU4.2 MSI type";
134 }
135
136 identity ODTU4.8 {
137 base odtu-type-identity;
138 description
139 "ODTU4.8 MSI type";
140 }
141
142 identity ODTU4.31 {
143 base odtu-type-identity;
144 description
145 "ODTU4.31 MSI type";
146 }
147
148 identity ODTU01 {
149 base odtu-type-identity;
150 description
151 "ODTU01 MSI type";
152 }
153
154 identity ODTU12 {
155 base odtu-type-identity;
156 description
157 "ODTU12 MSI type";
158 }
159
160 identity ODTU13 {
161 base odtu-type-identity;
162 description
163 "ODTU13 MSI type";
164 }
165
166 identity ODTU23 {
167 base odtu-type-identity;
168 description
169 "ODTU23 MSI type";
170 }
171
172 identity ODTU2.ts {
173 base odtu-type-identity;
174 description
175 "ODTU2.ts MSI type";
176 }
177
178 identity ODTU3.ts {
179 base odtu-type-identity;
180 description
181 "ODTU3.ts MSI type";
182 }
183
184 identity unallocated {
185 base odtu-type-identity;
186 description
187 "Unallocated MSI type";
188 }
189
190 grouping msi-entry {
191 leaf trib-slot {
192 type uint16;
193 description
194 "tributary slot (TS)";
195 }
196 leaf odtu-type {
197 type identityref {
198 base odtu-type-identity;
199 }
200 description
201 "ODTU type, part of the MSI (Multiplex Structure Identifier)";
202 }
203 leaf trib-port {
204 type uint8;
205 description
206 "Tributray Port Number (0-based), part of the MSI";
207 }
208 leaf trib-port-payload {
209 type string;
210 description
211 "interface name being mapped to trib-port";
212 }
213 }
214
215 grouping odu-attributes {
216 description
217 "ODU attributes";
218 leaf rate {
219 type identityref {
220 base odu-rate-identity;
221 }
222 description
223 "rate identity of the ODU. 'identityref' is used
224 to allow to extend for future higher rates";
225 }
226 leaf monitoring-mode {
227 type enumeration {
228 enum "not-terminated" {
229 description
230 "Not Terminated: no detection or generation.
231 Overhead is passed through the interface transparently in receive direction";
232 }
233 enum "terminated" {
234 description
235 "Terminated: detection and generation enabled.
236 Overhead is erased (replaced with all zeros) in receive direction";
237 }
238 enum "monitored" {
239 description
240 "Monitored: detection enabled.
241 Overhead is passed through the interface transparently in receive direction";
242 }
243 }
244 description
245 "Monitoring mode of the ODU Overhead";
246 }
247 leaf proactive-delay-measurement-enabled {
248 type boolean;
249 description
250 "enable/disable proactive Delay Measurement";
251 }
252 list tcm {
253 key "layer";
254 uses tcm-attributes;
255 max-elements "6";
256 description
257 "Tandem Connection Management";
258 }
259 uses opu;
260 }
261
262 grouping opu {
263 container opu {
264 when "../monitoring-mode = 'terminated' or ../monitoring-mode = 'monitored'";
265 description
266 "Optical Channel Payload Unit (OPU)";
267 leaf payload-type {
268 type string {
269 length "2";
270 pattern "[0-9a-fA-F]*";
271 }
272 description
273 "Payload Type";
274 }
275 leaf rx-payload-type {
276 type string {
277 length "2";
278 pattern "[0-9a-fA-F]*";
279 }
280 description
281 "Received Payload Type";
282 }
283 leaf exp-payload-type {
284 type string {
285 length "2";
286 pattern "[0-9a-fA-F]*";
287 }
288 description
289 "Expected Payload Type";
290 }
291 leaf payload-interface {
292 type string;
293 description
294 "Expected Payload of OPU. It designates client interface name";
295 }
296 container msi {
297 when "../payload-type = '20' or ../payload-type = '21'";
298 list tx-msi {
299 key "trib-slot";
300 uses msi-entry;
301 description
302 "Transmit MSI";
303 }
304 list rx-msi {
305 key "trib-slot";
306 uses msi-entry;
307 description
308 "Receive MSI";
309 }
310 list exp-msi {
311 key "trib-slot";
312 uses msi-entry;
313 description
314 "Expected MSI";
315 }
316 }
317 }
318 }
319
320 grouping tcm-attributes {
321 description
322 "Tandem Connection Monitoring (TCM) attributes";
323 leaf layer {
324 type uint8 {
325 range "1..6";
326 }
327 description
328 "TCM layer";
329 }
330 leaf monitoring-mode {
331 type enumeration {
332 enum "not-terminated" {
333 description
334 "Not Terminated: no detection or generation.
335 Overhead is passed through the interface transparently in receive direction
336 unless extension is set for erase";
337 }
338 enum "terminated" {
339 description
340 "Terminated: detection and generation enabled.
341 Overhead is erased (replaced with all zeros) in receive direction, unless
342 extension is set to passthrough";
343 }
344 enum "monitored" {
345 description
346 "Monitored: detection enabled.
347 Overhead is passed through the interface transparently in receive direction
348 unless extension is set for erase";
349 }
350 }
351 description
352 "Monitoring mode of the TCM layer";
353 }
354 leaf ltc-act-enabled {
355 type boolean;
356 description
357 "enable/disable alarm transfer on detection of Loss of Tandem Connection (LTC)";
358 }
359 leaf proactive-delay-measurement-enabled {
360 type boolean;
361 description
362 "enable/disable proactive Delay Measurement";
363 }
364 }
365
366 grouping odu-container {
367 container odu {
368 presence "Attribute Nodes for Optical Data Unit (ODU)";
369 description
370 "Optical Channel Data Unit (ODU)";
371 uses odu-attributes {
372 refine "opu/rx-payload-type" {
373 config false;
374 }
375 refine "opu/msi" {
376 config false;
377 }
378 }
379 uses org-openroadm-maint-testsignal:maint-testsignal;
380 }
381 }
382
383 augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
384 when "org-openroadm-device:type = 'openROADM-if:otnOdu'";
385 uses odu-container;
386 }
387}