diff options
author | dhebeha <dhebeha.mj71@wipro.com> | 2020-08-17 10:30:43 +0530 |
---|---|---|
committer | dhebeha <dhebeha.mj71@wipro.com> | 2020-08-17 10:30:43 +0530 |
commit | b712a135c2d84f5b6361583e75a0cb25493b4585 (patch) | |
tree | 35c8082f0d5016d3e29744c840df86a9908092fa /osdfapp.py | |
parent | 01cd5da39097c948e4fba94eb785b60452c70af3 (diff) |
Add API layer for NSSI selection
Issue-ID: OPTFRA-801
Signed-off-by: dhebeha <dhebeha.mj71@wipro.com>
Change-Id: Ib9740d24b8f160708811ddb70138a49ce592e93b
Diffstat (limited to 'osdfapp.py')
-rwxr-xr-x | osdfapp.py | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -154,5 +154,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() |