Merge "Refactor ConvertORTopoToTapiTopoTest"
[transportpce.git] / api / src / main / yang / gnpy-eqpt-config@2022-02-21.yang
1 module gnpy-eqpt-config {
2   yang-version 1;
3   namespace "gnpy:gnpy-eqpt-config";
4
5   prefix "gnpyeqpt";
6
7   organization
8     "Telecom Infra Project OOPT PSE
9      Working Group";
10
11   contact
12     "WG Web:   <https://github.com/Telecominfraproject/oopt-gnpy>
13      contact:  <mailto:ahmed.triki@orange.com>
14      contact:  <mailto:esther.lerouzic@orange.com>
15    ";
16
17   description
18     "Base YANG model for gnpy equipment library input -
19     The license used for all the yang files of GNPy is BSD 3-Clause License
20
21     BSD 3-Clause License
22
23     Copyright (c) 2018, Telecom Infra Project
24     All rights reserved.
25
26     Redistribution and use in source and binary forms, with or without
27     modification, are permitted provided that the following conditions are met:
28
29     * Redistributions of source code must retain the above copyright notice, this
30       list of conditions and the following disclaimer.
31
32     * Redistributions in binary form must reproduce the above copyright notice,
33       this list of conditions and the following disclaimer in the documentation
34       and/or other materials provided with the distribution.
35
36     * Neither the name of the copyright holder nor the names of its
37       contributors may be used to endorse or promote products derived from
38       this software without specific prior written permission.
39
40     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
41     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
43     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
44     FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45     DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
46     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
47     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
48     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
49     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
50
51   revision 2022-02-21 {
52     description
53       "draft for GNPy4TPCE preversion - non official version relevant for v2.4 GNPy file format";
54     reference
55       "YANG model for api input for path computation with gnpy";
56   }
57
58   revision 2020-10-22 {
59     description "draft for experimental/2020-candi";
60     reference "Base YANG model for equipment library input for path computation with gnpy";
61   }
62
63   revision 2019-01-03 {
64     description
65       "first draft for GNPy4TPCE preversion - non official version relevant for v1.2 GNPy file format";
66     reference
67       "YANG model for api input for path computation with gnpy";
68   }
69
70   identity edfa-type-def {
71     description "base identity for variable gain and fixed gain";
72   }
73
74   identity variable-gain{
75     base edfa-type-def ;
76     description "'variable_gain' is a simplified model simulating a 2-coil
77       EDFA with internal, input and output VOAs. The NF vs gain response is calculated
78       accordingly based on the input parameters: nf_min, nf_max, and gain_flatmax. It
79       is not a simple interpolation but a 2-stage NF calculation.";
80   }
81
82   identity fixed-gain{
83     base edfa-type-def ;
84     description "'fixed_gain' is a fixed gain model. NF == Cte == nf0 if gain_min < gain < gain_flatmax";
85   }
86
87   identity fiber-variety {
88     description "base identity for fiber variety";
89   }
90
91   identity transceiver-variety {
92     description "base identity for transceiver variety";
93   }
94
95
96   grouping variable-gain {
97     leaf nf_min {
98       type decimal64 {
99         fraction-digits 2;
100       }
101       units dB;
102     }
103     leaf nf_max {
104       type decimal64 {
105         fraction-digits 2;
106       }
107       units dB;
108     }
109     leaf out_voa_auto{
110       type boolean ;
111       description "auto_design feature to optimize the amplifier output VOA. If true, output VOA is present
112       and will be used to push amplifier gain to its maximum, within EOL power margins.";
113     }
114   }
115
116   grouping fixed-gain{
117     leaf nf0 {
118       type decimal64 {
119         fraction-digits 2;
120       }
121       units dB;
122     }
123   }
124
125   grouping no-type-def{
126     leaf advanced_config_from_json {
127       type string ;
128       description " filename with json edfa";
129
130     }
131   }
132
133
134   grouping openroadm{
135     leaf-list nf_coef {
136       type decimal64 {
137         fraction-digits 5;
138       }
139       //default [8.1e-4,6.142e-2,1.558,19.97] ;
140     }
141   }
142
143   grouping dual-stage {
144     leaf raman {
145       type boolean;
146     }
147     leaf preamp_variety {
148       type leafref {
149           path "../../Edfa/type_variety";
150         }
151     }
152     leaf booster_variety {
153       type leafref {
154           path "../../Edfa/type_variety";
155         }
156     }
157   }
158
159   grouping edfa-common {
160     leaf allowed_for_design{
161       type boolean ;
162       description "If false, the amplifier will not be picked by auto-design but it can still be used as a
163       manual input (from JSON or Excel template topology files.)";
164     }
165     leaf gain_flatmax {
166       type decimal64 {
167         fraction-digits 2;
168       }
169       units dB;
170     }
171     leaf gain_min {
172       type decimal64 {
173         fraction-digits 2;
174       }
175       units dB;
176     }
177     leaf p_max {
178       type decimal64 {
179         fraction-digits 2;
180       }
181       units dBm;
182     }
183     leaf type_def {
184       type identityref{
185         base edfa-type-def ;
186       }
187     }
188     choice type_of_model {
189       case variable-gain {
190         when "type_def = 'variable-gain'";
191         uses variable-gain ;
192       }
193       case fixed-gain{
194         when "type_def = 'fixed-gain'";
195         uses fixed-gain;
196       }
197       case no-type-def{
198         when "type_def = 'no-type-def'";
199         uses no-type-def;
200       }
201       case openroadm{
202         when "type_def = 'openroadm'";
203         uses openroadm;
204       }
205       case dual_stage {
206         when "type_def = 'dual_stage'";
207         uses dual-stage ;
208       }
209     }
210   }
211
212   grouping common-fiber {
213     description "common parameters for fiber and raman fiber";
214     leaf type_variety {
215       type string ;
216       }
217     leaf dispersion{
218       type decimal64 {
219         fraction-digits 8;
220       }
221       units s.m-1.m-1;
222     }
223     leaf gamma{
224       type decimal64 {
225         fraction-digits 8;
226       }
227       units w-1.m-1 ;
228       description "2pi.n2/(lambda*Aeff) (w-2.m-1)";
229     }
230     leaf pmd_coef{
231       type decimal64 {
232         fraction-digits 16;
233       }
234       units s.sqrt(m)-1;
235     }
236   }
237
238   grouping eqpt{
239     list Edfa {
240       key type_variety;
241       leaf type_variety {
242         type string;
243         description "a unique name to ID the amplifier in the JSON/Excel template topology input file";
244       }
245       uses edfa-common;
246     }
247
248     list Fiber {
249       key type_variety;
250       uses common-fiber;
251     }
252
253     list RamanFiber {
254       uses common-fiber;
255       container raman_efficiency {
256         leaf-list cr {
257           type decimal64 {
258             fraction-digits 8;
259           }
260         }
261         leaf-list frequency_offset {
262           type decimal64 {
263             fraction-digits 8;
264           }
265         }
266       }
267     }
268
269     list Span {
270       leaf power_mode {
271         type boolean ;
272       }
273       leaf-list delta_power_range_db {
274         type decimal64 {
275           fraction-digits 2;
276         }
277       }
278       leaf max_length {
279         type decimal64 {
280           fraction-digits 2;
281         }
282         units km;
283         default 150.0 ;
284       }
285       leaf max_loss {
286         type decimal64 {
287           fraction-digits 2;
288         }
289         units dB;
290       }
291       leaf max_fiber_lineic_loss_for_raman {
292         type decimal64 {
293           fraction-digits 2;
294         }
295         units dB.km-1;
296       }
297       leaf target_extended_gain {
298         type decimal64 {
299           fraction-digits 2;
300         }
301         units dB;
302       }
303       leaf length_units{
304         type string ;
305         default "km";
306       }
307       leaf padding{
308         type decimal64 {
309           fraction-digits 2;
310         }
311         default 10.0 ;
312       }
313       leaf EOL{
314          type decimal64 {
315           fraction-digits 2;
316         }
317         default 0.0 ;
318       }
319       leaf con_in{
320         type decimal64 {
321           fraction-digits 2;
322         }
323         default 0.0 ;
324       }
325       leaf con_out{
326         type decimal64 {
327           fraction-digits 2;
328         }
329         default 0.0 ;
330       }
331     }
332
333     list Roadm {
334       leaf target_pch_out_db {
335         type decimal64 {
336           fraction-digits 2;
337         }
338       }
339       leaf add_drop_osnr {
340         type decimal64 {
341           fraction-digits 2;
342         }
343       }
344       leaf pmd {
345         type decimal64 {
346           fraction-digits 2;
347         }
348       }
349       container restrictions {
350         leaf-list preamp_variety_list {
351           type string;
352         }
353         leaf-list booster_variety_list {
354           type string;
355         }
356       }
357     }
358
359     list SI {
360       leaf f_min {
361         type decimal64 {
362           fraction-digits 2;
363         }
364       }
365       leaf f_max {
366         type decimal64 {
367           fraction-digits 2;
368         }
369       }
370       leaf baud_rate {
371         type decimal64 {
372           fraction-digits 2;
373         }
374       }
375       leaf spacing {
376         type decimal64 {
377           fraction-digits 2;
378         }
379       }
380       leaf power_dbm {
381         type decimal64 {
382           fraction-digits 2;
383         }
384       }
385       leaf-list power_range_db {
386         type decimal64 {
387           fraction-digits 2;
388         }
389       }
390       leaf roll_off {
391         type decimal64 {
392           fraction-digits 2;
393         }
394       }
395       leaf tx_osnr {
396         type decimal64 {
397           fraction-digits 2;
398         }
399       }
400       leaf sys_margins {
401         type decimal64 {
402           fraction-digits 2;
403         }
404       }
405     }
406
407     list Transceiver {
408       leaf type_variety {
409         type string ;
410         description "a unique name to ID the transceiver in the JSON or Excel template topology input file";
411       }
412       container frequency {
413         leaf min {
414           type decimal64 {
415               fraction-digits 2;
416             }
417           units Hz ;
418         }
419         leaf max {
420           type decimal64 {
421               fraction-digits 2;
422             }
423           units Hz ;
424         }
425         description "Min/max frequency of transponder eg 191.35e12  and 196.1e12";
426       }
427       list mode {
428         leaf format {
429           type string ;
430           description "unique name of the mode";
431         }
432         leaf baud_rate {
433           type decimal64 {
434               fraction-digits 2;
435             }
436           units baud ;
437           description "baud_rate";
438         }
439         leaf OSNR {
440           type decimal64 {
441               fraction-digits 2;
442             }
443           units dB ;
444           description "min required OSNR in 0.1nm (dB)";
445         }
446         leaf tx_osnr {
447           type decimal64 {
448               fraction-digits 2;
449             }
450           units dB ;
451           description "min required OSNR in 0.1nm (dB)";
452         }
453         leaf min_spacing {
454           type decimal64 {
455               fraction-digits 2;
456             }
457           units GHz ;
458           description "...";
459         }
460         leaf bit_rate {
461           type decimal64 {
462               fraction-digits 2;
463             }
464           units bit/s ;
465           description "bit rate";
466         }
467         leaf roll_off {
468           type decimal64 {
469               fraction-digits 2;
470             }
471           description "...";
472         }
473         leaf cost {
474           type decimal64 {
475               fraction-digits 2;
476             }
477           description "arbitrary unit";
478         }
479       }
480     }
481   }
482 }
483