gnpy-api 0.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. gnpy_api-0.0.0.dist-info/METADATA +78 -0
  2. gnpy_api-0.0.0.dist-info/RECORD +40 -0
  3. gnpy_api-0.0.0.dist-info/WHEEL +5 -0
  4. gnpy_api-0.0.0.dist-info/licenses/AUTHORS +1 -0
  5. gnpy_api-0.0.0.dist-info/licenses/LICENSE +28 -0
  6. gnpy_api-0.0.0.dist-info/pbr.json +1 -0
  7. gnpy_api-0.0.0.dist-info/top_level.txt +1 -0
  8. gnpyapi/__init__.py +0 -0
  9. gnpyapi/core/__init__.py +12 -0
  10. gnpyapi/core/exception/__init__.py +1 -0
  11. gnpyapi/core/exception/config_error.py +14 -0
  12. gnpyapi/core/exception/equipment_error.py +14 -0
  13. gnpyapi/core/exception/exception_handler.py +34 -0
  14. gnpyapi/core/exception/path_computation_error.py +14 -0
  15. gnpyapi/core/exception/topology_error.py +13 -0
  16. gnpyapi/core/model/__init__.py +1 -0
  17. gnpyapi/core/model/error.py +17 -0
  18. gnpyapi/core/model/result.py +8 -0
  19. gnpyapi/core/route/__init__.py +1 -0
  20. gnpyapi/core/route/path_request_route.py +28 -0
  21. gnpyapi/core/route/status_route.py +8 -0
  22. gnpyapi/core/service/__init__.py +1 -0
  23. gnpyapi/core/service/config_service.py +4 -0
  24. gnpyapi/core/service/equipment_service.py +5 -0
  25. gnpyapi/core/service/path_request_service.py +36 -0
  26. gnpyapi/core/service/topology_service.py +5 -0
  27. gnpyapi/exampledata/planning_demand_example.json +1578 -0
  28. gnpyapi/tools/__init__.py +0 -0
  29. gnpyapi/yang/gnpy-api@2021-01-06.yang +81 -0
  30. gnpyapi/yang/gnpy-eqpt-config@2020-10-22.yang +442 -0
  31. gnpyapi/yang/gnpy-eqpt-config@2025-01-20.yang +770 -0
  32. gnpyapi/yang/gnpy-network-topology@2020-10-22.yang +300 -0
  33. gnpyapi/yang/gnpy-network-topology@2025-01-20.yang +594 -0
  34. gnpyapi/yang/gnpy-path-computation-simplified@2020-10-22.yang +559 -0
  35. gnpyapi/yang/gnpy-path-computation@2025-01-21.yang +632 -0
  36. gnpyapi/yang/ietf-layer0-types@2024-03-04.yang +2247 -0
  37. gnpyapi/yang/ietf-optical-impairment-topology@2024-05-21.yang +1776 -0
  38. gnpyapi/yang/ietf-routing-types@2017-12-04.yang +771 -0
  39. gnpyapi/yang/ietf-te-topology@2020-08-06.yang +1952 -0
  40. gnpyapi/yang/ietf-te-types@2022-10-21.yang +3458 -0
@@ -0,0 +1,594 @@
1
+ module gnpy-network-topology {
2
+ yang-version 1.1;
3
+ namespace "gnpy:gnpy-network-topology";
4
+ prefix gnpynt;
5
+
6
+ organization
7
+ "Telecom Infra Project OOPT PSE Working Group";
8
+ contact
9
+ "WG Web: <https://github.com/Telecominfraproject/oopt-gnpy>
10
+ contact: <mailto:ahmed.triki@orange.com>
11
+ contact: <mailto:esther.lerouzic@orange.com>
12
+ ";
13
+ description
14
+ "YANG model for gnpy network input for path computation - 2020 - candi preversion";
15
+
16
+ revision 2025-01-20 {
17
+ description
18
+ "Add RamanFiber, design bands, impairments";
19
+ reference
20
+ "YANG model for network input for path computation with gnpy";
21
+ }
22
+
23
+ revision 2024-02-21 {
24
+ description
25
+ "fix namespaces for identity-ref,
26
+ add roadm impairment";
27
+ reference
28
+ "YANG model for network input for path computation with gnpy";
29
+ }
30
+ revision 2023-02-01 {
31
+ description
32
+ "change per-degree roadm targets
33
+ set 6 digits for fiber length
34
+ set 6 digits for loss_coef
35
+ add type empty for con_in and con_out";
36
+ reference
37
+ "YANG model for network input for path computation with gnpy";
38
+ }
39
+ revision 2022-11-21 {
40
+ description
41
+ "draft for detecon - GNPy API";
42
+ reference
43
+ "YANG model for network input for path computation with gnpy";
44
+ }
45
+ revision 2020-10-22 {
46
+ description
47
+ "draft for experimental/2020-candi";
48
+ reference
49
+ "YANG model for network input for path computation with gnpy";
50
+ }
51
+
52
+ identity type-element {
53
+ description
54
+ "Base identity for element type";
55
+ }
56
+
57
+ identity Transceiver {
58
+ base type-element;
59
+ description
60
+ " Transceiver element";
61
+ }
62
+
63
+ identity Fiber {
64
+ base type-element;
65
+ description
66
+ "Fiber element (unidirectional)";
67
+ }
68
+
69
+ identity RamanFiber {
70
+ base type-element;
71
+ description
72
+ "RamanFiber element (unidirectional)";
73
+ }
74
+
75
+ identity Roadm {
76
+ base type-element;
77
+ description
78
+ "Roadm element";
79
+ }
80
+
81
+ identity Edfa {
82
+ base type-element;
83
+ description
84
+ "Edfa element";
85
+ }
86
+
87
+ identity Fused {
88
+ base type-element;
89
+ description
90
+ "Fused element ; non amplified connection between two fiber spans ;
91
+ can be used to model optical distribution frame, or losses due to
92
+ connectors or fused in a span";
93
+ }
94
+
95
+ identity Multiband_amplifier {
96
+ base type-element;
97
+ description
98
+ "Multiband_amplifier element";
99
+ }
100
+
101
+ identity length-unit {
102
+ description
103
+ "length unit";
104
+ }
105
+
106
+ identity km {
107
+ base length-unit;
108
+ description
109
+ "kilometers";
110
+ }
111
+
112
+ identity m {
113
+ base length-unit;
114
+ description
115
+ "meter";
116
+ }
117
+
118
+ typedef Coordinate {
119
+ type decimal64 {
120
+ fraction-digits 6;
121
+ }
122
+ }
123
+
124
+ identity pumping-direction {
125
+ description
126
+ "Raman pumping direction";
127
+ }
128
+
129
+ identity coprop {
130
+ base pumping-direction;
131
+ description
132
+ "forward pumping";
133
+ }
134
+
135
+ identity counterprop {
136
+ base pumping-direction;
137
+ description
138
+ "backward pumping";
139
+ }
140
+
141
+ typedef Coef {
142
+ type decimal64 {
143
+ fraction-digits 2;
144
+ }
145
+ }
146
+
147
+
148
+ grouping location-attributes {
149
+ container location {
150
+ leaf city {
151
+ type union {
152
+ type string;
153
+ type empty;
154
+ }
155
+ mandatory false;
156
+ }
157
+ leaf region {
158
+ type union {
159
+ type string;
160
+ type empty;
161
+ }
162
+ mandatory false;
163
+ }
164
+ leaf latitude {
165
+ type Coordinate;
166
+ mandatory false;
167
+ }
168
+ leaf longitude {
169
+ type Coordinate;
170
+ mandatory false;
171
+ }
172
+ }
173
+ }
174
+
175
+ grouping frequency_band {
176
+ description
177
+ "Used for amplifiers, for design band";
178
+ leaf f_min {
179
+ type decimal64 {
180
+ fraction-digits 1;
181
+ }
182
+ units "Hz";
183
+ }
184
+ leaf f_max {
185
+ type decimal64 {
186
+ fraction-digits 1;
187
+ }
188
+ units "Hz";
189
+ }
190
+ }
191
+
192
+ grouping fiber-common-params {
193
+ description
194
+ "Common attributes to fiber and raman fiber";
195
+ leaf length {
196
+ type decimal64 {
197
+ fraction-digits 6;
198
+ }
199
+ mandatory true;
200
+ }
201
+ leaf loss_coef {
202
+ type decimal64 {
203
+ fraction-digits 6;
204
+ }
205
+ mandatory true;
206
+ units db/km;
207
+ description "Loss coefficient of the fiber span (dB/km)";
208
+ }
209
+ /* case when loss_coef is a vector
210
+ list loss_coef {
211
+ leaf-list frequency {
212
+ type decimal64 {
213
+ fraction-digits 1;
214
+ }
215
+ units "Hz";
216
+ }
217
+ leaf-list value {
218
+ type decimal64 {
219
+ fraction-digits 6;
220
+ }
221
+ units "dB/km";
222
+ }
223
+ }
224
+ */
225
+ leaf length_units {
226
+ type identityref {
227
+ base length-unit;
228
+ }
229
+ mandatory true;
230
+ }
231
+ leaf att_in {
232
+ type decimal64 {
233
+ fraction-digits 2;
234
+ }
235
+ units "dB";
236
+ }
237
+ leaf con_in {
238
+ type union {
239
+ type decimal64 {
240
+ fraction-digits 2;
241
+ }
242
+ type empty;
243
+ }
244
+ units "dB";
245
+ }
246
+ leaf con_out {
247
+ type union {
248
+ type decimal64 {
249
+ fraction-digits 2;
250
+ }
251
+ type empty;
252
+ }
253
+ units "dB";
254
+ }
255
+ }
256
+
257
+ grouping raman-fiber-operational {
258
+ leaf temperature {
259
+ type decimal64 {
260
+ fraction-digits 2;
261
+ }
262
+ }
263
+ list raman_pumps {
264
+ key "frequency";
265
+ leaf power {
266
+ type decimal64 {
267
+ fraction-digits 9;
268
+ }
269
+ }
270
+ leaf frequency {
271
+ type decimal64 {
272
+ fraction-digits 2;
273
+ }
274
+ }
275
+ leaf propagation_direction {
276
+ type identityref {
277
+ base pumping-direction;
278
+ }
279
+ }
280
+ }
281
+ }
282
+
283
+ grouping edfa-params {
284
+ leaf gain_target {
285
+ type union {
286
+ type decimal64 {
287
+ fraction-digits 6;
288
+ }
289
+ type empty;
290
+ }
291
+ units "dB";
292
+ description
293
+ "gain target of the amplifier (before VOA and after att_in)";
294
+ }
295
+ leaf tilt_target {
296
+ type union {
297
+ type decimal64 {
298
+ fraction-digits 6;
299
+ }
300
+ type empty;
301
+ }
302
+ description
303
+ "..";
304
+ }
305
+ leaf out_voa {
306
+ type union {
307
+ type decimal64 {
308
+ fraction-digits 2;
309
+ }
310
+ type empty;
311
+ }
312
+ units "dB";
313
+ description
314
+ "..";
315
+ }
316
+ leaf in_voa {
317
+ type union {
318
+ type decimal64 {
319
+ fraction-digits 2;
320
+ }
321
+ type empty;
322
+ }
323
+ units "dB";
324
+ description
325
+ "..";
326
+ }
327
+ leaf delta_p {
328
+ type union {
329
+ type decimal64 {
330
+ fraction-digits 6;
331
+ }
332
+ type empty;
333
+ }
334
+ units "dB";
335
+ description
336
+ "per channel target output power delta with respect to power setting in SI";
337
+ }
338
+ }
339
+
340
+ grouping multiband-params{
341
+ list amplifiers {
342
+ key "type_variety";
343
+ leaf type_variety {
344
+ type string;
345
+ }
346
+ container operational {
347
+ description
348
+ "Operational values for the Edfa ";
349
+ uses edfa-params;
350
+ uses frequency_band;
351
+ }
352
+ }
353
+ }
354
+
355
+ grouping roadm-trx-params {
356
+ list design_bands {
357
+ key "f_min";
358
+ uses frequency_band;
359
+ }
360
+ list per_degree_design_bands {
361
+ key "degree_uid";
362
+ leaf degree_uid {
363
+ type leafref {
364
+ path "../../../../elements/uid";
365
+ }
366
+ }
367
+ list per_degree_design_band {
368
+ key "f_min";
369
+ uses frequency_band;
370
+ }
371
+ }
372
+ }
373
+
374
+ grouping roadm-params {
375
+ choice target_type {
376
+ case constant_power {
377
+ leaf target_pch_out_db {
378
+ type decimal64 {
379
+ fraction-digits 2;
380
+ }
381
+ units "dBm";
382
+ description
383
+ "Target power applied on all channels out of all degrees of the ROADM";
384
+ }
385
+ }
386
+ case constant_psd {
387
+ leaf target_psd_out_mWperGHz {
388
+ type decimal64 {
389
+ fraction-digits 10;
390
+ }
391
+ units "mW/GHz";
392
+ description
393
+ "Target power spectral density applied on all channels out of all degrees of the ROADM.
394
+ target power is computed for each channel using this value multiplied by the baud_rate of
395
+ each channel in Ghz. eg target power = 0.0003125 * 32Gbauds = 0.01 mw ie -20 dBm";
396
+ }
397
+ }
398
+ case constant_psw {
399
+ leaf target_out_mWperSlotWidth {
400
+ type decimal64 {
401
+ fraction-digits 10;
402
+ }
403
+ units "mW/GHz";
404
+ description
405
+ "Target power spectral density applied on all channels out of all degrees of the ROADM.
406
+ target power is computed for each channel using this value multiplied by the slot width of
407
+ each channel in Ghz. eg target power = 0.0002 * 50GHz = 0.01 mw ie -20 dBm";
408
+ }
409
+ }
410
+ }
411
+ container restrictions {
412
+ leaf-list preamp_variety_list {
413
+ type string;
414
+ description
415
+ "List of authorized preamp type-variety";
416
+ }
417
+ leaf-list booster_variety_list {
418
+ type string;
419
+ description
420
+ "List of authorized booster type-variety";
421
+ }
422
+ }
423
+ list per_degree_power_targets {
424
+ key "degree_uid";
425
+ leaf degree_uid {
426
+ type leafref {
427
+ path "../../../../elements/uid";
428
+ }
429
+ }
430
+ choice per_degree_target_type {
431
+ case constant_power {
432
+ leaf per_degree_pch_out_db {
433
+ type decimal64 {
434
+ fraction-digits 2;
435
+ }
436
+ units "dBm";
437
+ description
438
+ "Equalization applied on all channels on this degree.
439
+ This target replaces the one defined for all degrees";
440
+ }
441
+ }
442
+ case constant_psd {
443
+ leaf per_degree_psd_out_mWperGHz {
444
+ type decimal64 {
445
+ fraction-digits 10;
446
+ }
447
+ units "mW/GHz";
448
+ description
449
+ "Equalization applied on all channels on this degree.
450
+ This target replaces the one defined for all degrees";
451
+ }
452
+ }
453
+ case constant_psw {
454
+ leaf per_degree_psd_out_mWperSlotWidth {
455
+ type decimal64 {
456
+ fraction-digits 10;
457
+ }
458
+ units "mW/GHz";
459
+ description
460
+ "Equalization applied on all channels on this degree.
461
+ This target replaces the one defined for all degrees";
462
+ }
463
+ }
464
+ }
465
+ }
466
+ list per_degree_impairments {
467
+ key "from_degree to_degree";
468
+ leaf from_degree {
469
+ type leafref {
470
+ path "../../../../elements/uid";
471
+ }
472
+ }
473
+ leaf to_degree {
474
+ type leafref {
475
+ path "../../../../elements/uid";
476
+ }
477
+ }
478
+ leaf impairment_id {
479
+ type uint32;
480
+ }
481
+ }
482
+ }
483
+
484
+ grouping transceiver-params;
485
+
486
+ grouping fused-params{
487
+ leaf loss {
488
+ type union {
489
+ type decimal64 {
490
+ fraction-digits 2;
491
+ }
492
+ type empty;
493
+ }
494
+ units "dB";
495
+ description
496
+ "Concentrated loss of the fused element";
497
+ }
498
+ }
499
+
500
+ grouping element-type-choice {
501
+ container operational {
502
+ when "../type = 'gnpynt:Edfa' or ../type = 'gnpynt:RamanFiber'";
503
+ description
504
+ "Operational values for the Edfa and the RamanFiber";
505
+ choice ramanfiber {
506
+ case RamanFiber {
507
+ when "../type = 'gnpynt:RamanFiber'";
508
+ uses raman-fiber-operational;
509
+ }
510
+ case Edfa {
511
+ when "../type = 'gnpynt:Edfa'";
512
+ uses edfa-params;
513
+ uses frequency_band;
514
+ }
515
+ }
516
+ }
517
+ choice element-type {
518
+ case FiberRoadm {
519
+ container params {
520
+ choice fiberroadmfused {
521
+ case Fiber {
522
+ when "../type = 'gnpynt:Fiber' or ../type = 'gnpynt:RamanFiber'";
523
+ uses fiber-common-params;
524
+ }
525
+ case RoadmTransceiver {
526
+ when "../type = 'gnpynt:Roadm' or ../type = 'gnpynt:Transceiver'";
527
+ uses roadm-trx-params;
528
+ choice roadm {
529
+ case roadm {
530
+ when "../type = 'gnpynt:Roadm'";
531
+ uses roadm-params;
532
+ }
533
+ }
534
+ }
535
+ case Fused {
536
+ when "../type = 'gnpynt:Fused'";
537
+ uses fused-params;
538
+ }
539
+ }
540
+ }
541
+ }
542
+ case Multiband_amplifier {
543
+ when "type = 'gnpynt:Multiband_amplifier'";
544
+ uses multiband-params;
545
+ }
546
+ }
547
+ }
548
+
549
+
550
+ grouping topo {
551
+ list elements {
552
+ key "uid";
553
+ leaf uid {
554
+ type string;
555
+ }
556
+ leaf type {
557
+ type identityref {
558
+ base type-element;
559
+ }
560
+ mandatory true;
561
+ }
562
+ leaf type_variety {
563
+ type string;
564
+ mandatory false;
565
+ }
566
+ container metadata {
567
+ uses location-attributes;
568
+ }
569
+ uses element-type-choice;
570
+ }
571
+ list connections {
572
+ key "from_node to_node";
573
+ leaf from_node {
574
+ type leafref {
575
+ path "../../elements/uid";
576
+ }
577
+ }
578
+ leaf to_node {
579
+ type leafref {
580
+ path "../../elements/uid";
581
+ }
582
+ }
583
+ }
584
+ }
585
+ container topology {
586
+ description
587
+ "Describe the topology gnpy-formated for release 2.6 toaster (including mixed rate and multiband)";
588
+ uses topo;
589
+ leaf network_name {
590
+ type string;
591
+ mandatory false;
592
+ }
593
+ }
594
+ }