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