summaryrefslogtreecommitdiffstats
path: root/osdfapp.py
diff options
context:
space:
mode:
Diffstat (limited to 'osdfapp.py')
-rwxr-xr-xosdfapp.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/osdfapp.py b/osdfapp.py
index 775beaf..536816d 100755
--- a/osdfapp.py
+++ b/osdfapp.py
@@ -31,7 +31,9 @@ from threading import Thread # for scaling up, may need celery with RabbitMQ or
from flask import request, g
from osdf.apps.baseapp import app, run_app
+from apps.nst.models.api.nstSelectionRequest import NSTSelectionAPI
from apps.pci.models.api.pciOptimizationRequest import PCIOptimizationAPI
+from apps.nst.optimizers.nst_select_processor import process_nst_selection
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
@@ -104,6 +106,13 @@ def do_route_calc():
response = RouteOpt().getRoute(request_json)
return response
+@app.route("/api/oof/v1/selection/nst", methods=["POST"])
+def do_nst_selection():
+ request_json = request.get_json()
+ req_id = request_json['requestInfo']['requestId']
+ NSTSelectionAPI(request_json).validate()
+ response = process_nst_selection(request_json, osdf_config)
+ return response
@app.route("/api/oof/v1/pci", methods=["POST"])
@app.route("/api/oof/pci/v1", methods=["POST"])