Fix: penalties are not correctly initialized

When mode is not given and propagation is performed bidir, penalties
corresponding to automatically  selected mode are not correctly
initialized in request, and gnpy-path-request fails.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: If045624ff5dad7f0dfdec93eaa05bb5eae86e643
This commit is contained in:
EstherLerouzic
2022-04-01 18:36:15 +02:00
parent d5a52d1b2b
commit 2079d2bc5b

View File

@@ -1142,6 +1142,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
pathreq.OSNR = mode['OSNR']
pathreq.tx_osnr = mode['tx_osnr']
pathreq.bit_rate = mode['bit_rate']
pathreq.penalties = mode['penalties']
# other blocking reason should not appear at this point
except AttributeError:
pathreq.baud_rate = mode['baud_rate']
@@ -1150,6 +1151,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
pathreq.OSNR = mode['OSNR']
pathreq.tx_osnr = mode['tx_osnr']
pathreq.bit_rate = mode['bit_rate']
pathreq.penalties = mode['penalties']
# reversed path is needed for correct spectrum assignment
reversed_path = find_reversed_path(pathlist[i])