summaryrefslogtreecommitdiffstats
path: root/docker/storperf-master/storperf/test_executor.py
diff options
context:
space:
mode:
authorTaseer Ahmed <taseer94@gmail.com>2017-09-22 00:41:37 +0500
committerTaseer Ahmed <taseer94@gmail.com>2017-09-27 10:17:35 +0500
commit551b2161cd4858699d9c8d92c10425f0870bb1b5 (patch)
treeb10b8ea56944c9adbc34a1d9b0d84cc9942503b6 /docker/storperf-master/storperf/test_executor.py
parent85f0bd5bfe83456a7e73fe12d2e3232c4f58e35b (diff)
Returns job id and status
- If the user GETs for job without ID and type status, return all jobs along with status JIRA: STORPERF-213 Change-Id: I5518acae45f259644c961c6dc9f0cb170b86b6e1 Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
Diffstat (limited to 'docker/storperf-master/storperf/test_executor.py')
-rw-r--r--docker/storperf-master/storperf/test_executor.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/docker/storperf-master/storperf/test_executor.py b/docker/storperf-master/storperf/test_executor.py
index 4c2c972..629ae15 100644
--- a/docker/storperf-master/storperf/test_executor.py
+++ b/docker/storperf-master/storperf/test_executor.py
@@ -219,9 +219,18 @@ class TestExecutor(object):
if self.job_db.job_id == job_id and self._terminated is False:
status = "Running"
- result['Status'] = status
- result['Workloads'] = self.workload_status
- result['TestResultURL'] = self.result_url
+ result['Status'] = status
+ result['Workloads'] = self.workload_status
+ result['TestResultURL'] = self.result_url
+
+ else:
+ jobs = self.job_db.fetch_jobs()
+ self.logger.info("Jobs")
+ self.logger.info(jobs)
+ for job in jobs:
+ if self.job_db.job_id == job_id and self._terminated is False:
+ status = "Running"
+ result[job] = status
return result