diff options
author | Brian Waldon <bcwaldon@gmail.com> | 2012-07-09 15:18:44 -0700 |
---|---|---|
committer | Brian Waldon <bcwaldon@gmail.com> | 2012-07-09 15:25:10 -0700 |
commit | 0e8ab72357b5caf9850a6a49eda718311cefe269 (patch) | |
tree | ceee66710982514f871123fc2f3321b31f9c1bce /glanceclient/v1/shell.py | |
parent | 88a039488bcaa9e06f7eee0fada123ae24b5ba4a (diff) | |
download | python-glanceclient-0e8ab72357b5caf9850a6a49eda718311cefe269.tar.gz |
Add --file to image-update and correct bad name
* Add the --file option to the image-update action, as it was left out
of a previous patch
* Additionally, change a bad reference (args.fields) to args.file
* Fix bug 1022750
Change-Id: Idde127ec3f138f718d671b2133d50debec26236e
Diffstat (limited to 'glanceclient/v1/shell.py')
-rw-r--r-- | glanceclient/v1/shell.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/glanceclient/v1/shell.py b/glanceclient/v1/shell.py index d1e456e..b428975 100644 --- a/glanceclient/v1/shell.py +++ b/glanceclient/v1/shell.py @@ -92,8 +92,8 @@ def do_image_show(gc, args): ' you would specify \'file:///usr/share/image.tar.gz\'.')) @utils.arg('--file', metavar='<FILE>', help=('Local file that contains disk image to be uploaded during' - ' creation or update. Alternatively, images can be passed to' - ' the client via stdin.')) + ' creation. Alternatively, images can be passed to the client' + ' via stdin.')) @utils.arg('--checksum', metavar='<CHECKSUM>', help='Hash of image data used Glance can use for verification.') @utils.arg('--copy-from', metavar='<IMAGE_URL>', @@ -153,6 +153,10 @@ def do_image_create(gc, args): ' For example, if the image data is stored in the filesystem' ' local to the glance server at \'/usr/share/image.tar.gz\',' ' you would specify \'file:///usr/share/image.tar.gz\'.')) +@utils.arg('--file', metavar='<FILE>', + help=('Local file that contains disk image to be uploaded during' + ' update. Alternatively, images can be passed to the client' + ' via stdin.')) @utils.arg('--checksum', metavar='<CHECKSUM>', help='Hash of image data used Glance can use for verification.') @utils.arg('--copy-from', metavar='<IMAGE_URL>', @@ -183,7 +187,7 @@ def do_image_update(gc, args): fields = dict(filter(lambda x: x[0] in UPDATE_PARAMS, fields.items())) if 'location' not in fields and 'copy_from' not in fields: - if args.fields: + if args.file: fields['data'] = open(args.file, 'r') else: fields['data'] = sys.stdin |