summaryrefslogtreecommitdiffstats
path: root/docker/storperf-master/rest_server.py
diff options
context:
space:
mode:
Diffstat (limited to 'docker/storperf-master/rest_server.py')
-rw-r--r--docker/storperf-master/rest_server.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/docker/storperf-master/rest_server.py b/docker/storperf-master/rest_server.py
index ef8975c..3df2856 100644
--- a/docker/storperf-master/rest_server.py
+++ b/docker/storperf-master/rest_server.py
@@ -194,14 +194,17 @@ class Job(Resource):
workload_id = request.args.get('id')
- if metrics_type == "metrics":
- return jsonify(storperf.fetch_results(workload_id))
+ if workload_id:
+ if metrics_type == "metrics":
+ return jsonify(storperf.fetch_results(workload_id))
- if metrics_type == "metadata":
- return jsonify(storperf.fetch_metadata(workload_id))
+ if metrics_type == "metadata":
+ return jsonify(storperf.fetch_metadata(workload_id))
- if metrics_type == "status":
- return jsonify(storperf.fetch_job_status(workload_id))
+ if metrics_type == "status":
+ return jsonify(storperf.fetch_job_status(workload_id))
+ else:
+ return jsonify({"job_ids": storperf.fetch_all_jobs()})
@swagger.operation(
parameters=[