Merge: merge completed

Path_requests_run and convert_service_sheet.py now use funtions from transmission main

ISSUE from develop refactor : the json generation of the topology is missing all amplifiers !
- ILA are not included
- some edfa appear in the json topo when Eqpt sheet is used, but not all of them (only for
the requested path when running transmission_main_example)

TODO : identify if this is a new behaviour or if this is a regression

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
This commit is contained in:
EstherLerouzic
2018-06-13 16:42:10 +01:00
parent 2ca141baba
commit b93c6dbcbd
6 changed files with 249 additions and 358 deletions

View File

@@ -51,13 +51,13 @@ def plot_results(network, path, source, sink):
def load_network(filename, equipment):
json_filename = ''
if args.filename.suffix.lower() == '.xls':
if filename.suffix.lower() == '.xls':
logger.info('Automatically generating topology JSON file')
json_filename = convert_file(args.filename)
elif args.filename.suffix.lower() == '.json':
json_filename = args.filename
json_filename = convert_file(filename)
elif filename.suffix.lower() == '.json':
json_filename = filename
else:
raise ValueError(f'unsuported topology filename extension {args.filename.suffix.lower()}')
raise ValueError(f'unsuported topology filename extension {filename.suffix.lower()}')
json_data = load_json(json_filename)
return network_from_json(json_data, equipment)