diff options
author | mbeierl <mark.beierl@dell.com> | 2017-06-30 22:30:02 -0400 |
---|---|---|
committer | mbeierl <mark.beierl@dell.com> | 2017-07-04 12:19:47 -0400 |
commit | e7b94bbe52fdb0cdb5a95c5657a2e207580aca86 (patch) | |
tree | 1a1912a4e97e4b93f61863ddaa12f36d8b6c398a | |
parent | 2c95b01efa53c7e7d4ea7d73fde0da6099938e50 (diff) |
Multi-threaded HTTP Support
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>
-rwxr-xr-x | ci/launch_docker_container.sh | 3 | ||||
-rw-r--r-- | docker-compose/nginx.conf | 5 | ||||
-rw-r--r-- | rest_server.py | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/ci/launch_docker_container.sh b/ci/launch_docker_container.sh index 2dfde93..4f4e38b 100755 --- a/ci/launch_docker_container.sh +++ b/ci/launch_docker_container.sh @@ -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 diff --git a/docker-compose/nginx.conf b/docker-compose/nginx.conf index b7933ac..6771358 100644 --- a/docker-compose/nginx.conf +++ b/docker-compose/nginx.conf @@ -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; diff --git a/rest_server.py b/rest_server.py index dcf6be5..27a8453 100644 --- a/rest_server.py +++ b/rest_server.py @@ -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) |