summaryrefslogtreecommitdiffstats
path: root/osdfapp.py
diff options
context:
space:
mode:
authordhebeha <dhebeha.mj71@wipro.com>2020-08-14 11:45:20 +0530
committerdhebeha <dhebeha.mj71@wipro.com>2020-08-14 11:46:13 +0530
commit01cd5da39097c948e4fba94eb785b60452c70af3 (patch)
tree029002a3ca33da6429fb3c94be9cc8c3111c1226 /osdfapp.py
parentf16a36e97aae114d9168eff7a4d273891e00d387 (diff)
Change API layer for NSI selection
Issue-ID: OPTFRA-802 Signed-off-by: dhebeha <dhebeha.mj71@wipro.com> Change-Id: Ia7e36da8d9a4d1f3f8e8eb00a61e6b0b29fbbbf6
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 1099e55..5f45d9a 100755
--- a/osdfapp.py
+++ b/osdfapp.py
@@ -123,7 +123,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()
@@ -146,7 +146,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__":