diff options
author | Vikas Varma <vikas.varma@att.com> | 2020-03-16 12:13:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-03-16 12:13:51 +0000 |
commit | bb6a43aeadc50bc5e0780c894fc756e7ee95ecf3 (patch) | |
tree | a085952b8b3ff77346fe26fad9018bedaebcb560 /osdfapp.py | |
parent | bfb0a45de2eaade4064c40d294fd56e89672d199 (diff) | |
parent | 5c8e0e4e54f8cfa3c1ec034ccb5b6f5c14eb0b50 (diff) |
Merge "take-1 for the NST selection function"
Diffstat (limited to 'osdfapp.py')
-rwxr-xr-x | osdfapp.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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"]) |