diff options
author | Mark Beierl <mark.beierl@dell.com> | 2017-09-28 14:30:50 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-28 14:30:50 +0000 |
commit | f38586641a6528fd0165c1146a164622853b6ac9 (patch) | |
tree | bcecfaf2abc5bb7d8bb246421617345216d2840c /docker/storperf-master/rest_server.py | |
parent | c0571183df86501bb626079b40a36a0d06e6e4f1 (diff) | |
parent | 551b2161cd4858699d9c8d92c10425f0870bb1b5 (diff) |
Merge "Returns job id and status"
Diffstat (limited to 'docker/storperf-master/rest_server.py')
-rw-r--r-- | docker/storperf-master/rest_server.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docker/storperf-master/rest_server.py b/docker/storperf-master/rest_server.py index 5be3fb4..7bcd650 100644 --- a/docker/storperf-master/rest_server.py +++ b/docker/storperf-master/rest_server.py @@ -280,11 +280,17 @@ class Job(Resource): if metrics_type == "status": return jsonify(storperf.fetch_job_status(workload_id)) + else: metrics_type = None if request.args.get('type'): metrics_type = request.args.get('type') - return jsonify(storperf.fetch_all_jobs(metrics_type)) + + if metrics_type == "status": + return jsonify(storperf.fetch_job_status(workload_id)) + + else: + return jsonify(storperf.fetch_all_jobs(metrics_type)) @swagger.operation( parameters=[ |