Merge "Fix bug when creating SRG termination points"
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-otn-odu-interfaces@2020-05-29.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 2020-05-29;
9   }
10   import org-openroadm-interfaces {
11     prefix openROADM-if;
12     revision-date 2019-11-29;
13   }
14   import org-openroadm-maintenance-testsignal {
15     prefix org-openroadm-maint-testsignal;
16     revision-date 2020-05-29;
17   }
18   import org-openroadm-otn-common {
19     prefix org-openroadm-otn-common;
20     revision-date 2020-03-27;
21   }
22   import org-openroadm-otn-common-types {
23     prefix org-openroadm-otn-common-types;
24     revision-date 2020-03-27;
25   }
26   import org-openroadm-common-attributes {
27     prefix org-openroadm-common-attributes;
28     revision-date 2020-03-27;
29   }
30
31   organization
32     "Open ROADM MSA";
33   contact
34     "OpenROADM.org";
35   description
36     "YANG definitions for device facility otnodu interfaces.
37
38      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
39      All other rights reserved.
40
41      Redistribution and use in source and binary forms, with or without modification,
42      are permitted provided that the following conditions are met:
43
44      * Redistributions of source code must retain the above copyright notice, this
45        list of conditions and the following disclaimer.
46      * Redistributions in binary form must reproduce the above copyright notice,
47        this list of conditions and the following disclaimer in the documentation and/or
48        other materials provided with the distribution.
49      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
50        contributors may be used to endorse or promote products derived from this software
51        without specific prior written permission.
52
53      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
54      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
55      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
56      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
57      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
58      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
59      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
60      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
61      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
62      POSSIBILITY OF SUCH DAMAGE.
63
64      Also contains code components extracted from IETF Interfaces.  These code components
65      are copyrighted and licensed as follows:
66
67      Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
68      All rights reserved.
69
70      This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating
71      to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
72      publication of this document. Please review these documents carefully, as they
73      describe your rights and restrictions with respect to this document. Code Components
74      extracted from this document must include Simplified BSD License text as described in
75      Section 4.e of the Trust Legal Provisions and are provided without warranty as
76      described in the Simplified BSD License.";
77
78   revision 2020-05-29 {
79     description
80       "Version 7.1.0";
81   }
82   revision 2020-03-27 {
83     description
84       "Version 7.0.0";
85   }
86   revision 2019-11-29 {
87     description
88       "Version 6.1.0";
89   }
90   revision 2019-09-27 {
91     description
92       "Version 6.0.0";
93   }
94   revision 2019-05-31 {
95     description
96       "Version 5.1.0";
97   }
98   revision 2019-03-29 {
99     description
100       "Version 5.0.0";
101   }
102   revision 2018-11-30 {
103     description
104       "Version 4.1.0";
105   }
106   revision 2018-09-28 {
107     description
108       "Version 4.0.0";
109   }
110   revision 2018-05-30 {
111     description
112       "Version 3.1.0";
113   }
114   revision 2018-03-30 {
115     description
116       "Version 3.0.0";
117   }
118   revision 2017-12-15 {
119     description
120       "Version 2.2";
121   }
122   revision 2017-09-29 {
123     description
124       "Version 2.1";
125   }
126   revision 2017-07-28 {
127     description
128       "Version 2.0.1 - added revision-date to imports";
129   }
130   revision 2017-06-26 {
131     description
132       "Version 2.0";
133   }
134   revision 2016-10-14 {
135     description
136       "Version 1.2";
137   }
138
139   grouping msi-entry {
140     description
141       "OPU Multiplex Structure Identifier (G.709 clause 19.4.1)";
142     leaf trib-slot {
143       type uint16;
144       description
145         "tributary slot (TS)";
146     }
147     leaf odtu-type {
148       type identityref {
149         base org-openroadm-otn-common-types:odtu-type-identity;
150       }
151       description
152         "ODTU type, part of the MSI (Multiplex Structure Identifier)";
153     }
154     leaf trib-port {
155       type uint16;
156       description
157         "Tributary Port Number (0-based), part of the MSI";
158     }
159   }
160
161   grouping opucn-msi-entry {
162     description
163       "OPUCn Multiplex Structure Identifier (G.709 clause 20.4.1)";
164     leaf opucn-trib-slot {
165       type org-openroadm-otn-common-types:opucn-trib-slot-def;
166       description
167         "OPUCn tributary slot (TS)";
168     }
169     leaf availability {
170       type boolean;
171       description
172         "available";
173     }
174     leaf occupation {
175       type boolean;
176       description
177         "occupied";
178     }
179     leaf trib-port {
180       type uint16;
181       description
182         "OPUCn Tributary Port Number (0-based), part of the MSI";
183     }
184   }
185
186   grouping odu-attributes {
187     description
188       "ODU attributes";
189     leaf rate {
190       type identityref {
191         base org-openroadm-otn-common-types:odu-rate-identity;
192       }
193       description
194         "rate identity of the ODU. 'identityref' is used
195          to allow to extend for future higher rates";
196     }
197     leaf oducn-n-rate {
198       type uint16;
199       description
200         "ODUCn rate";
201     }
202     leaf oduflex-cbr-service {
203       type identityref {
204         base org-openroadm-otn-common-types:ODUflex-cbr-identity;
205       }
206       description
207         "ODUflex for CBR client signals (G.709)";
208     }
209     leaf oduflex-gfp-num-ts {
210       type uint16;
211       description
212         "For ODUflex GFP-F mapped client signals (G.709), the number of
213          tributary slot as per G.709 Table 7-8";
214     }
215     leaf oduflex-gfp-ts-bandwidth {
216       type uint16;
217       description
218         "The tributary slot minimum bit rates in the approximated value [Mbps]
219          given ODUflex (GFP) 100 ppm (G.709 Table 7-8) :
220            1249 Mbps [1 249 052.312 277 kbps] (n = 1 to 8) (ODU2.ts)
221            1254 Mbps [1 254 344.906 9646 kbps] (n = 9 to 32) ODU3.ts)
222            1301 Mbps [1 301 336.986 2867 kbps] (n = 33 to 80) (ODU4.ts)";
223     }
224     leaf oduflex-imp-s {
225       type uint16;
226       description
227         "For ODUflex IMP (Idle insertion Mapping Procedure) mapped client signals,
228          s = 2, 8, n x 5 with N >= 1 (G.709 12.2.6 & Table 7-3)";
229     }
230     leaf oduflex-flexe-n {
231       type uint16;
232       description
233         "For ODUflex for FlexE-aware client signals, n in the range of 1 to 20*254
234          (G.709 17.12)";
235     }
236     leaf odu-function {
237       type identityref {
238         base org-openroadm-otn-common-types:odu-function-identity;
239       }
240       description
241         "function of the ODU interface";
242     }
243     leaf monitoring-mode {
244       type enumeration {
245         enum not-terminated {
246           description
247             "Not Terminated: no detection or generation.
248              Overhead is passed through the interface transparently in receive direction";
249         }
250         enum terminated {
251           description
252             "Terminated: detection and generation enabled.
253              Overhead is erased (replaced with all zeros) in receive direction";
254         }
255         enum monitored {
256           description
257             "Monitored: detection enabled.
258              Overhead is passed through the interface transparently in receive direction";
259         }
260       }
261       description
262         "Monitoring mode of the ODU Overhead";
263     }
264     leaf no-oam-function {
265       type empty;
266       description
267         "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.";
268     }
269     leaf proactive-delay-measurement-enabled {
270       type boolean;
271       description
272         "enable/disable proactive Delay Measurement";
273     }
274     uses org-openroadm-common-attributes:parent-odu-allocation;
275     uses org-openroadm-otn-common:trail-trace;
276     uses org-openroadm-common-attributes:deg-threshold;
277     list tcm {
278       key "layer tcm-direction";
279       max-elements 12;
280       description
281         "Tandem Connection Management";
282       uses tcm-attributes;
283     }
284     uses opu;
285   }
286
287   grouping opu {
288     description
289       "OPU group";
290     container opu {
291       when "../monitoring-mode = 'terminated' or ../monitoring-mode = 'monitored'";
292       description
293         "Optical Channel Payload Unit (OPU)";
294       leaf payload-type {
295         type org-openroadm-otn-common-types:payload-type-def;
296         description
297           "Payload Type";
298       }
299       leaf rx-payload-type {
300         type org-openroadm-otn-common-types:payload-type-def;
301         description
302           "Received Payload Type";
303       }
304       leaf exp-payload-type {
305         type org-openroadm-otn-common-types:payload-type-def;
306         description
307           "Expected Payload Type";
308       }
309       container msi {
310         when "../payload-type = '20' or ../payload-type = '21'";
311         description
312           "Multiple Structure Identifier";
313         list tx-msi {
314           key "trib-slot";
315           description
316             "Transmit MSI";
317           uses msi-entry;
318         }
319         list rx-msi {
320           key "trib-slot";
321           description
322             "Received MSI";
323           uses msi-entry;
324         }
325         list exp-msi {
326           key "trib-slot";
327           description
328             "Expected MSI";
329           uses msi-entry;
330         }
331       }
332       container opucn-msi {
333         when "../payload-type = '22'";
334         description
335           "OPUCn Mutiplex Structure Identifier (G.709 clause 20.4.1)";
336         list tx-msi {
337           key "opucn-trib-slot";
338           description
339             "Transmit MSI";
340           uses opucn-msi-entry;
341         }
342         list rx-msi {
343           key "opucn-trib-slot";
344           description
345             "Received MSI";
346           uses opucn-msi-entry;
347         }
348         list exp-msi {
349           key "opucn-trib-slot";
350           description
351             "Expected MSI";
352           uses opucn-msi-entry;
353         }
354       }
355     }
356   }
357
358   grouping tcm-attributes {
359     description
360       "Tandem Connection Monitoring (TCM) attributes";
361     leaf layer {
362       type uint8 {
363         range "1..6";
364       }
365       description
366         "TCM layer";
367     }
368     leaf monitoring-mode {
369       type enumeration {
370         enum not-terminated {
371           description
372             "Not Terminated: no detection or generation.
373              Overhead is passed through the interface transparently in receive direction
374              unless extension is set for erase";
375         }
376         enum terminated {
377           description
378             "Terminated: detection and generation enabled.
379              Overhead is erased (replaced with all zeros) in receive direction, unless
380              extension is set to passthrough";
381         }
382         enum monitored {
383           description
384             "Monitored: detection enabled.
385              Overhead is passed through the interface transparently in receive direction
386              unless extension is set for erase";
387         }
388       }
389       description
390         "Monitoring mode of the TCM layer";
391     }
392     leaf ltc-act-enabled {
393       type boolean;
394       description
395         "enable/disable alarm transfer on detection of Loss of Tandem Connection (LTC)";
396     }
397     leaf proactive-delay-measurement-enabled {
398       type boolean;
399       description
400         "enable/disable proactive Delay Measurement for TCM";
401     }
402     leaf tcm-direction {
403       type org-openroadm-otn-common-types:tcm-direction-enum;
404       description
405         "Direction of TCM.";
406     }
407     uses org-openroadm-otn-common:trail-trace;
408     uses org-openroadm-common-attributes:deg-threshold;
409   }
410
411   grouping odu-container {
412     description
413       "ODU container group";
414     container odu {
415       presence "Attribute Nodes for Optical Data Unit (ODU)";
416       description
417         "Optical Channel Data Unit (ODU)";
418       uses odu-attributes {
419         refine "opu/rx-payload-type" {
420           config false;
421         }
422         refine "opu/msi" {
423           config false;
424         }
425         refine "opu/opucn-msi" {
426           config false;
427         }
428         refine "no-oam-function" {
429           config false;
430         }
431       }
432       uses org-openroadm-maint-testsignal:maint-testsignal;
433     }
434   }
435
436   augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
437     when "org-openroadm-device:type = 'openROADM-if:otnOdu'";
438     description
439       "augment for ODU container";
440     uses odu-container;
441   }
442 }