Add missing ODUFlex interface
[transportpce.git] / api / src / main / yang / transportpce-portmapping@2021-09-27.yang
1 module transportpce-portmapping {
2   yang-version 1;
3   namespace "http://org/opendaylight/transportpce/portmapping";
4   prefix org-opendaylight-transportpce-portmapping;
5
6   import ietf-inet-types {
7     prefix ietf-inet-types;
8     revision-date 2013-07-15;
9   }
10   import org-openroadm-common-optical-channel-types {
11     prefix org-openroadm-common-optical-channel-types;
12     revision-date 2020-05-29;
13   }
14   import org-openroadm-device-types {
15      prefix org-openroadm-device-types;
16      revision-date 2019-11-29;
17   }
18   import org-openroadm-otn-common-types {
19       prefix org-openroadm-otn-common-types;
20       revision-date 2020-03-27;
21   }
22   import org-openroadm-switching-pool-types {
23     prefix org-openroadm-switching-pool-types;
24     revision-date 2019-11-29;
25   }
26   import org-openroadm-port-types {
27     prefix org-openroadm-port-types;
28     revision-date 2020-03-27;
29   }
30
31
32   organization
33     "transportPCE";
34   contact
35     "transportPCE committers - ODL";
36   description
37     "YANG definitions for defining port mapping in TransportPCE.
38      Copyright (c) 2017 AT&T and others. All rights reserved.
39      authors: Dhruv Bhardwaj ( db929a@att.com ) Shweta Vachhani ( sv111y@att.com )
40               Balagangadhar Bathula ( bb4341@att.com )";
41
42   revision 2021-09-27 {
43       description
44       "Add supporting-otu interface in mapping";
45   }
46   revision 2021-04-26 {
47       description
48       "Adding mux-profile information to support 400G Muxponder";
49   }
50   revision 2021-04-25 {
51       description
52       "OpenROADM version fix 7.1.0 -> 7.1";
53   }
54   revision 2021-03-15 {
55     description
56       "Refacto model to use grouping";
57   }
58   revision 2021-03-10 {
59     description
60       "Add operational and administrative state of device port
61        in mapping";
62   }
63   revision 2020-10-12 {
64     description
65       "Upgrading imported models to 7.1.0";
66   }
67   revision 2020-08-27 {
68     description
69       "Add support to differentiate flexible and fixed
70        grid capabilities with mc-capabilities";
71   }
72   revision 2020-04-29 {
73     description
74       "Add SAPI/DAPI lcp hash value";
75   }
76   revision 2020-01-28 {
77     description
78       "Add necessary parameters to consolidate OTN
79        and address ONAP MDONS use case";
80   }
81   revision 2020-01-13 {
82     description
83       "Add OTN data from device and necessary
84        to build node inside otn topology";
85   }
86   revision 2019-11-15 {
87     description
88       "OTN support";
89   }
90   revision 2019-07-02 {
91     description
92       "Version 2. To manage device 2.2.1";
93   }
94   revision 2017-02-28 {
95     description
96       "Initial revision of port mapping model";
97   }
98
99   typedef openroadm-node-version {
100     type enumeration {
101       enum 1.2.1 {
102         value 1;
103         description
104           "Version 1.2.1";
105       }
106       enum 2.2.1 {
107         value 2;
108         description
109           "Version 2.2.1";
110       }
111       enum 7.1 {
112         value 3;
113         description
114           "Version 7.1";
115       }
116     }
117     description
118         "YANG enumerations for OpenROADM models;
119          enums should be same as OpenROADM models
120          defined in org-openroadm-common-types";
121   }
122
123   grouping node-info {
124     leaf node-type {
125       type org-openroadm-device-types:node-types;
126       description
127         "Identifier for node-type e.g Roadm, xponder";
128     }
129     leaf openroadm-version {
130       type openroadm-node-version;
131     }
132     leaf node-clli {
133       type string;
134       description
135         "Common Language Location Identifier.";
136     }
137     leaf node-vendor {
138       type string;
139       description
140         "Vendor of the equipment";
141     }
142     leaf node-model {
143       type string;
144       description
145         "Physical resource model information.";
146     }
147     leaf node-ip-address {
148       type ietf-inet-types:ip-address;
149       description
150         "Current IP Address of device";
151     }
152   }
153
154   grouping mapping {
155     list mapping {
156       key "logical-connection-point";
157       description
158         "Mapping for Physical circuit pack/port/parent interfaces corresponding
159          to each logical connection point present in the node.";
160       leaf logical-connection-point {
161         type string;
162       }
163       leaf supporting-circuit-pack-name {
164         type string;
165         description
166           "Circuit pack where the logical connection point is located";
167       }
168       leaf supporting-port {
169         type string;
170         description
171           "Port where the logical connection point is located";
172       }
173       leaf supporting-oms {
174         type string;
175         description
176           "OMS interface provisioned on the port";
177       }
178       leaf supporting-ots {
179         type string;
180         description
181           "OTS interface provisioned on the port";
182       }
183       leaf port-direction {
184         type string;
185         description
186           "Useful for line port of XPDR, for which there is no indication
187            in its logical-termination-point naming";
188       }
189       leaf port-qual {
190         type string;
191         description
192           "Useful to identify from portmapping client from network ports
193            of XPDR";
194       }
195       leaf port-admin-state {
196         type string;
197         description
198           "admin-state of port";
199       }
200       leaf port-oper-state {
201         type string;
202         description
203           "operational-state of port";
204       }
205       leaf supporting-ethernet {
206         type string;
207         description
208           "Ethernet interface provisioned on the port";
209       }
210       leaf supporting-otu4 {
211           type string;
212           description
213             "OTU4 interface provisioned on the port";
214         }
215       leaf supporting-otuc4 {
216           type string;
217           description
218             "OTUC4 interface provisioned on the port";
219         }
220       leaf supporting-odu4 {
221           type string;
222           description
223             "ODU4 interface provisioned on the port";
224         }
225       leaf supporting-oduc4 {
226         type string;
227         description
228           "ODUC4 interface provisioned on the port for B100G support";
229       }
230       leaf rate {
231         type string;
232         description
233           "Rate supported by the port";
234       }
235       leaf-list supported-interface-capability {
236         type identityref {
237           base org-openroadm-port-types:supported-if-capability;
238         }
239       }
240       uses mpdr-restrictions-grp;
241       leaf xponder-type {
242         type org-openroadm-device-types:xpdr-node-types;
243       }
244       leaf connection-map-lcp {
245         type string;
246         description
247           "For XPDR, associate two logical-connection-points from device/connnection-map
248            data";
249       }
250       leaf partner-lcp {
251         type string;
252         description
253           "For XPDR unidirectional NETWORK port, associate two logical-connection-points
254            from device/partner port data";
255       }
256       leaf lcp-hash-val {
257         type string;
258         description
259           "Hash value generated from node-id and lcp. This value will be used to map-
260            back SAPI and DAPI resource";
261       }
262     }
263   }
264
265   grouping mpdr-restrictions-grp {
266     container mpdr-restrictions {
267       when "../port-qual = 'switch-client' and ../../node-info/openroadm-version = '7.1'";
268       description
269         "This container provides the information about multiplexing of LO ODUs to HO ODUs
270         Caveat: If port advertizes multiple rates, this container does not work and results could
271         be wrong, meaning if the supported-interface-capabilities include, if-100GE-ODU4, if-OTU4-ODU4,
272         if-200GE-oduflexcbr, then min/max-trib-slot could be different";
273       leaf min-trib-slot {
274           type org-openroadm-otn-common-types:opucn-trib-slot-def;
275           description
276               "Minimum OPUCn 5G trib slots in the form of TS #A.B (G.709)";
277       }
278       leaf max-trib-slot {
279           type org-openroadm-otn-common-types:opucn-trib-slot-def;
280           description
281               "Maximum OPUCn 5G trib slots in the form of TS #A.B (G.709)";
282       }
283     }
284   }
285
286   grouping mc-capabilities {
287     list mc-capabilities {
288       key "mc-node-name";
289       description
290         "Capabilities of the media channel associated with a degree SRG, or
291         XPDR (7.1 and above). ";
292       leaf mc-node-name {
293         type string;
294         description
295           "Name of the node, it has the format of DEGi-TTP or SRGj-PP
296            Where i, and j are the degree and SRG numbers respectively.
297            For XPDR type it will have one element in the leaf-list,
298            with name XPDR-mcprofile";
299       }
300       leaf slot-width-granularity {
301         type org-openroadm-common-optical-channel-types:frequency-GHz;
302         default "50";
303         description
304           "Width of a slot measured in GHz.";
305      }
306       leaf center-freq-granularity {
307         type org-openroadm-common-optical-channel-types:frequency-GHz;
308         default "50";
309         description
310           "Width of a slot measured in GHz.";
311       }
312     }
313   }
314
315   grouping cp-to-degree {
316     list cp-to-degree {
317       key "circuit-pack-name";
318       description
319         "This mapping helps locate degree number of the circuitpack that
320          does lldp protocol management";
321       leaf circuit-pack-name {
322         type string;
323       }
324       leaf degree-number {
325         type uint32;
326       }
327       leaf interface-name {
328         type string;
329       }
330     }
331   }
332
333   grouping switching-pool-lcp {
334     list switching-pool-lcp {
335       key "switching-pool-number";
336       description
337         "For MUXPDR and SWITCH, associates from device/odu-switching-pools data,
338          the logical-connection-points";
339       leaf switching-pool-number {
340         type uint16;
341         description
342           "Unique identifier for this odu-switching-pool";
343       }
344       leaf switching-pool-type {
345         type org-openroadm-switching-pool-types:switching-pool-types;
346       }
347       list non-blocking-list {
348         key "nbl-number";
349         leaf nbl-number {
350           type uint16;
351           description
352             "Identifier for this non-blocking-list. Unique within odu-switching-pool";
353         }
354         leaf interconnect-bandwidth-unit {
355           type uint32;
356           description
357             "Switch fabric interconnect bandwidth unit rate in bits per second.
358              Represents granularity of switch fabric";
359         }
360         leaf interconnect-bandwidth {
361           type uint32;
362           description
363             "Total interconnect bandwidth for a non-blocking element expressed as
364              number of inter-connect-bandwidth units : corresponds to capable-
365              inter-connect bandwidth";
366         }
367         leaf available-interconnect-bandwidth {
368           type uint32;
369           description
370             "Total interconnect bandwidth available for a non-blocking element can use as
371              number of inter-connect-bandwidth units";
372         }
373         leaf-list lcp-list {
374           type string;
375         }
376       }
377     }
378   }
379
380   container network {
381     list nodes {
382       key "node-id";
383       leaf node-id {
384         type string;
385         description
386           "Unique identifier for node in the network";
387       }
388       container node-info {
389         uses node-info;
390       }
391       uses mapping;
392       uses mc-capabilities;
393       uses cp-to-degree;
394       uses switching-pool-lcp;
395     }
396   }
397 }