From c2ba627ec1425e307fb73cf1d28690eb85a161db Mon Sep 17 00:00:00 2001 From: Florian Haas Date: Sat, 24 Nov 2012 11:22:41 +0100 Subject: [PATCH] Allow setting x-image-meta-store through shell on image creation Add a command line arg "--store" to "glance image-create" so users can specify a store other than the default on image creation. Change-Id: Icf9a894b08e405d6884964b3cfaa80250e85ed71 --- glanceclient/v1/images.py | 2 +- glanceclient/v1/shell.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/glanceclient/v1/images.py b/glanceclient/v1/images.py index e8337322..4d7a97c5 100644 --- a/glanceclient/v1/images.py +++ b/glanceclient/v1/images.py @@ -30,7 +30,7 @@ UPDATE_PARAMS = ('name', 'disk_format', 'container_format', 'min_disk', # compatibility with the legacy client library 'deleted') -CREATE_PARAMS = UPDATE_PARAMS + ('id',) +CREATE_PARAMS = UPDATE_PARAMS + ('id', 'store') DEFAULT_PAGE_SIZE = 20 diff --git a/glanceclient/v1/shell.py b/glanceclient/v1/shell.py index 116fff00..ae6317a1 100644 --- a/glanceclient/v1/shell.py +++ b/glanceclient/v1/shell.py @@ -140,6 +140,8 @@ def do_image_download(gc, args): help='ID of image to reserve.') @utils.arg('--name', metavar='', help='Name of image.') +@utils.arg('--store', metavar='', + help='Store to upload image to.') @utils.arg('--disk-format', metavar='', help='Disk format of image. ' + DISK_FORMATS) @utils.arg('--container-format', metavar='',