bug fix due to tx_osnr add

tx_osnr was impacting automatic mode selection feature : this commit solves the error
+ add a novel version of the excel example with an empty mode cases

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
This commit is contained in:
EstherLerouzic
2018-12-19 15:22:03 +00:00
parent 8d97fcd735
commit 9cfb57dc4b
5 changed files with 25 additions and 18 deletions

View File

@@ -69,6 +69,7 @@ def requests_from_json(json_data,equipment):
# nb_channel is computed based on min max frequency and spacing
trx_params = trx_mode_params(equipment,params['trx_type'],params['trx_mode'],True)
params.update(trx_params)
print(trx_params['tx_osnr'])
# optical power might be set differently in the request. if it is indicated then the
# params['power'] is updated
if req['path-constraints']['te-bandwidth']['output-power']:
@@ -208,6 +209,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
pathreq.tsp_mode = mode['format']
pathreq.format = mode['format']
pathreq.OSNR = mode['OSNR']
pathreq.tx_osnr = mode['tx_osnr']
pathreq.bit_rate = mode['bit_rate']
else :
total_path = []