Multi-threaded HTTP Support 11/36811/2
authormbeierl <mark.beierl@dell.com>
Sat, 1 Jul 2017 02:30:02 +0000 (22:30 -0400)
committermbeierl <mark.beierl@dell.com>
Tue, 4 Jul 2017 16:19:47 +0000 (12:19 -0400)
Adds multithreaded HTTP request abilities to ReST Server.
Fixes docker-compose to ensure pull prior to up.
Fixes metrics typo to make jobs API query work again.

Change-Id: Ibac6188379cae0489792c5ea80f37dd3abf37082
JIRA: STORPERF-183
Signed-off-by: mbeierl <mark.beierl@dell.com>
ci/launch_docker_container.sh
docker-compose/nginx.conf
rest_server.py

index 2dfde93..4f4e38b 100755 (executable)
@@ -23,7 +23,8 @@ then
     sudo chown 33:33 ${ci}/job/carbon
 fi
 
-docker-compose -f ../docker-compose/docker-compose.yaml up -d
+docker-compose pull
+docker-compose up -d
 
 echo "Waiting for StorPerf to become active"
 curl -X GET 'http://127.0.0.1:5000/api/v1.0/configurations' > test.html 2>&1
index b7933ac..6771358 100644 (file)
@@ -20,6 +20,11 @@ http {
             proxy_set_header Host $host:$proxy_port;
         }
 
+        location /graphite/ {
+            proxy_pass http://storperf:8000;
+            proxy_set_header Host $host:$proxy_port;
+        }
+
         location /swagger/ {
             if ($containsurl = 0) {
                 return 302 $scheme://$host:$server_port$uri?url=http://$host:$server_port/api/spec.json$args;
index dcf6be5..27a8453 100644 (file)
@@ -188,8 +188,8 @@ class Job(Resource):
     def get(self):
 
         metrics_type = "metrics"
-        if request.args.get('metrics_type'):
-            metrics_type = request.args.get('metrics_type')
+        if request.args.get('type'):
+            metrics_type = request.args.get('type')
 
         workload_id = request.args.get('id')
 
@@ -338,4 +338,4 @@ if __name__ == "__main__":
     setup_logging()
     logging.getLogger("storperf").setLevel(logging.DEBUG)
 
-    app.run(host='0.0.0.0', debug=True)
+    app.run(host='0.0.0.0', debug=True, threaded=True)