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