summaryrefslogtreecommitdiffstats
path: root/rest_server.py
diff options
context:
space:
mode:
authorMark Beierl <mark.beierl@emc.com>2016-05-20 09:30:46 -0400
committerMark Beierl <mark.beierl@emc.com>2016-05-20 09:30:46 -0400
commit68b1262791f4d0e0ea5cf7caa16678ea72307527 (patch)
treeef866936240e9d16ea521336ed9c9575887468cd /rest_server.py
parent3a179cd6fb3cc3358a2c78815e1a59f4ee68487b (diff)
Standardize the ReST API
Change-Id: I004824711abf17f06781302cf48a0b0e3d095ecb Signed-off-by: Mark Beierl <mark.beierl@emc.com>
Diffstat (limited to 'rest_server.py')
-rw-r--r--rest_server.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/rest_server.py b/rest_server.py
index 7578f41..390cb8c 100644
--- a/rest_server.py
+++ b/rest_server.py
@@ -7,6 +7,9 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+from storperf.db.job_db import JobDB
+from storperf.plot.barchart import Barchart
+from storperf.storperf_master import StorPerfMaster
import io
import json
import logging
@@ -15,11 +18,7 @@ import os
from flask import abort, Flask, request, jsonify, send_from_directory
from flask_restful import Resource, Api, fields
-
from flask_restful_swagger import swagger
-from storperf.db.job_db import JobDB
-from storperf.plot.barchart import Barchart
-from storperf.storperf_master import StorPerfMaster
app = Flask(__name__, static_url_path="")
@@ -421,9 +420,9 @@ def setup_logging(default_path='storperf/logging.json',
rootLogger.addHandler(socketHandler)
-api.add_resource(Configure, "/api/v1.0/configure")
-api.add_resource(Quota, "/api/v1.0/quota")
-api.add_resource(Job, "/api/v1.0/job")
+api.add_resource(Configure, "/api/v1.0/configurations")
+api.add_resource(Quota, "/api/v1.0/quotas")
+api.add_resource(Job, "/api/v1.0/jobs")
if __name__ == "__main__":
setup_logging()