summaryrefslogtreecommitdiffstats
path: root/apps/pci/optimizers/pci_opt_processor.py
diff options
context:
space:
mode:
authorVikas Varma <vikas.varma@att.com>2020-05-05 14:08:34 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-05 14:08:34 +0000
commit1b493a741b87880181a027fe102d295fcbd6f7cb (patch)
tree132c4156fc5c3360a5e180ee351d6bbcdaa444bf /apps/pci/optimizers/pci_opt_processor.py
parent070488fcb919b2cdffca8a3739b0f9abbb9414f4 (diff)
parente07bb7a6bce3fa331c3e556395663dd77bc02676 (diff)
Merge "Change to support PCI unchangeable cells"
Diffstat (limited to 'apps/pci/optimizers/pci_opt_processor.py')
-rw-r--r--apps/pci/optimizers/pci_opt_processor.py10
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"