Merge "Fix bug when creating SRG termination points"
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-resource@2021-12-10.yang
1 module org-openroadm-resource {
2   namespace "http://org/openroadm/resource";
3   prefix org-openroadm-resource;
4
5   import org-openroadm-interfaces {
6     prefix org-openroadm-interfaces;
7     revision-date 2019-11-29;
8   }
9   import org-openroadm-otn-common-types {
10     prefix org-openroadm-otn-common-types;
11     revision-date 2021-09-24;
12   }
13   import org-openroadm-common-optical-channel-types {
14     prefix org-openroadm-common-optical-channel-types;
15     revision-date 2021-12-10;
16   }
17   import org-openroadm-resource-types {
18     prefix org-openroadm-resource-types;
19     revision-date 2021-09-24;
20   }
21   import org-openroadm-common-link-types {
22     prefix org-openroadm-common-link-types;
23     revision-date 2019-11-29;
24   }
25
26   organization
27     "Open ROADM MSA";
28   contact
29     "OpenROADM.org";
30   description
31     "YANG definitions of resources.
32
33       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
34       All other rights reserved.
35
36       Redistribution and use in source and binary forms, with or without modification,
37       are permitted provided that the following conditions are met:
38
39       * Redistributions of source code must retain the above copyright notice, this
40         list of conditions and the following disclaimer.
41       * Redistributions in binary form must reproduce the above copyright notice,
42         this list of conditions and the following disclaimer in the documentation and/or
43         other materials provided with the distribution.
44       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
45         contributors may be used to endorse or promote products derived from this software
46         without specific prior written permission.
47
48       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
49       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
51       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
52       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
53       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
54       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
55       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
56       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
57       POSSIBILITY OF SUCH DAMAGE";
58
59   revision 2021-12-10 {
60     description
61       "Version 10.1";
62   }
63   revision 2021-09-24 {
64     description
65       "Version 10.0";
66   }
67   revision 2021-05-28 {
68     description
69       "Version 9.1";
70   }
71   revision 2021-03-26 {
72     description
73       "Version 9.0";
74   }
75   revision 2020-09-25 {
76     description
77       "Version 8.0";
78   }
79   revision 2020-05-29 {
80     description
81       "Version 7.1.0";
82   }
83   revision 2020-03-27 {
84     description
85       "Version 7.0.0";
86   }
87   revision 2019-11-29 {
88     description
89       "Version 6.1.0";
90   }
91   revision 2019-09-27 {
92     description
93       "Version 6.0.0";
94   }
95   revision 2019-05-31 {
96     description
97       "Version 5.1.0";
98   }
99   revision 2019-03-29 {
100     description
101       "Version 5.0.0";
102   }
103   revision 2018-11-30 {
104     description
105       "Version 4.1.0";
106   }
107   revision 2018-09-28 {
108     description
109       "Version 4.0.0";
110   }
111   revision 2018-03-30 {
112     description
113       "Version 3.0.0";
114   }
115   revision 2017-12-15 {
116     description
117       "Version 2.2";
118   }
119   revision 2017-09-29 {
120     description
121       "Version 2.1";
122   }
123   revision 2017-07-28 {
124     description
125       "Version 2.0.1 - added revision-date to imports";
126   }
127   revision 2017-06-26 {
128     description
129       "Version 2.0";
130   }
131   revision 2016-10-14 {
132     description
133       "Version 1.2";
134   }
135
136   grouping eth-attributes {
137     leaf speed {
138       type uint32;
139       description
140         "Set speed of the interface, unit mbps.
141          This is for ETH facility. ";
142     }
143   }
144
145   grouping mc-ttp-attributes {
146     description
147       "Media channel termination point. Models bandwidth allocation in physical media. Network media channels may be provisioned in the spectrum characterized by the frequency limits.";
148     leaf min-freq {
149       type org-openroadm-common-optical-channel-types:frequency-THz;
150       config true;
151       description
152         "Minimum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
153     }
154     leaf max-freq {
155       type org-openroadm-common-optical-channel-types:frequency-THz;
156       config true;
157       description
158         "Maximum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
159     }
160   }
161
162   grouping nmc-ctp-attributes {
163     description
164       "Network Media Channel attributes";
165     leaf frequency {
166       type org-openroadm-common-optical-channel-types:frequency-THz;
167       config true;
168       description
169         "Center Frequency in THz.  This is not constrained by mc-capabilities.  It must fit (when combined with width) inside any containing media channel.";
170     }
171     leaf width {
172       type org-openroadm-common-optical-channel-types:frequency-GHz;
173       config true;
174       description
175         "Frequency width in GHz.  This is not constrained by mc-capabilities.  It must fit (when combined with frequency) inside any containing media channel.";
176     }
177   }
178
179   grouping common-och-otsi-attributes {
180     description
181       "Optical Channel and otsi common attributes";
182     leaf frequency {
183       type org-openroadm-common-optical-channel-types:frequency-THz;
184       description
185         "Center Frequency in THz.";
186     }
187     leaf width {
188       type org-openroadm-common-optical-channel-types:frequency-GHz;
189       description
190         "Frequency width in GHz.";
191     }
192     leaf optical-operational-mode {
193       type string;
194       description
195         "The path was calculated according to the supported operational modes.
196          Selected mode can be either a specific or an openROADM operational-mode";
197     }
198   }
199   
200   grouping path-computation-outputs {
201         description
202           "Parameters resulting of path computation";
203     leaf rx-estimated-osnr {
204       type org-openroadm-common-link-types:ratio-dB;
205       description
206         "estimated OSNR for the path";
207     }
208     leaf rx-estimated-gsnr {
209       type org-openroadm-common-link-types:ratio-dB;
210       description
211         "estimated Generalized SNR (including non linear impairments) for the path";
212     }
213     leaf max-output-power {
214       type org-openroadm-common-link-types:ratio-dB;
215       description
216         "maximum output-power";
217     }
218     leaf min-output-power {
219       type org-openroadm-common-link-types:ratio-dB;
220       description
221         "minimum output-power";
222     }
223   }
224
225   grouping och-attributes {
226     description
227       "Optical Channel attributes";
228     leaf rate {
229       type identityref {
230         base org-openroadm-common-optical-channel-types:och-rate-identity;
231       }
232       description
233         "rate";
234     }
235     leaf modulation-format {
236       type org-openroadm-common-optical-channel-types:modulation-format;
237       description
238         "Modulation format";
239     }
240     uses common-och-otsi-attributes;
241   }
242
243   grouping odu-attributes {
244     description
245       "ODU attributes";
246     leaf rate {
247       type identityref {
248         base org-openroadm-otn-common-types:odu-rate-identity;
249       }
250       description
251         "rate identity of the ODU. 'identityref' is used
252          to allow to extend for future higher rates";
253     }
254     leaf oducn-n-rate {
255       when "../rate = 'org-openroadm-otn-common-types:ODUCn'";
256       type uint16;
257       description
258         "ODUCn rate";
259     }
260     leaf oduflex-cbr-service {
261       type identityref {
262         base org-openroadm-otn-common-types:ODUflex-cbr-identity;
263       }
264       description
265         "ODUflex for CBR client signals (G.709)";
266     }
267     leaf oduflex-gfp-num-ts {
268       type uint16;
269       description
270         "For ODUflex GFP-F mapped client signals (G.709), the number of
271          tributary slot as per G.709 Table 7-8";
272     }
273     leaf oduflex-gfp-ts-bandwidth {
274       type uint16;
275       description
276         "The tributary slot minimum bit rates in the approximated value [Mbps]
277          given ODUflex (GFP) 100 ppm (G.709 Table 7-8) :
278            1249 Mbps [1 249 052.312 277 kbps] (n = 1 to 8) (ODU2.ts)
279            1254 Mbps [1 254 344.906 9646 kbps] (n = 9 to 32) ODU3.ts)
280            1301 Mbps [1 301 336.986 2867 kbps] (n = 33 to 80) (ODU4.ts)";
281     }
282     leaf oduflex-imp-s {
283       type uint16;
284       description
285         "For ODUflex IMP (Idle insertion Mapping Procedure) mapped client signals,
286          s = 2, 8, n x 5 with N >= 1 (G.709 12.2.6 & Table 7-3)";
287     }
288     leaf oduflex-flexe-n {
289       type uint16;
290       description
291         "For ODUflex for FlexE-aware client signals, n in the range of 1 to 20*254
292          (G.709 17.12)";
293     }
294     container parent-odu-allocation {
295       description
296         "parent odu allocation";
297       leaf trib-port-number {
298         type uint16 {
299           range "1 .. 80";
300         }
301         description
302           "Assigned tributary port number in parent OPU";
303       }
304       choice trib-slots-choice {
305         description
306           "trib slot selection";
307         case opu {
308           leaf-list trib-slots {
309             type uint16 {
310               range "1 .. 80";
311             }
312             min-elements 1;
313             max-elements 80;
314             description
315               "Assigned trib slots occupied in parent OPU MSI";
316           }
317         }
318         case opucn {
319           leaf-list opucn-trib-slots {
320             type org-openroadm-otn-common-types:opucn-trib-slot-def;
321             description
322               "Specify the list of OPUCn 5G tributary slots in the form of
323                TS #A.B (G.709 Figure 20-9) in the case of provisioning the low
324                 order ODUk to the parent server ODUCn";
325           }
326         }
327       }
328     }
329   }
330
331   grouping otu-attributes {
332     description
333       "OTU attributes";
334     leaf rate {
335       type identityref {
336         base org-openroadm-otn-common-types:otu-rate-identity;
337       }
338       description
339         "rate identity of the OTU. 'identityref' is used
340          to allow to extend for future higher rates";
341     }
342     leaf otu4-member-id {
343       when "../rate = 'org-openroadm-otn-common-types:OTU4'";
344       type uint16;
345       description
346         "To uniquely identify each member of an OTSi group and the order of each member in the group.
347          Similar to FlexO PHY-ID in the FlexO Group (PID in G.709.1/3)";
348     }
349     leaf otucn-n-rate {
350       when "../rate = 'org-openroadm-otn-common-types:OTUCn'";
351       type uint16;
352       description
353         "Specify the N associated with OTUCn, e.g. N = 2,3,4 for 200G/300G/400G respectively";
354     }
355     leaf otucn-M-subrate {
356       when "../rate = 'org-openroadm-otn-common-types:OTUCn'";
357       type uint16;
358       description
359         "OTUCn subrate (OTUCn-M), value of M specifies the number of active
360          5 Gbit/s OPUCn tributary slots (G.709 Annex H)";
361     }
362   }
363
364   grouping otsi-attributes {
365     description
366       "Optical Channel attributes";
367     leaf otsi-rate {
368       type identityref {
369         base org-openroadm-common-optical-channel-types:otsi-rate-identity;
370       }
371       description
372         "OTSi rate";
373     }
374     leaf modulation-format {
375       type org-openroadm-common-optical-channel-types:modulation-format;
376       description
377         "Modulation format";
378     }
379     uses common-och-otsi-attributes;
380   }
381
382   grouping otsi-group-attributes {
383     description
384       "Optical Channel attributes";
385     leaf group-rate {
386       type identityref {
387         base org-openroadm-common-optical-channel-types:otsi-rate-identity;
388       }
389       description
390         "Supported group rate";
391     }
392     leaf group-id {
393       type uint32;
394       description
395         "Mandatory for FlexO B100G.  Not required for Non-FlexO B100G.";
396     }
397   }
398
399   grouping resource-reporting {
400     leaf type {
401       type identityref {
402         base org-openroadm-interfaces:interface-type;
403       }
404       mandatory true;
405       description
406         "The type of the interface.";
407     }
408     container ethernet {
409       when "../type = 'ethernetCsmacd'";
410       description
411         "Ethernet Interfaces";
412       uses eth-attributes;
413     }
414     container mc-ttp {
415       when "../type = 'mediaChannelTrailTerminationPoint'";
416       description
417         "Media Channel Trail Termination Point (MC-TTP)";
418       uses mc-ttp-attributes;
419     }
420     container nmc-ctp {
421       when "../type = 'networkMediaChannelConnectionTerminationPoint'";
422       description
423         "Network Media Channel Connection Termination Point (NMC-CTP)";
424       uses nmc-ctp-attributes;
425     }
426     container och {
427       when "../type = 'opticalChannel'";
428       description
429         "Optical Channel (OCh):
430          Models the optical channel interfaces for an Optical White Box.";
431       uses och-attributes;
432     }
433     container odu {
434       when "../type = 'otnOdu'";
435       presence "Attribute Nodes for Optical Data Unit (ODU)";
436       description
437         "Optical Channel Data Unit (ODU)";
438       uses odu-attributes;
439     }
440     container otu {
441       when "../type = 'otnOtu'";
442       description
443         "Optical Channel Transport Unit (OTU)";
444       uses otu-attributes;
445     }
446     container otsi {
447       when "../type = 'otsi'";
448       description
449         "OTSI";
450       uses otsi-attributes;
451     }
452     container otsi-group {
453       when "../type = 'otsi-group'";
454       description
455         "OTSI-Group";
456       uses otsi-group-attributes;
457     }
458   }
459
460   grouping resource {
461     description
462       "This resource identifier is intended to provide a generic identifier
463        for any resource that can be used without specific knowledge of
464        the resource.";
465     container device {
466       description
467         "Device of the resource, used only when the system using this
468          model report on more than one device. ";
469       uses org-openroadm-resource-types:device-id;
470     }
471     container resource {
472       choice resource {
473         case circuit-pack {
474           uses org-openroadm-resource-types:circuit-pack-name;
475         }
476         case port {
477           container port {
478             uses org-openroadm-resource-types:port-name;
479           }
480         }
481         case connection {
482           uses org-openroadm-resource-types:connection-name {
483             refine "connection-name" {
484               mandatory true;
485             }
486           }
487         }
488         case physical-link {
489           uses org-openroadm-resource-types:physical-link-name;
490         }
491         case internal-link {
492           uses org-openroadm-resource-types:internal-link-name;
493         }
494         case shelf {
495           uses org-openroadm-resource-types:shelf-name;
496         }
497         case srg {
498           uses org-openroadm-resource-types:srg-number {
499             refine "srg-number" {
500               mandatory true;
501             }
502           }
503         }
504         case degree {
505           uses org-openroadm-resource-types:degree-number {
506             refine "degree-number" {
507               mandatory true;
508             }
509           }
510         }
511         case service {
512           uses org-openroadm-resource-types:service-name;
513         }
514         case interface {
515           uses org-openroadm-resource-types:interface-name;
516         }
517         case odu-sncp-pg {
518           uses org-openroadm-resource-types:odu-sncp-pg-name;
519         }
520         case client-sncp-pg {
521           uses org-openroadm-resource-types:client-sncp-pg-name;
522         }
523         case other {
524           uses org-openroadm-resource-types:other-resource-id;
525         }
526         case device {
527           uses org-openroadm-resource-types:device-id {
528             refine "node-id" {
529               mandatory true;
530             }
531           }
532         }
533         case line-amplifier {
534           uses org-openroadm-resource-types:amp-number;
535         }
536         case xponder {
537           uses org-openroadm-resource-types:xpdr-number;
538         }
539         case versioned-service {
540           uses org-openroadm-resource-types:versioned-service-name;
541         }
542         case temp-service {
543           uses org-openroadm-resource-types:temp-service-name;
544         }
545       }
546     }
547     container resourceType {
548       uses org-openroadm-resource-types:resource-type;
549     }
550   }
551 }