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