diff options
author | Aleem Raja <aleem.raja@t-systems.com> | 2023-01-20 06:06:17 +0000 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2023-02-15 21:46:51 +0000 |
commit | dee386685502c63d64959e0f2324bf52440e9655 (patch) | |
tree | 8e307904fb6bcf9394cccd33c7ec4733bce1dd53 /osdfapp.py | |
parent | cb795c01df747f872f5985ba318eefdddea57507 (diff) |
new API selectNSST for slicing use case3.0.8
Issue-ID: OPTFRA-1122
Signed-off-by: Aleem Raja <aleem.raja@t-systems.com>
Change-Id: Ib027bfe49948180a1808b5507dc1647ba05c6e0d
Diffstat (limited to 'osdfapp.py')
-rwxr-xr-x | osdfapp.py | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -29,8 +29,10 @@ from flask import request, g from osdf.apps.baseapp import app, run_app from apps.nst.models.api.nstSelectionRequest import NSTSelectionAPI +from apps.nsst.models.api.nsstSelectionRequest import NSSTSelectionAPI from apps.pci.models.api.pciOptimizationRequest import PCIOptimizationAPI from apps.nst.optimizers.nst_select_processor import NstSelection +from apps.nsst.optimizers.nsst_select_processor import NsstSelection from apps.pci.optimizers.pci_opt_processor import process_pci_optimation from apps.placement.models.api.placementRequest import PlacementAPI from apps.placement.optimizers.conductor.remote_opt_processor import process_placement_opt @@ -136,6 +138,19 @@ def do_nst_selection(): request_status="accepted", status_message="") +@app.route("/api/oof/v1/selection/nsst", methods=["POST"]) +def do_nsst_selection(): + request_json = request.get_json() + req_id = request_json['requestInfo']['requestId'] + audit_log.info(MH.received_request(request.url, request.remote_addr, json.dumps(request_json))) + NSSTSelectionAPI(request_json).validate() + audit_log.info(MH.new_worker_thread(req_id, "[for NSST selection]")) + nsst_selection = NsstSelection(osdf_config, request_json) + nsst_selection.start() + return req_accept(request_id=req_id, + transaction_id=request_json['requestInfo']['transactionId'], + request_status="accepted", status_message="") + @app.route("/api/oof/v1/pci", methods=["POST"]) @app.route("/api/oof/pci/v1", methods=["POST"]) @auth_basic.login_required |