correction of the excel to json conversion of per degree

The patch correction changing the params
from
per_degree_params: { to_node: xx , target_pch_out_db: yy}
to
per_degree_pch_out_db: {xx: yy}

had not been updated on convert.py for reading the excel input.

the commit also fixes the automatic tests with the correct version

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I17a5cfad18e1b570a7aaa218e932368fa80f2d37
This commit is contained in:
EstherLerouzic
2020-11-17 13:48:04 +01:00
parent d3490ae30c
commit 2fc444be4b
2 changed files with 16 additions and 32 deletions

View File

@@ -276,12 +276,11 @@ def create_roadm_element(node, roadms_by_city):
if node.city in roadms_by_city.keys():
if 'params' not in roadm.keys():
roadm['params'] = {}
roadm['params']['per_degree_params'] = []
roadm['params']['per_degree_pch_out_db'] = {}
for elem in roadms_by_city[node.city]:
to_node = f'east edfa in {node.city} to {elem.to_node}'
if elem.target_pch_out_db is not None:
roadm['params']['per_degree_params'].append({'to_node': to_node,
'target_pch_out_db': elem.target_pch_out_db})
roadm['params']['per_degree_pch_out_db'][to_node] = elem.target_pch_out_db
roadm['metadata'] = {'location': {'city': node.city,
'region': node.region,
'latitude': node.latitude,

View File

@@ -63,16 +63,10 @@
{
"uid": "roadm Lannion_CAS",
"params": {
"per_degree_params": [
{
"to_node": "east edfa in Lannion_CAS to Corlay",
"target_pch_out_db": -18.6
},
{
"to_node": "east edfa in Lannion_CAS to Morlaix",
"target_pch_out_db": -23.0
}
]
"per_degree_pch_out_db": {
"east edfa in Lannion_CAS to Corlay": -18.6,
"east edfa in Lannion_CAS to Morlaix": -23.0
}
},
"metadata": {
"location": {
@@ -87,12 +81,9 @@
{
"uid": "roadm Lorient_KMA",
"params": {
"per_degree_params": [
{
"to_node": "east edfa in Lorient_KMA to Vannes_KBE",
"target_pch_out_db": -12.0
}
]
"per_degree_pch_out_db": {
"east edfa in Lorient_KMA to Vannes_KBE": -12.0
}
},
"metadata": {
"location": {
@@ -107,12 +98,9 @@
{
"uid": "roadm Vannes_KBE",
"params": {
"per_degree_params": [
{
"to_node": "east edfa in Vannes_KBE to Lorient_KMA",
"target_pch_out_db": -10.0
}
]
"per_degree_pch_out_db": {
"east edfa in Vannes_KBE to Lorient_KMA": -10.0
}
},
"metadata": {
"location": {
@@ -127,12 +115,9 @@
{
"uid": "roadm Rennes_STA",
"params": {
"per_degree_params": [
{
"to_node": "east edfa in Rennes_STA to Stbrieuc",
"target_pch_out_db": -20.0
}
]
"per_degree_pch_out_db": {
"east edfa in Rennes_STA to Stbrieuc": -20.0
}
},
"metadata": {
"location": {
@@ -147,7 +132,7 @@
{
"uid": "roadm Brest_KLA",
"params": {
"per_degree_params": []
"per_degree_pch_out_db": {}
},
"metadata": {
"location": {