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