mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2026-01-27 10:21:48 +00:00
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
116 lines
2.2 KiB
JSON
116 lines
2.2 KiB
JSON
{
|
|
"elements": [
|
|
{
|
|
"uid": "Site_A",
|
|
"type": "Transceiver",
|
|
"metadata": {
|
|
"location": {
|
|
"latitude": 0,
|
|
"longitude": 0,
|
|
"city": "Site A",
|
|
"region": ""
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"uid": "Span1",
|
|
"type": "RamanFiber",
|
|
"type_variety": "SSMF",
|
|
"operational": {
|
|
"temperature": 283,
|
|
"raman_pumps": [
|
|
{
|
|
"power": 224.403e-3,
|
|
"frequency": 205e12,
|
|
"propagation_direction": "counterprop"
|
|
},
|
|
{
|
|
"power": 231.135e-3,
|
|
"frequency": 201e12,
|
|
"propagation_direction": "counterprop"
|
|
}
|
|
]
|
|
},
|
|
"params": {
|
|
"length": 80.0,
|
|
"loss_coef": 0.2,
|
|
"length_units": "km",
|
|
"att_in": 0,
|
|
"con_in": 0.5,
|
|
"con_out": 0.5
|
|
},
|
|
"metadata": {
|
|
"location": {
|
|
"latitude": 1,
|
|
"longitude": 0,
|
|
"city": null,
|
|
"region": ""
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"uid": "Fused1",
|
|
"type": "Fused",
|
|
"params": {
|
|
"loss": 0
|
|
},
|
|
"metadata": {
|
|
"location": {
|
|
"latitude": 1.5,
|
|
"longitude": 0,
|
|
"city": null,
|
|
"region": ""
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"uid": "Edfa1",
|
|
"type": "Edfa",
|
|
"type_variety": "std_low_gain",
|
|
"operational": {
|
|
"gain_target": 15.0,
|
|
"delta_p": -2,
|
|
"tilt_target": 0,
|
|
"out_voa": 0
|
|
},
|
|
"metadata": {
|
|
"location": {
|
|
"latitude": 2,
|
|
"longitude": 0,
|
|
"city": null,
|
|
"region": ""
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"uid": "Site_B",
|
|
"type": "Transceiver",
|
|
"metadata": {
|
|
"location": {
|
|
"latitude": 2,
|
|
"longitude": 0,
|
|
"city": "Site B",
|
|
"region": ""
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"connections": [
|
|
{
|
|
"from_node": "Site_A",
|
|
"to_node": "Span1"
|
|
},
|
|
{
|
|
"from_node": "Span1",
|
|
"to_node": "Fused1"
|
|
},
|
|
{
|
|
"from_node": "Fused1",
|
|
"to_node": "Edfa1"
|
|
},
|
|
{
|
|
"from_node": "Edfa1",
|
|
"to_node": "Site_B"
|
|
}
|
|
]
|
|
} |