Improve style of zun pull

The current style:
  $ zun help pull
  usage: zun pull <repo>

  Pull an image.

  Positional arguments:
    <repo> Image repository

To change it as following:

  $ zun help pull
  usage: zun pull <image>

  Pull an image.

  Positional arguments:
    <image> Name of the image

Change-Id: I37e825e79ff21cf4f5b1315fb6156606c4184782
Closes-Bug: #1692598
This commit is contained in:
Feng Shengqin 2017-05-23 10:18:57 +08:00
parent 1f2d5face8
commit 82a696688c

View File

@ -18,13 +18,13 @@ def _show_image(image):
utils.print_dict(image._info)
@utils.arg('repo',
metavar='<repo>',
help='Image repository')
@utils.arg('image',
metavar='<image>',
help='Name of the image')
def do_pull(cs, args):
"""Pull an image."""
opts = {}
opts['repo'] = args.repo
opts['repo'] = args.image
_show_image(cs.images.create(**opts))