aboutsummaryrefslogtreecommitdiffstats
path: root/osdfapp.py
diff options
context:
space:
mode:
authorAleem Raja <aleem.raja@t-systems.com>2023-01-20 06:06:17 +0000
committerLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2023-02-15 21:46:51 +0000
commitdee386685502c63d64959e0f2324bf52440e9655 (patch)
tree8e307904fb6bcf9394cccd33c7ec4733bce1dd53 /osdfapp.py
parentcb795c01df747f872f5985ba318eefdddea57507 (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-xosdfapp.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/osdfapp.py b/osdfapp.py
index 28f9376..8b672f4 100755
--- a/osdfapp.py
+++ b/osdfapp.py
@@ -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