HoneyNode Java 11 support for 221 devices
[transportpce.git] / tests / honeynode / 2.2.1 / honeynode-plugin-impl / src / main / resources / honeycomb-minimal-resources / config / yang / devices / org-openroadm-port-capability@2018-10-19.yang
1 module org-openroadm-port-capability {
2   namespace "http://org/openroadm/port-capability";
3   prefix org-openroadm-port-capability;
4
5   import org-openroadm-device {
6     prefix org-openroadm-device;
7     revision-date 2018-10-19;
8   }
9   import org-openroadm-port-types {
10     prefix org-openroadm-port-types;
11     revision-date 2018-10-19;
12   }
13   import org-openroadm-prot-otn-linear-aps {
14     prefix org-openroadm-prot-otn-linear-aps;
15     revision-date 2018-10-19;
16   }
17   import org-openroadm-otn-common-types {
18     prefix org-openroadm-otn-common-types;
19     revision-date 2017-12-15;
20   }
21
22   organization
23     "Open ROADM MSA";
24   contact
25     "OpenROADM.org";
26   description
27     "YANG definitions for device facility OTN linear APS protection groups.
28
29      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
30      AT&T Intellectual Property.  All other rights reserved.
31
32      Redistribution and use in source and binary forms, with or without modification,
33      are permitted provided that the following conditions are met:
34
35      * Redistributions of source code must retain the above copyright notice, this
36        list of conditions and the following disclaimer.
37      * Redistributions in binary form must reproduce the above copyright notice,
38        this list of conditions and the following disclaimer in the documentation and/or
39        other materials provided with the distribution.
40      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
41        contributors may be used to endorse or promote products derived from this software
42        without specific prior written permission.
43
44      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
45      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
46      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
47      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
48      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
49      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
50      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
51      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
52      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
53      POSSIBILITY OF SUCH DAMAGE.
54
55      Also contains code components extracted from IETF Interfaces.  These code components
56      are copyrighted and licensed as follows:
57
58      Copyright (c) 2017 IETF Trust and the persons identified as the document authors.
59      All rights reserved.
60
61      This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating
62      to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
63      publication of this document. Please review these documents carefully, as they
64      describe your rights and restrictions with respect to this document. Code Components
65      extracted from this document must include Simplified BSD License text as described in
66      Section 4.e of the Trust Legal Provisions and are provided without warranty as
67      described in the Simplified BSD License.";
68
69   revision 2018-10-19 {
70     description
71       "Version 2.2.1";
72   }
73   revision 2017-12-15 {
74     description
75       "Version 2.2";
76   }
77   revision 2017-09-29 {
78     description
79       "Version 2.1";
80   }
81
82   typedef tcm-direction-capability-type {
83     type enumeration {
84       enum "up-tcm" {
85         description
86           "Port supports up TCM termination, e.g., direction facing the switch fabric";
87       }
88       enum "down-tcm" {
89         description
90           "Port supports down TCM termination, e.g., direction facing out of the equipment ";
91       }
92       enum "up-down-tcm" {
93         description
94           "Port supports both up and down TCM terminations";
95       }
96     }
97     description
98       "TCM direction capability for the port";
99   }
100
101   grouping port-id-grp {
102     leaf circuit-pack-name {
103       type leafref {
104         path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:circuit-pack-name";
105       }
106       description
107         "Circuit-Pack identifier. Unique within the context of a device.";
108     }
109     leaf port-name {
110       type leafref {
111         path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:ports/org-openroadm-device:port-name";
112       }
113       description
114         "Port index identifier. Unique within the context of a circuit-pack.";
115     }
116   }
117
118   grouping slot-id-grp {
119     leaf circuit-pack-name {
120       type leafref {
121         path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:circuit-pack-name";
122       }
123       description
124         "Circuit-Pack identifier. Unique within the context of a device.";
125     }
126     leaf slot-name {
127       type leafref {
128         path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:cp-slots/org-openroadm-device:slot-name";
129       }
130       description
131         "cp-slot name. Unique within the context of a circuit-pack.";
132     }
133   }
134
135   grouping port-capability-grp {
136     description
137       "OpenROADM port capability parameters.";
138     container port-capabilities {
139       config false;
140       list supported-interface-capability {
141         key "if-cap-type";
142         description
143           "Supported interface capability on the port.";
144         leaf if-cap-type {
145           type identityref {
146             base org-openroadm-port-types:supported-if-capability;
147           }
148           description
149             "Interface type/hierarchy/rate supported on this port";
150         }
151         container otn-capability {
152           leaf-list if-protection-capability {
153             type identityref {
154               base org-openroadm-prot-otn-linear-aps:otn-protection-type;
155             }
156             description
157               "supported protection types if protection is supported on this port";
158           }
159           leaf proactive-DMp {
160             type boolean;
161             description
162               "ODU PM delay measurement (DMp) (G.709 06-2016 15.8.2.1.6)";
163           }
164           leaf tcm-capable {
165             type boolean;
166             description
167               "only when tcm-capable=true, the following two are applicable (ie, proactive-DMt, tcm-direction";
168           }
169           leaf proactive-DMt {
170             when "../tcm-capable= 'true'";
171             type boolean;
172             description
173               "ODU TCM delay measurement (DMt) (G.709 06-2016 15.8.2.2.8)";
174           }
175           leaf tcm-direction-capability {
176             when "../tcm-capable= 'true'";
177             type tcm-direction-capability-type;
178             description
179               "Supported tcm direction capability on the ODUk associated with the port.";
180           }
181           leaf-list opu-payload-type-mapping {
182             type org-openroadm-otn-common-types:payload-type-def;
183             description
184               "OPU payload-type mapping OPU.";
185           }
186           container mpdr-client-restriction {
187             description
188               "Restriction rules for how LO ODUs are multiplexed into HO ODU
189                and the relation with mapped client ports.";
190             leaf network-ho-odu-circuit-pack-name {
191               type string;
192               mandatory true;
193               description
194                 "Circuit-Pack identifier. Unique within the context of a device.";
195             }
196             leaf network-ho-odu-port-name {
197               type string;
198               mandatory true;
199               description
200                 "port identifier.";
201             }
202             leaf odtu-type {
203               type identityref {
204                 base org-openroadm-otn-common-types:odtu-type-identity;
205               }
206               mandatory true;
207               description
208                 "ODTU type, part of the MSI (Multiplex Structure Identifier)";
209             }
210             leaf network-ho-odu-trib-port-number {
211               type uint16 {
212                 range "1 .. 80";
213               }
214               mandatory true;
215               description
216                 "Tributary port number";
217             }
218             leaf-list network-ho-odu-trib-slots {
219               type uint16 {
220                 range "1 .. 80";
221               }
222               min-elements 1;
223               max-elements "80";
224             }
225           }
226           container odu-mux-hierarchy {
227             presence "HO ODU supported hierarchy.";
228             list mux-capability {
229               key "stage-number ho-odu-type ho-odu-payload-type";
230               leaf stage-number {
231                 type uint8 {
232                   range "1 .. 2";
233                 }
234               }
235               leaf ho-odu-type {
236                 type identityref {
237                   base org-openroadm-otn-common-types:odu-rate-identity;
238                 }
239               }
240               leaf ho-odu-payload-type {
241                 type org-openroadm-otn-common-types:payload-type-def;
242                 description
243                   "high order ODU payload type";
244               }
245               leaf-list supported-lo-odu-type {
246                 type identityref {
247                   base org-openroadm-otn-common-types:odu-rate-identity;
248                 }
249               }
250               leaf lo-odu-proactive-DMp {
251                 type boolean;
252                 description
253                   "lo order ODU PM delay measurement (DMp) (G.709 06-2016 15.8.2.1.6)";
254               }
255               leaf lo-odu-tcm-capable {
256                 type boolean;
257                 description
258                   "only when lo-odu-tcm-capable=true, the following two are applicable (ie, lo-odu-proactive-DMt, lo-odu-tcm-direction";
259               }
260               leaf lo-odu-proactive-DMt {
261                 when "../lo-odu-tcm-capable= 'true'";
262                 type boolean;
263                 description
264                   "lo order ODU TCM delay measurement (DMt) (G.709 06-2016 15.8.2.2.8)";
265               }
266               leaf lo-odu-tcm-direction-capability {
267                 when "../lo-odu-tcm-capable= 'true'";
268                 type tcm-direction-capability-type;
269                 description
270                   "Supported tcm direction capability for low order ODU associated with the port.";
271               }
272             }
273           }
274         }
275       }
276     }
277   }
278
279   grouping port-group-restriction-grp {
280     container port-group-restriction {
281       config false;
282       list port-bandwidth-sharing {
283         key "port-sharing-id";
284         leaf port-sharing-id {
285           type uint16;
286         }
287         list port-list {
288           key "circuit-pack-name port-name";
289           uses port-id-grp;
290         }
291         list pluggable-optics-holder-list {
292           key "circuit-pack-name slot-name";
293           uses slot-id-grp;
294         }
295         leaf shared-bandwidth {
296           type uint16;
297           units "Gbps";
298         }
299         list possible-port-config {
300           key "config-id";
301           leaf config-id {
302             type uint16;
303           }
304           list port-if-type-config {
305             key "circuit-pack-name port-name";
306             uses port-id-grp;
307             leaf-list port-if-type {
308               type identityref {
309                 base org-openroadm-port-types:supported-if-capability;
310               }
311             }
312           }
313           list slot-if-type-config {
314             key "circuit-pack-name slot-name port-name";
315             uses slot-id-grp;
316             leaf port-name {
317               type string;
318             }
319             leaf-list port-if-type {
320               type identityref {
321                 base org-openroadm-port-types:supported-if-capability;
322               }
323             }
324           }
325         }
326       }
327     }
328   }
329
330   augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:ports" {
331     uses port-capability-grp;
332   }
333   augment "/org-openroadm-device:org-openroadm-device" {
334     uses port-group-restriction-grp;
335   }
336 }