aboutsummaryrefslogtreecommitdiffstats
path: root/osdfapp.py
diff options
context:
space:
mode:
authorkrishna moorthy <krishna.moorthy6@wipro.com>2020-08-27 04:58:10 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-27 04:58:10 +0000
commit8d566ba1186b78b4ba134a9b5b8cdc106c2a06ee (patch)
treeb1307edfbd43a8abb1759de12492d2ab2bdf8c92 /osdfapp.py
parent2d770e68218a19ec3b0da34d3242355dd69e1a70 (diff)
parent01cd5da39097c948e4fba94eb785b60452c70af3 (diff)
Merge "Change API layer for NSI selection"
Diffstat (limited to 'osdfapp.py')
-rwxr-xr-xosdfapp.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/osdfapp.py b/osdfapp.py
index b455292..9b84bc9 100755
--- a/osdfapp.py
+++ b/osdfapp.py
@@ -134,7 +134,7 @@ def do_pci_optimization():
req_id = request_json['requestInfo']['requestId']
audit_log.info('requestID obtained==>')
audit_log.info(req_id)
-
+
g.request_id = req_id
audit_log.info(MH.received_request(request.url, request.remote_addr, json.dumps(request_json)))
PCIOptimizationAPI(request_json).validate()
@@ -157,7 +157,12 @@ def do_nsi_selection():
g.request_id = req_id
audit_log.info(MH.received_request(request.url, request.remote_addr, json.dumps(request_json)))
NSISelectionAPI(request_json).validate()
- return process_nsi_selection_opt(request_json, osdf_config)
+ audit_log.info(MH.new_worker_thread(req_id, "[for NSI selection]"))
+ t = Thread(target=process_nsi_selection_opt, args=(request_json, osdf_config))
+ t.start()
+ return req_accept(request_id=req_id,
+ transaction_id=request_json['requestInfo']['transactionId'],
+ request_status="accepted", status_message="")
if __name__ == "__main__":