From 0bbda887d282437796e57defbfad4d1994913f36 Mon Sep 17 00:00:00 2001 From: Matthew Farrellee Date: Wed, 22 Jan 2014 16:46:53 -0500 Subject: [PATCH] Add job-delete to CLI Change-Id: I6b61e814db648cbbd487b56978f9e45ed522719f Implements: blueprint python-savannaclient-cli --- savannaclient/api/shell.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/savannaclient/api/shell.py b/savannaclient/api/shell.py index 07e5bb44..c8058be6 100644 --- a/savannaclient/api/shell.py +++ b/savannaclient/api/shell.py @@ -596,7 +596,7 @@ def do_job_template_delete(cs, args): # NB: Optional job_configs # NB: POST /jobs/{job_template_id}/execute # -# TODO(mattf): job-delete --name |--id +# job-delete --name |--id # def do_job_list(cs, args): @@ -620,3 +620,13 @@ def do_job_show(cs, args): job._info['status'] = job._info['info']['status'] del job._info['info'] utils.print_dict(job._info) + + +@utils.arg('--id', + required=True, + help='Id of a job') +# TODO(mattf): --name , which is cluster name +def do_job_delete(cs, args): + """Delete a job.""" + cs.job_executions.delete(args.id) + # TODO(mattf): No indication of result