diff options
author | dhebeha <dhebeha.mj71@wipro.com> | 2020-04-30 16:12:32 +0530 |
---|---|---|
committer | dhebeha <dhebeha.mj71@wipro.com> | 2020-04-30 16:35:30 +0530 |
commit | e07bb7a6bce3fa331c3e556395663dd77bc02676 (patch) | |
tree | 3fb75972940303b79cf237caa034824d96b9758c /apps/pci/optimizers/pci_opt_processor.py | |
parent | d4a0085a8f75c62912d19613459ad1bc3dce3e73 (diff) |
Change to support PCI unchangeable cells
Issue-ID: OPTFRA-678
Signed-off-by: dhebeha <dhebeha.mj71@wipro.com>
Change-Id: Ib7620cb19850d77e80b2baea5ef318e8b0182d7c
Diffstat (limited to 'apps/pci/optimizers/pci_opt_processor.py')
-rw-r--r-- | apps/pci/optimizers/pci_opt_processor.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/pci/optimizers/pci_opt_processor.py b/apps/pci/optimizers/pci_opt_processor.py index 9948d55..01ae0b4 100644 --- a/apps/pci/optimizers/pci_opt_processor.py +++ b/apps/pci/optimizers/pci_opt_processor.py @@ -89,10 +89,16 @@ def get_solutions(cell_info_list, network_cell_info, request_json): def build_solution_list(cell_info_list, network_cell_info, request_json): status = "success" req_id = request_json["requestInfo"]["requestId"] + pci_solutions =[] + anr_solutions=[] try: opt_solution = optimize(network_cell_info, cell_info_list, request_json) - pci_solutions = build_pci_solution(network_cell_info, opt_solution['pci']) - anr_solutions = build_anr_solution(network_cell_info, opt_solution.get('removables', {})) + if opt_solution == 'UNSATISFIABLE': + status = 'inconsistent input' + return status, pci_solutions, anr_solutions + else: + pci_solutions = build_pci_solution(network_cell_info, opt_solution['pci']) + anr_solutions = build_anr_solution(network_cell_info, opt_solution.get('removables', {})) except RuntimeError: error_log.error("Failed finding solution for {} {}".format(req_id, traceback.format_exc())) status = "failed" |