diff options
author | hariharan97 <rh20085046@wipro.com> | 2020-08-26 09:42:29 +0530 |
---|---|---|
committer | hariharan97 <rh20085046@wipro.com> | 2020-09-02 17:38:41 +0530 |
commit | 7b7cfac3d2ae636f63c0e94df1a7129f2d10cb54 (patch) | |
tree | aefbb5da4319a5fe3bc7b4a2c8d6b2156201038b /osdfapp.py | |
parent | 053c09a2ed1a8fc8aeef3f8185902634feec8000 (diff) |
Add Nxi-Termination feature
Issue-ID: OPTFRA-825
Signed-off-by: hariharan97 <rh20085046@wipro.com>
Change-Id: I0d768e36708e9f26e5bcdf661b2bcb5772ed48c2
Diffstat (limited to 'osdfapp.py')
-rwxr-xr-x | osdfapp.py | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1,5 +1,6 @@ # ------------------------------------------------------------------------- # Copyright (c) 2015-2017 AT&T Intellectual Property +# Copyright (C) 2020 Wipro Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,6 +45,8 @@ from osdf.logging.osdf_logging import MH, audit_log from osdf.operation.responses import osdf_response_for_request_accept as req_accept from osdf.utils import api_data_utils from osdf.webapp.appcontroller import auth_basic +from apps.nxi_termination.optimizers.remote_opt_processor import process_nxi_termination_opt +from apps.nxi_termination.models.api.nxi_termination_request import NxiTerminationApi @app.route("/api/oof/v1/healthcheck", methods=["GET"]) @@ -105,6 +108,7 @@ def do_route_calc(): response = RouteOpt().get_route(request_json, osdf_config) return response + @app.route("/api/oof/mdons/route/v1", methods=["POST"]) def do_mdons_route_calc(): """ @@ -115,6 +119,7 @@ def do_mdons_route_calc(): response = InterDomainRouteOpt().get_route(request_json, osdf_config) return response + @app.route("/api/oof/v1/selection/nst", methods=["POST"]) def do_nst_selection(): request_json = request.get_json() @@ -179,6 +184,14 @@ def do_nssi_selection(): transaction_id=request_json['requestInfo']['transactionId'], request_status="accepted", status_message="") +@app.route("/api/oof/terminate/nxi/v1",methods=["POST"]) +def do_nxi_terminaton(): + 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))) + NxiTerminationApi(request_json).validate() + return process_nxi_termination_opt(request_json,osdf_config) if __name__ == "__main__": run_app() |