From c31be0f68bb825412548c28b017402f9358768af Mon Sep 17 00:00:00 2001 From: Matthew Farrellee Date: Wed, 22 Jan 2014 14:49:38 -0500 Subject: [PATCH] Add job-template-show to CLI Change-Id: I86d8d2a465958ebafc4e68f0ae04053dcb20aa08 Implements: blueprint python-savanaclient-cli --- savannaclient/api/shell.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/savannaclient/api/shell.py b/savannaclient/api/shell.py index 9103cac6..30fe5fb0 100644 --- a/savannaclient/api/shell.py +++ b/savannaclient/api/shell.py @@ -545,7 +545,7 @@ def do_job_binary_delete(cs, args): # ~~~~ # job-template-list # -# TODO(mattf): job-template-show --name |--id +# job-template-show --name |--id # # TODO(mattf): job-template-create --name # --type @@ -560,3 +560,14 @@ def do_job_template_list(cs, args): templates = cs.jobs.list() columns = ('id', 'name', 'description') utils.print_list(templates, columns) + + +@utils.arg('--id', + required=True, + help='Id of a job template') +# TODO(mattf): --name +def do_job_template_show(cs, args): + """Show details of a job template.""" + template = cs.jobs.get(args.id) + # TODO(mattf): Make "mains" property pretty + utils.print_dict(template._info)