1582 Commits

Author SHA1 Message Date
EstherLerouzic
f8e349763a fix: restore save_json as generic
and create a save_gnpy_json for specific gnpy exports.
because save_json is used as dependency in other projects

Fix example and test file.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I9af07a13510658dece0685a3bce7589efd57e259
2026-01-21 15:07:15 +01:00
EstherLerouzic
9d15d76859 feat: add max snr in exports
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I70f892e37c19615063efd294af781faca064c573
2026-01-21 15:07:15 +01:00
EstherLerouzic
41bc9a6f2a feat: support library metadata when loading equipment
Make sure that a library which includes metada (library-information)
is correctly loaded, and these metada ignored.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I9c3dc46d502f061b2b31aa430865aa265f1631ad
2026-01-21 15:07:15 +01:00
EstherLerouzic
3d16ffb1cc fix linter: import order
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I876a8aac161028cc57edbf8dfafeab9929cc6e45
2026-01-21 15:07:15 +01:00
EstherLerouzic
20416be098 fix: linter in spectrum_assignment
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ib956606b973b85330c41828d09d95e742c1adebf
2026-01-21 15:07:15 +01:00
EstherLerouzic
1c0b7314d8 fix: utils.py linter issues
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I512173e16535aa642ebda490c7ba5b2cc590b6bf
2026-01-21 15:07:15 +01:00
EstherLerouzic
5cc221d8ca fix some linter issues
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Idb3d421f3d85335fe96ae3576321975e68a75524
2026-01-21 15:07:14 +01:00
EstherLerouzic
863197138a Refactor: use an enum for bitmap values
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Id1b047ef2eca9d84d1c92fdb84de262b10ae001d
2026-01-21 15:07:14 +01:00
EstherLerouzic
abb42a5703 Add a spectrum assignment policy argument
Enable user to choose spectrum assignement policy.
Implement a last fit policy.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I1ab5ac484a342a8d6e8e7e963132036a01cfef4f
2026-01-21 15:07:14 +01:00
JennyLescop
32bd4d669e feat: improve path request results on the cli print
Signed-off-by: JennyLescop <jenny.lescop@orange.com>
Change-Id: Id733e39c144dc75e573568b47b3255478a5f0e27
2026-01-21 15:07:14 +01:00
EstherLerouzic
b3d4b8c60a Refactor: create parameters objects for Request inputs
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I18e6f14c283a37f792474dc1e3ca97343061162c
2026-01-21 15:07:14 +01:00
EstherLerouzic
b792172c96 Minor fix: improve code quality
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I4f2d6855b7499ed54062801358affade3276dd78
2026-01-21 15:07:14 +01:00
EstherLerouzic
7777ab5a40 Refactor jsontocsv
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I46cb1f6b330d998e25362aff07100fbfd59463b8
2026-01-21 15:07:14 +01:00
EstherLerouzic
2438e8b27a Refactor with constants
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I80822f9e0237d132eb7004bd82275456e67dddde
2026-01-21 15:07:14 +01:00
EstherLerouzic
ed7a5849be Add more information on output
- min required OSNR
- min propagated GSNR
- PDL, PMD, CD penalties

This enables user to diagnose the case whan GSNR is OK but path is failing

change the test_parser:
- keep the testTopology_response.json file as it is as input file for
test_csv_response_generation so that previous json exports are still tested.
- use a new testTopology_response_expected.json to check the actual json
generation with the additionnal informations
- add a 'fake response.json file with various types of response to better
test the jsontocsv function

Add more info in the logger for the case of no_ feasible_mode and add a test
for this case.

refactor a bit the functions

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I92105f58adb7303f3d1475e4b21bd3e36e227090
2026-01-21 15:07:14 +01:00
gborrach
ff7ce224f7 Fix add method in spectral information class
- removing order dependancy in the init
- adding test dedicated to the add method
- fix invocation test multiband

Change-Id: Ibaf8b6d791c17136b2c3538a5ce82e0e2757b25b
2026-01-12 14:59:36 -05:00
EstherLerouzic
0cb3deacf5 Remove deprecated macos-13 from GitHub Actions
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0dc9bdb03a3427cba1b7ecf1c92ea9817519bc45
2025-12-15 10:06:57 +01:00
AndreaDAmico
08b3a6cb33 Change power behaviour in the Fiber: pch in place of signal
Here the Fiber behaviour change because pch = signal + ase + nli is
considered instead of just signal. This slightly changes the
propagation results as more power is considered to be injected in the
fiber span. All differences in tests are below 0.1 dB, with a few
exceptions slightly higher.

Change-Id: I5b2227ee036a26a11e13f3169e16868d70f0c457
2025-12-15 01:37:50 -05:00
AndreaDAmico
13cf2d2d01 Using new pch and ptot definitions
Using the new defined attribute in a coherent way along the code.
Still no changes in the behaviour

Change-Id: I6e43db1e28a5456e0522e52c0f74e79969307ed9
2025-12-15 01:37:50 -05:00
AndreaDAmico
e152f66546 Introducing new power per channel attribute
Just new definition that will be used in next changes.
At this point there is not any changes in behaviour
and tests are only changed to adapt the new signature
of the spectral information.

Change-Id: Ib3a0fd556681d34978312dc5e80f0e15096ef79c
2025-12-15 01:37:50 -05:00
AndreaDAmico
e552b7e70b Remove power from info, simplify demux function
Preliminary for new power definition.
Powers is removed to avoid confusion.
Demux per band is modified for efficiency

Change-Id: Ie48777e00efc139a69d3e96fd777fa10dcd998c7
2025-12-15 01:37:50 -05:00
EstherLerouzic
2132ba8ab2 fix: do not crash when exporting loss_coeff per frequency lists
to_json export includes a round that makes the export crash when
loss_coef is an array. This patch includes a test on the data to
correctly export per frequency loss coeff.

legacy format supports
"loss_coef": {"value": [0.29, 0.28, 0.29], "frequency": [186.3e12, 194e12, 197e12]},
yang format should be:
"loss_coef_per_frequency": [
{"frequency": "186300000000000.0", "loss_coef_value": "0.29"},
{"frequency": "194000000000000.0", "loss_coef_value": "0.28"},
{"frequency": "197000000000000.0", "loss_coef_value": "0.29"}]

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Id4e49d2b3cce22b85228fe790c15c5a93dea7e06
2025-12-04 09:33:23 +00:00
gborrach
d8baf30521 Fix interpreter usage and privilege assumptions in tests
- test_legacy_yang: subprocess now uses the same interpreter/environment as pytest
- test_create_eqpt_sheet: remove dependence on system privileges

Signed-off-by: gborraccini <gborraccini@nec-labs.com>
Change-Id: I43d29130700f509e92843d7cbd611ea5bec05657
2025-11-25 12:28:27 -05:00
EstherLerouzic
c744a97d83 Prepare release notes for v2.13
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Iff07dcd6e98b4e4abd79ec8f97d09df2cf2c0e24
v2.13
2025-09-26 11:56:02 +02:00
EstherLerouzic
09221504d7 Add yang trees
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I98a16ebea347ff4913840cf6f563c34ebcf8f8d9
2025-09-26 11:52:56 +02:00
EstherLerouzic
f2039fbe1c fix: use loaded json instead of Path for extra configs
In order to be used by API.

Co-authored-by: Renato Ambrosone <renato.ambrosone@polito.it>

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I12111427c8a90b85b3158cdd95f4ee771cb39316
2025-09-26 11:17:45 +02:00
EstherLerouzic
78227e65da fix documentation and release notes
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I18457b1bdebd92bdd547877760a039706ad995a3
2025-09-26 11:17:45 +02:00
EstherLerouzic
e27e6d5c7b chore: add release notes
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ia561105ac5b3fa246bbd26a37e495e0d2ae92041
2025-09-26 11:17:45 +02:00
EstherLerouzic
e3445e1066 Update maintainer names
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I9122bfcf91a6cb55a6c50f98c6944086a21b1b73
2025-09-26 11:17:45 +02:00
EstherLerouzic
a0758d0da5 Move and refactor create_eqpt_sheet.py and add tests on it
Co-authored-by: Rodrigo Sasse David <rodrigo.sassedavid@orange.com>

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ib961c5c0e203f2225a0f1e2e7a091485567189c3
2025-09-26 11:17:45 +02:00
EstherLerouzic
0bc1fb3bf8 fix: Use openpyxl for xlsx reading and move to latest xlrd version
Create a set of excel utils to be used for .xls and .xlsx files, for
reading workbook, reading sheets, ... optimize openpyxl access to
sheet to save computation time.

Use this opportunity to refactor service sheet without namedtuple
and simplify code

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ibaf3aac40b3f6ca4829d8ea8cd506523d318103a
2025-09-26 11:17:45 +02:00
Arturo Mayoral
cd9d4c55b2 Publish calendar at docs/calendar.html and update README link to GitHub Pages
Change-Id: I0381b8d8ebcf3b40d15d1e80fa22bbc3613348e3
2025-09-17 13:13:51 +02:00
EstherLerouzic
62889bf6af feat: add a console script for yang conversion
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: If5ec36beec9d90b2f3d8c08c7fb5b629ad722245
2025-09-03 12:58:21 +02:00
EstherLerouzic
61787d5052 feat: parametrize the function that computes power targets
enable changing the reference span loss and the ratio of the
loss deviation to this reference that should be reported on
the span input.

Initial target used a hardcoded 20dB loss span with
0.3 power slope.

update documentation accordingly.

requires yang updates
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ib763db6be2bd7e947057176f3246f19ac7e6ac0d
2025-09-03 10:34:16 +02:00
Florian FRANK
6612a46a9e Fix to_json()-function of Multiband_amplifier when gain is missing
Signed-off-by: Florian FRANK <florian1.frank@orange.com>
Change-Id: I2a0c249c7e3278e282c2c45ea8be52073f014de3
2025-09-03 10:34:16 +02:00
EstherLerouzic
f30515ba9d fix: do not replace 0 with None
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I02ee8f4f1148873fd19f1c312578bc1f15355667
2025-09-03 10:34:16 +02:00
EstherLerouzic
6f9897fe40 fix: do not crash if type_variety is not defined when saving network
before autodesign type_variety may not be created yet, while ther is one default in params:
use type_variety from params

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I556bc8fa1a8241054c81cee386cf52b94a76a0bc
2025-09-03 10:34:16 +02:00
EstherLerouzic
56e615c713 Feat: Use a reference channel per OMS instead of total power for design
Correctly uses the oms band and spacing for computing the nb of channel
and total power for design per band.
In order to keep the SI values as reference, introduce a new parameter
in SI to indicate wether to use this feature or not.

If "use_si_channel_count_for_design": true, then the f_min, f_max and spacing
from SI are used for all OMSes
else, the f_min, f_max, spacing defined per OMS (design_bands) is used.

This impacts tests where the artificial C-band boudaries were hardcoded, and
it also has an impact on performances when SI's defined nb of channels is larger
than the one defined per OMS. In this case the design was considering a larger
total power than the one finally propagated which resulted in reduced performance.
This feature now corrects this case (if "use_si_channel_count_for_design": false
which is the default setting). Overall autodesign are thus improved.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I471a2c45200894ca354c90b46b662f42414b48ad

tous les test marche et les jeu de tests aussi.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: If25b47aa10f97301fde7f17daa2a9478aed46db2
2025-09-03 10:34:15 +02:00
EstherLerouzic
f447c908bc Feat: Add spacing info in the design_band info
This will be used to compute the max total power for design per OMS.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I392f06c792af9f32d4a14324c683bd3fae655de8
2025-09-03 10:34:15 +02:00
EstherLerouzic
4df6cc6b23 fix bug: use preselected restrictions also for raman flag true
otherwise restrictions that include raman are not correctly selected
eg for preamp with raman restriction in ROADM

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ie0215ca430cf463a5422d9236745710ab92ade59
2025-09-03 10:34:15 +02:00
EstherLerouzic
6c5d11d86c Implement in_voa of amplifiers
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I24feed756586a104e829275244f0868a272e5f6b
2025-09-03 10:34:15 +02:00
EstherLerouzic
1a795639c7 feat: Add conversion utilities for YANG and legacy formats in GNPy
This commit introduces new functions for converting between YANG formatted files and
legacy formats. The conversion processes adhere to RFC7951 for encoding YANG data.

Key changes include:
- Conversion of float and empty type representations.
- Transformation of Span and SI lists xx_power_range into dictionaries.
- Addition of necessary namespaces.
- use of oopt-gnpy-libyang to enforce compliancy to yang models

These utilities enable full compatibility with GNPy.

Co-authored-by: Renato Ambrosone <renato.ambrosone@polito.it>

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ia004113bca2b0631d1648564e5ccb60504fe80f8
2025-09-03 10:34:14 +02:00
EstherLerouzic
ee5e6f9b9e fix(CI): remove windows 2019, add windows 2025 support
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I133f5603f00d03e33add8842d34d692ab8fb1804
2025-09-03 10:34:14 +02:00
EstherLerouzic
ea4ab1d61b fix: place index first in the request-list because of libyang bug
libyang does not find key in data if not placed first in the data

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I63b9aa619e15d770e2dcb59010223318d2518eb7
2025-06-30 09:21:42 +02:00
EstherLerouzic
d43fee5945 fix: save network_name
network_name was not correctly exported in json output.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ia4ae6bf82e5d147d3c99e195151942abc21be3f3
2025-06-30 09:21:42 +02:00
EstherLerouzic
6603a50e78 chore: gnpy yang models
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I68502e76e27b43d2a6f6a5741045df3095fc7ccd
2025-06-30 09:21:39 +02:00
EstherLerouzic
b76c529c0c chore: import external ietf modules
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I02ed156105736ab538e4d5708d38b497f9479658
2025-06-11 15:05:51 +02:00
EstherLerouzic
7a1b15a916 chore: make sure all python files have the correct header
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ifdd6a566fda74c5b7d417f9d61c51d4d3da07bfd
2025-06-11 15:05:51 +02:00
EstherLerouzic
7bc9461547 chore: make sure commits authors are in th AUTHORS list
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I721957b59746738426f2356056c553d9876bcf22
2025-06-04 12:22:33 -04:00
EstherLerouzic
b0ac41e2d5 fix: PMD was not correctly read from excel or exported from json
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I1069b07dfb62bf94d4f591908c034df4e49ce22a
2025-03-21 15:42:45 +01:00