Sync Common folder
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-port-capability@2017-12-15.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 2017-12-15;
8   }
9   import org-openroadm-port-types {
10     prefix org-openroadm-port-types;
11     revision-date 2017-12-15;
12   }
13   import org-openroadm-prot-otn-linear-aps {
14     prefix org-openroadm-prot-otn-linear-aps;
15     revision-date 2017-12-15;
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 2017-12-15 {
70     description
71       "Version 2.2";
72   }
73   revision 2017-09-29 {
74     description
75       "Version 2.1";
76   }
77
78   typedef tcm-direction-capability-type {
79     type enumeration {
80       enum "up-tcm" {
81         description
82           "Port supports up TCM termination, e.g., direction facing the switch fabric";
83       }
84       enum "down-tcm" {
85         description
86           "Port supports down TCM termination, e.g., direction facing out of the equipment ";
87       }
88       enum "up-down-tcm" {
89         description
90           "Port supports both up and down TCM terminations";
91       }
92     }
93     description
94       "TCM direction capability for the port";
95   }
96
97   grouping port-id-grp {
98     leaf circuit-pack-name {
99       type leafref {
100         path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:circuit-pack-name";
101       }
102       description
103         "Circuit-Pack identifier. Unique within the context of a device.";
104     }
105     leaf port-name {
106       type leafref {
107         path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:ports/org-openroadm-device:port-name";
108       }
109       description
110         "Port index identifier. Unique within the context of a circuit-pack.";
111     }
112   }
113
114   grouping slot-id-grp {
115     leaf circuit-pack-name {
116       type leafref {
117         path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:circuit-pack-name";
118       }
119       description
120         "Circuit-Pack identifier. Unique within the context of a device.";
121     }
122     leaf slot-name {
123       type leafref {
124         path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:cp-slots/org-openroadm-device:slot-name";
125       }
126       description
127         "cp-slot name. Unique within the context of a circuit-pack.";
128     }
129   }
130
131   grouping port-capability-grp {
132     description
133       "OpenROADM port capability parameters.";
134     container port-capabilities {
135       config false;
136       list supported-interface-capability {
137         key "if-cap-type";
138         description
139           "Supported interface capability on the port.";
140         leaf if-cap-type {
141           type identityref {
142             base org-openroadm-port-types:supported-if-capability;
143           }
144           description
145             "Interface type/hierarchy/rate supported on this port";
146         }
147         container otn-capability {
148           leaf-list if-protection-capability {
149             type identityref {
150               base org-openroadm-prot-otn-linear-aps:otn-protection-type;
151             }
152             description
153               "supported protection types if protection is supported on this port";
154           }
155           leaf proactive-DMp {
156             type boolean;
157             description
158               "ODU PM delay measurement (DMp) (G.709 06-2016 15.8.2.1.6)";
159           }
160           leaf tcm-capable {
161             type boolean;
162             description
163               "only when tcm-capable=true, the following two are applicable (ie, proactive-DMt, tcm-direction";
164           }
165           leaf proactive-DMt {
166             when "../tcm-capable= 'true'";
167             type boolean;
168             description
169               "ODU TCM delay measurement (DMt) (G.709 06-2016 15.8.2.2.8)";
170           }
171           leaf tcm-direction-capability {
172             when "../tcm-capable= 'true'";
173             type tcm-direction-capability-type;
174             description
175               "Supported tcm direction capability on the ODUk associated with the port.";
176           }
177           leaf-list opu-payload-type-mapping {
178             type org-openroadm-otn-common-types:payload-type-def;
179             description
180               "OPU payload-type mapping OPU.";
181           }
182           container mpdr-client-restriction {
183             description
184               "Restriction rules for how LO ODUs are multiplexed into HO ODU
185                and the relation with mapped client ports.";
186             leaf network-ho-odu-circuit-pack-name {
187               type leafref {
188                 path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:circuit-pack-name";
189               }
190               mandatory true;
191               description
192                 "Circuit-Pack identifier. Unique within the context of a device.";
193             }
194             leaf network-ho-odu-port-name {
195               type leafref {
196                 path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs[org-openroadm-device:circuit-pack-name=current()/../network-ho-odu-circuit-pack-name]/org-openroadm-device:ports/org-openroadm-device:port-name";
197               }
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 leafref {
318                 path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:ports/org-openroadm-device:port-name";
319               }
320             }
321             leaf-list port-if-type {
322               type identityref {
323                 base org-openroadm-port-types:supported-if-capability;
324               }
325             }
326           }
327         }
328       }
329     }
330   }
331
332   augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:ports" {
333     uses port-capability-grp;
334   }
335   augment "/org-openroadm-device:org-openroadm-device" {
336     uses port-group-restriction-grp;
337   }
338 }