summaryrefslogtreecommitdiffstats
path: root/osdfapp.py
diff options
context:
space:
mode:
authorkrishna moorthy <krishna.moorthy6@wipro.com>2020-08-27 04:59:46 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-27 04:59:46 +0000
commit053c09a2ed1a8fc8aeef3f8185902634feec8000 (patch)
treec8c548ebc0c9f08416d92d604fd866cc741104b3 /osdfapp.py
parent8d566ba1186b78b4ba134a9b5b8cdc106c2a06ee (diff)
parentb712a135c2d84f5b6361583e75a0cb25493b4585 (diff)
Merge "Add API layer for NSSI selection"
Diffstat (limited to 'osdfapp.py')
-rwxr-xr-xosdfapp.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/osdfapp.py b/osdfapp.py
index 9b84bc9..eb99fac 100755
--- a/osdfapp.py
+++ b/osdfapp.py
@@ -165,5 +165,20 @@ def do_nsi_selection():
request_status="accepted", status_message="")
+@app.route("/api/oof/selection/nssi/v1", methods=["POST"])
+def do_nssi_selection():
+ request_json = request.get_json()
+ req_id = request_json['requestInfo']['requestId']
+ g.request_id = req_id
+ audit_log.info(MH.received_request(request.url, request.remote_addr, json.dumps(request_json)))
+ NSSISelectionAPI(request_json).validate()
+ audit_log.info(MH.new_worker_thread(req_id, "[for NSSI 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__":
run_app()