Files
oopt-gnpy/gnpy/example-data/meshTopologyExampleV2_services.json
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

268 lines
6.9 KiB
JSON

{
"path-request": [
{
"request-id": "0",
"source": "trx Lorient_KMA",
"destination": "trx Vannes_KBE",
"src-tp-id": "trx Lorient_KMA",
"dst-tp-id": "trx Vannes_KBE",
"bidirectional": false,
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "Voyager",
"trx_mode": null,
"effective-freq-slot": [
{
"N": null,
"M": null
}
],
"spacing": 50000000000.0,
"max-nb-of-channel": 80,
"output-power": 0.0012589254117941673,
"path_bandwidth": 100000000000.0
}
}
},
{
"request-id": "1",
"source": "trx Brest_KLA",
"destination": "trx Vannes_KBE",
"src-tp-id": "trx Brest_KLA",
"dst-tp-id": "trx Vannes_KBE",
"bidirectional": false,
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "Voyager",
"trx_mode": "mode 1",
"effective-freq-slot": [
{
"N": null,
"M": null
}
],
"spacing": 50000000000.0,
"max-nb-of-channel": null,
"output-power": 0.0012589254117941673,
"path_bandwidth": 200000000000.0
}
},
"explicit-route-objects": {
"route-object-include-exclude": [
{
"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",
"hop-type": "LOOSE"
}
},
{
"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",
"hop-type": "LOOSE"
}
},
{
"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",
"hop-type": "LOOSE"
}
},
{
"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",
"hop-type": "LOOSE"
}
}
]
}
},
{
"request-id": "3",
"source": "trx Lannion_CAS",
"destination": "trx Rennes_STA",
"src-tp-id": "trx Lannion_CAS",
"dst-tp-id": "trx Rennes_STA",
"bidirectional": false,
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "vendorA_trx-type1",
"trx_mode": "mode 1",
"effective-freq-slot": [
{
"N": null,
"M": null
}
],
"spacing": 50000000000.0,
"max-nb-of-channel": null,
"output-power": null,
"path_bandwidth": 60000000000.0
}
}
},
{
"request-id": "4",
"source": "trx Rennes_STA",
"destination": "trx Lannion_CAS",
"src-tp-id": "trx Rennes_STA",
"dst-tp-id": "trx Lannion_CAS",
"bidirectional": false,
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "vendorA_trx-type1",
"trx_mode": null,
"effective-freq-slot": [
{
"N": null,
"M": null
}
],
"spacing": 75000000000.0,
"max-nb-of-channel": null,
"output-power": 0.0019952623149688794,
"path_bandwidth": 150000000000.0
}
}
},
{
"request-id": "5",
"source": "trx Rennes_STA",
"destination": "trx Lannion_CAS",
"src-tp-id": "trx Rennes_STA",
"dst-tp-id": "trx Lannion_CAS",
"bidirectional": false,
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "vendorA_trx-type1",
"trx_mode": "mode 2",
"effective-freq-slot": [
{
"N": null,
"M": null
}
],
"spacing": 75000000000.0,
"max-nb-of-channel": 63,
"output-power": 0.0019952623149688794,
"path_bandwidth": 20000000000.0
}
}
},
{
"request-id": "6",
"source": "trx Lannion_CAS",
"destination": "trx Lorient_KMA",
"src-tp-id": "trx Lannion_CAS",
"dst-tp-id": "trx Lorient_KMA",
"bidirectional": false,
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "Voyager",
"trx_mode": "mode 1",
"effective-freq-slot": [
{
"N": null,
"M": null
}
],
"spacing": 50000000000.0,
"max-nb-of-channel": 76,
"output-power": 0.001,
"path_bandwidth": 300000000000.0
}
}
},
{
"request-id": "7",
"source": "trx Lannion_CAS",
"destination": "trx Lorient_KMA",
"src-tp-id": "trx Lannion_CAS",
"dst-tp-id": "trx Lorient_KMA",
"bidirectional": false,
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "Voyager",
"trx_mode": "mode 1",
"effective-freq-slot": [
{
"N": null,
"M": null
}
],
"spacing": 50000000000.0,
"max-nb-of-channel": 76,
"output-power": 0.001,
"path_bandwidth": 400000000000.0
}
}
},
{
"request-id": "7b",
"source": "trx Lannion_CAS",
"destination": "trx Lorient_KMA",
"src-tp-id": "trx Lannion_CAS",
"dst-tp-id": "trx Lorient_KMA",
"bidirectional": false,
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "Voyager",
"trx_mode": "mode 1",
"effective-freq-slot": [
{
"N": null,
"M": null
}
],
"spacing": 75000000000.0,
"max-nb-of-channel": 50,
"output-power": 0.001,
"path_bandwidth": 400000000000.0
}
}
}
],
"synchronization": [
{
"synchronization-id": "3",
"svec": {
"relaxable": "false",
"disjointness": "node link",
"request-id-number": [
"3",
"1"
]
}
},
{
"synchronization-id": "4",
"svec": {
"relaxable": "false",
"disjointness": "node link",
"request-id-number": [
"4",
"5"
]
}
}
]
}