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
This commit is contained in:
EstherLerouzic
2025-02-24 17:13:21 +01:00
parent ee5e6f9b9e
commit 1a795639c7
37 changed files with 30848 additions and 15 deletions

View File

@@ -23,7 +23,7 @@
"allowed_for_design": true
},
{
"type_variety": "std_low_gain",
"type_variety": "std_low_gain_reduced",
"type_def": "variable_gain",
"gain_flatmax": 16,
"gain_min": 8,
@@ -295,7 +295,7 @@
"allowed_for_design": true
},
{
"type_variety": "std_low_gain_multiband_reduced",
"type_variety": "std_low_gain_multiband_reduced_bis",
"type_def": "multi_band",
"amplifiers": [
"std_low_gain_bis",

View File

@@ -52,8 +52,8 @@
"explicit-route-objects": {
"route-object-include-exclude": [
{
"explicit-route-usage": "route-include-ero",
"index": 0,
"explicit-route-usage": "route-include-ero",
"num-unnum-hop": {
"node-id": "roadm Brest_KLA",
"link-tp-id": "link-tp-id is not used",
@@ -61,8 +61,8 @@
}
},
{
"explicit-route-usage": "route-include-ero",
"index": 1,
"explicit-route-usage": "route-include-ero",
"num-unnum-hop": {
"node-id": "roadm Lannion_CAS",
"link-tp-id": "link-tp-id is not used",
@@ -70,8 +70,8 @@
}
},
{
"explicit-route-usage": "route-include-ero",
"index": 2,
"explicit-route-usage": "route-include-ero",
"num-unnum-hop": {
"node-id": "roadm Lorient_KMA",
"link-tp-id": "link-tp-id is not used",
@@ -79,8 +79,8 @@
}
},
{
"explicit-route-usage": "route-include-ero",
"index": 3,
"explicit-route-usage": "route-include-ero",
"num-unnum-hop": {
"node-id": "roadm Vannes_KBE",
"link-tp-id": "link-tp-id is not used",

View File

@@ -32,7 +32,6 @@
]
},
"params": {
"type_variety": "SSMF",
"length": 80.0,
"loss_coef": 0.2,
"length_units": "km",