summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShrenik <shrenik.jain@research.iiit.ac.in>2017-06-21 01:40:53 +0530
committerShrenik <shrenik.jain@research.iiit.ac.in>2017-06-21 02:41:26 +0530
commitf8b67cf03ecbd4d6ab1fd115ef155d4334df266a (patch)
tree043132935d6e74c5c9e3ab106b286e3da05b6565
parentaf509dd8e60b058a85e291fbcb4241c6ed0dba4f (diff)
Remove Swagger from Storperf
Remove Swagger module from Storperf Change-Id: Id491bb7ea1ddd55549d39ddbe4c7a7004d797a59 JIRA: STORPERF-129 Signed-off-by: Shrenik <shrenik.jain@research.iiit.ac.in>
-rw-r--r--docker/Dockerfile5
-rw-r--r--rest_server.py10
2 files changed, 3 insertions, 12 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index d587fc4..f1ec617 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -98,11 +98,6 @@ RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/storperf ${re
RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng
# Third party git fetches
-RUN git clone https://github.com/swagger-api/swagger-ui.git ${repos_dir}/swagger-ui
-RUN cd ${repos_dir}/swagger-ui && git checkout tags/v2.2.9
-RUN mkdir -p ${repos_dir}/storperf/storperf/resources/html/swagger
-RUN cp -r ${repos_dir}/swagger-ui/dist/* ${repos_dir}/storperf/storperf/resources/html/swagger
-RUN sed -i 's|url = "http://petstore.swagger.io/v2/swagger.json";|url = window.location.protocol+"//"+window.location.host+"/api/spec.json";|' ${repos_dir}/storperf/storperf/resources/html/swagger/index.html
RUN git clone http://git.kernel.dk/fio.git ${repos_dir}/fio
RUN cd ${repos_dir}/fio && git checkout tags/fio-2.2.10
diff --git a/rest_server.py b/rest_server.py
index 8dffb11..67d71a5 100644
--- a/rest_server.py
+++ b/rest_server.py
@@ -10,14 +10,15 @@
import json
import logging.config
import os
-from storperf.storperf_master import StorPerfMaster
import sys
from flask import abort, Flask, request, jsonify, send_from_directory
-from flask_cors import CORS, cross_origin
from flask_restful import Resource, Api, fields
from flask_restful_swagger import swagger
+from flask_cors import CORS
+from storperf.storperf_master import StorPerfMaster
+
app = Flask(__name__, static_url_path="")
CORS(app)
@@ -26,11 +27,6 @@ api = swagger.docs(Api(app), apiVersion='1.0')
storperf = StorPerfMaster()
-@app.route('/swagger/<path:path>')
-def send_swagger(path):
- return send_from_directory('storperf/resources/html/swagger', path)
-
-
@swagger.model
class ConfigurationRequestModel:
resource_fields = {