mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-10-30 17:47:50 +00:00
Merge changes I8523fb93,Ia832cd8f,Id92bda62
* changes: Remove unused variables remove unused variable remove unused import
This commit is contained in:
@@ -9,7 +9,6 @@ Common code for CLI examples
|
||||
'''
|
||||
|
||||
import argparse
|
||||
from json import dumps
|
||||
import logging
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
@@ -694,8 +694,6 @@ def connect_eqpt(from_, in_, to_):
|
||||
|
||||
def eqpt_in_city_to_city(in_city, to_city, direction='east'):
|
||||
rev_direction = 'west' if direction == 'east' else 'east'
|
||||
amp_direction = f'{direction}_amp_type'
|
||||
amp_rev_direction = f'{rev_direction}_amp_type'
|
||||
return_eqpt = ''
|
||||
if in_city in eqpts_by_city:
|
||||
for e in eqpts_by_city[in_city]:
|
||||
@@ -705,7 +703,6 @@ def eqpt_in_city_to_city(in_city, to_city, direction='east'):
|
||||
elif nodes_by_city[in_city].node_type.lower() == 'ila':
|
||||
if e.to_city != to_city:
|
||||
direction = rev_direction
|
||||
amp_direction = amp_rev_direction
|
||||
return_eqpt = f'{direction} edfa in {e.from_city} to {e.to_city}'
|
||||
elif nodes_by_city[in_city].node_type.lower() == 'ila':
|
||||
return_eqpt = f'{direction} edfa in {in_city}'
|
||||
|
||||
@@ -534,10 +534,9 @@ def convert_service_sheet(
|
||||
network,
|
||||
network_filename=None,
|
||||
output_filename='',
|
||||
bidir=False,
|
||||
filter_region=None):
|
||||
bidir=False):
|
||||
if output_filename == '':
|
||||
output_filename = f'{str(input_filename)[0:len(str(input_filename))-len(str(input_filename.suffixes[0]))]}_services.json'
|
||||
data = read_service_sheet(input_filename, eqpt, network, network_filename, bidir, filter_region)
|
||||
data = read_service_sheet(input_filename, eqpt, network, network_filename, bidir)
|
||||
save_json(data, output_filename)
|
||||
return data
|
||||
|
||||
@@ -178,12 +178,9 @@ def read_service_sheet(
|
||||
eqpt,
|
||||
network,
|
||||
network_filename=None,
|
||||
bidir=False,
|
||||
filter_region=None):
|
||||
bidir=False):
|
||||
""" converts a service sheet into a json structure
|
||||
"""
|
||||
if filter_region is None:
|
||||
filter_region = []
|
||||
if network_filename is None:
|
||||
network_filename = input_filename
|
||||
service = parse_excel(input_filename)
|
||||
|
||||
Reference in New Issue
Block a user