mirror of
				https://github.com/Telecominfraproject/oopt-gnpy.git
				synced 2025-10-31 18:18:00 +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 | import argparse | ||||||
| from json import dumps |  | ||||||
| import logging | import logging | ||||||
| import os.path | import os.path | ||||||
| import sys | import sys | ||||||
|   | |||||||
| @@ -694,8 +694,6 @@ def connect_eqpt(from_, in_, to_): | |||||||
|  |  | ||||||
| def eqpt_in_city_to_city(in_city, to_city, direction='east'): | def eqpt_in_city_to_city(in_city, to_city, direction='east'): | ||||||
|     rev_direction = 'west' if direction == 'east' else '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 = '' |     return_eqpt = '' | ||||||
|     if in_city in eqpts_by_city: |     if in_city in eqpts_by_city: | ||||||
|         for e in eqpts_by_city[in_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': |             elif nodes_by_city[in_city].node_type.lower() == 'ila': | ||||||
|                 if e.to_city != to_city: |                 if e.to_city != to_city: | ||||||
|                     direction = rev_direction |                     direction = rev_direction | ||||||
|                     amp_direction = amp_rev_direction |  | ||||||
|                 return_eqpt = f'{direction} edfa in {e.from_city} to {e.to_city}' |                 return_eqpt = f'{direction} edfa in {e.from_city} to {e.to_city}' | ||||||
|     elif nodes_by_city[in_city].node_type.lower() == 'ila': |     elif nodes_by_city[in_city].node_type.lower() == 'ila': | ||||||
|         return_eqpt = f'{direction} edfa in {in_city}' |         return_eqpt = f'{direction} edfa in {in_city}' | ||||||
|   | |||||||
| @@ -534,10 +534,9 @@ def convert_service_sheet( | |||||||
|         network, |         network, | ||||||
|         network_filename=None, |         network_filename=None, | ||||||
|         output_filename='', |         output_filename='', | ||||||
|         bidir=False, |         bidir=False): | ||||||
|         filter_region=None): |  | ||||||
|     if output_filename == '': |     if output_filename == '': | ||||||
|         output_filename = f'{str(input_filename)[0:len(str(input_filename))-len(str(input_filename.suffixes[0]))]}_services.json' |         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) |     save_json(data, output_filename) | ||||||
|     return data |     return data | ||||||
|   | |||||||
| @@ -178,12 +178,9 @@ def read_service_sheet( | |||||||
|         eqpt, |         eqpt, | ||||||
|         network, |         network, | ||||||
|         network_filename=None, |         network_filename=None, | ||||||
|         bidir=False, |         bidir=False): | ||||||
|         filter_region=None): |  | ||||||
|     """ converts a service sheet into a json structure |     """ converts a service sheet into a json structure | ||||||
|     """ |     """ | ||||||
|     if filter_region is None: |  | ||||||
|         filter_region = [] |  | ||||||
|     if network_filename is None: |     if network_filename is None: | ||||||
|         network_filename = input_filename |         network_filename = input_filename | ||||||
|     service = parse_excel(input_filename) |     service = parse_excel(input_filename) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jan Kundrát
					Jan Kundrát