diff --git a/glanceclient/v1/shell.py b/glanceclient/v1/shell.py index c521ea25..e131a08d 100644 --- a/glanceclient/v1/shell.py +++ b/glanceclient/v1/shell.py @@ -77,6 +77,17 @@ def do_image_show(gc, args): _image_show(image) +@utils.arg('--file', metavar='', + help='Local file to save downloaded image data to. ' + 'If this is not specified the image data will be ' + 'written to stdout.') +@utils.arg('id', metavar='', help='ID of image to download.') +def do_image_download(gc, args): + """Download a specific image.""" + body = gc.images.data(args.id) + utils.save_image(body, args.file) + + @utils.arg('--id', metavar='', help='ID of image to reserve.') @utils.arg('--name', metavar='',