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-prot-otn-linear-aps@2018-10-19.yang
1 module org-openroadm-prot-otn-linear-aps {
2   namespace "http://org/openroadm/prot/otn-linear-aps";
3   prefix org-openroadm-prot-otn-linear-aps;
4
5   import org-openroadm-device {
6     prefix org-openroadm-device;
7     revision-date 2018-10-19;
8   }
9   import org-openroadm-common-types {
10     prefix org-openroadm-common-types;
11     revision-date 2018-10-19;
12   }
13
14   organization
15     "Open ROADM MSA";
16   contact
17     "OpenROADM.org";
18   description
19     "YANG definitions for device facility OTN linear APS protection groups.
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 2018-10-19 {
62     description
63       "Version 2.2.1";
64   }
65   revision 2017-12-15 {
66     description
67       "Version 2.2";
68   }
69   revision 2017-09-29 {
70     description
71       "Version 2.1";
72   }
73   revision 2017-07-28 {
74     description
75       "Version 2.0.1 - added revision-date to imports";
76   }
77   revision 2017-06-26 {
78     description
79       "Version 2.0";
80   }
81
82   identity otn-protection-type {
83     description
84       "OTN base protection identity from which
85          specific protection types are derived.";
86   }
87
88   identity odu-one-plus-one {
89     base otn-protection-type;
90     description
91       "ODU Linear Protection 1+1 permanant bridge";
92   }
93
94   grouping odu-sncp-protection-grps {
95     list odu-sncp-pg {
96       key "name";
97       leaf name {
98         type string;
99         description
100           "The odu-sncp-protection-group name";
101       }
102       leaf level {
103         type enumeration {
104           enum "line" {
105             value 1;
106           }
107           enum "path" {
108             value 2;
109           }
110         }
111         mandatory true;
112         description
113           "Designates protection group as Line or Path";
114       }
115       leaf prot-type {
116         type identityref {
117           base otn-protection-type;
118         }
119         default "odu-one-plus-one";
120         description
121           "The type of the protection group.";
122       }
123       leaf switching-direction {
124         type enumeration {
125           enum "unidirectional-switching" {
126             value 1;
127           }
128           enum "bidirectional-switching" {
129             value 2;
130           }
131         }
132         default "unidirectional-switching";
133         description
134           "Bidirectional refers to APS signaling enabled (G.873.1 Table 7-1 Table 8-1).";
135       }
136       leaf revertive {
137         type boolean;
138         default "false";
139         description
140           "Sets reversion behavior.";
141       }
142       leaf mode {
143         type enumeration {
144           enum "SNC/Ne" {
145             value 1;
146             description
147               "applicable to line or path switching";
148           }
149           enum "SNC/Ns" {
150             value 2;
151             description
152               "applicable to line or path switching";
153           }
154           enum "SNC/S" {
155             value 3;
156             description
157               "applicable to line or path switching";
158           }
159           enum "SNC/I" {
160             value 4;
161             description
162               "applicable to line switching only";
163           }
164           enum "CL-SNCG/I" {
165             value 5;
166             description
167               "applicable to line switching only";
168           }
169         }
170         mandatory true;
171         description
172           "Sets the protection mode";
173       }
174       leaf protection-trigger-level {
175         type enumeration {
176           enum "OTUk/ODUkA-SSF-SSD" {
177             value 1;
178             description
179               "applicable to SNC/I";
180           }
181           enum "ODUkP/ODUjA-SSF-SSD" {
182             value 2;
183             description
184               "applicable to CL-SNCG/I";
185           }
186           enum "ODUP-SSF-SSD" {
187             value 3;
188             description
189               "applicable to SNC/Ne";
190           }
191           enum "ODUT1" {
192             value 4;
193             description
194               "applicable to SNC/Ns or SNC/S";
195           }
196           enum "ODUT2" {
197             value 5;
198             description
199               "applicable to SNC/Ns or SNC/S";
200           }
201           enum "ODUT3" {
202             value 6;
203             description
204               "applicable to SNC/Ns or SNC/S";
205           }
206           enum "ODUT4" {
207             value 7;
208             description
209               "applicable to SNC/Ns or SNC/S";
210           }
211           enum "ODUT5" {
212             value 8;
213             description
214               "applicable to SNC/Ns or SNC/S";
215           }
216           enum "ODUT6" {
217             value 9;
218             description
219               "applicable to SNC/Ns or SNC/S";
220           }
221         }
222         description
223           "Indicates switch trigger.";
224       }
225       leaf wait-to-restore {
226         when "../revertive = 'true'";
227         type uint8 {
228           range "1..12";
229         }
230         units "minutes";
231         default "5";
232         description
233           "Wait to restore time in minutes";
234       }
235       container holdoff-timer {
236         leaf holdoff {
237           type uint8 {
238             range "0 | 20 | 100";
239           }
240           units "milliseconds";
241           default "0";
242           description
243             "switch hold-off time in milliseconds";
244         }
245         leaf holdoff-multiplier {
246           when "../holdoff= 100";
247           type uint8 {
248             range "1 .. 100";
249           }
250           default "1";
251           description
252             "switch holdoff time multiplier x100 milliseconds";
253         }
254       }
255       leaf working-if {
256         type leafref {
257           path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
258         }
259         mandatory true;
260         description
261           "Designated work interface";
262       }
263       leaf-list pg-interfaces {
264         type leafref {
265           path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
266         }
267         min-elements 1;
268         description
269           "List of interfaces in the PG";
270       }
271       leaf active-if {
272         type leafref {
273           path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
274         }
275         config false;
276         description
277           "Active interface in the PG";
278       }
279     }
280   }
281
282   rpc odu-sncp-protection-switch {
283     description
284       "ODU SNCP Protection Switch RPC with synchronous implementation";
285     input {
286       leaf protection-group {
287         type leafref {
288           path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protection-grps/org-openroadm-prot-otn-linear-aps:odu-sncp-pg/org-openroadm-prot-otn-linear-aps:name";
289         }
290         mandatory true;
291         description
292           "Target protection group";
293       }
294       leaf pg-interface {
295         type leafref {
296           path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
297         }
298         mandatory true;
299         description
300           "Target protection group interface";
301       }
302       leaf switch-command {
303         type enumeration {
304           enum "Lock-Out-Protect" {
305             value 1;
306           }
307           enum "Force-Switch" {
308             value 2;
309           }
310           enum "Manual-Switch" {
311             value 3;
312           }
313           enum "Release" {
314             value 4;
315           }
316         }
317       }
318     }
319     output {
320       uses org-openroadm-common-types:rpc-response-status;
321     }
322   }
323   notification odu-sncp-pg-switch-event {
324     leaf switch-status {
325       type enumeration {
326         enum "switched-to-protect" {
327           value 1;
328         }
329         enum "switched-back-to-working" {
330           value 2;
331         }
332       }
333       description
334         "Completed protection switch";
335     }
336     leaf odu-sncp-pg-name {
337       type string;
338       description
339         "The odu-sncp-protection-group name";
340     }
341   }
342   augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protection-grps" {
343     uses odu-sncp-protection-grps;
344   }
345 }