Commit cf9ada49 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

RAPI client: Rename “DeleteJob” to “CancelJob”

Jobs can't be deleted, but cancelled (even though the HTTP method
“DELETE” is used).
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarDavid Knowles <>
parent cfc03c54
......@@ -760,8 +760,8 @@ class GanetiRapiClient(object):
return self._SendRequest(HTTP_GET, "/2/jobs/%d" % job_id, None, None)
def DeleteJob(self, job_id, dry_run=False):
"""Deletes a job.
def CancelJob(self, job_id, dry_run=False):
"""Cancels a job.
@type job_id: int
@param job_id: id of the job to delete
......@@ -324,10 +324,10 @@ class GanetiRapiClientTests(unittest.TestCase):
def testDeleteJob(self):
def testCancelJob(self):
self.rapi.AddResponse("[true, \"Job 123 will be canceled\"]")
self.assertEqual([True, "Job 123 will be canceled"],
self.client.DeleteJob(999, dry_run=True))
self.client.CancelJob(999, dry_run=True))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment