From c7f5f338afd25e21e10d0ae2d760fc922ac30cae Mon Sep 17 00:00:00 2001 From: Oleksiy Mishchenko <oleksiy@google.com> Date: Fri, 21 Nov 2008 15:55:25 +0000 Subject: [PATCH] RAPI: Cancel a job Reviewed-by: imsnah --- lib/rapi/rlib2.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/rapi/rlib2.py b/lib/rapi/rlib2.py index 66d837cd7..c71ceedca 100644 --- a/lib/rapi/rlib2.py +++ b/lib/rapi/rlib2.py @@ -77,6 +77,14 @@ class R_2_jobs_id(baserlib.R_Generic): result = luxi.Client().QueryJobs([job_id, ], fields)[0] return baserlib.MapFields(fields, result) + def DELETE(self): + """Cancel not-yet-started job. + + """ + job_id = self.items[0] + result = luxi.Client().CancelJob(job_id) + return result + class R_2_nodes(baserlib.R_Generic): """/2/nodes resource. -- GitLab