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
This commit is contained in:
Florian Haas
2012-11-24 11:22:41 +01:00
parent e1955434b7
commit c2ba627ec1
2 changed files with 3 additions and 1 deletions

View File

@@ -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

View File

@@ -140,6 +140,8 @@ def do_image_download(gc, args):
help='ID of image to reserve.')
@utils.arg('--name', metavar='<NAME>',
help='Name of image.')
@utils.arg('--store', metavar='<STORE>',
help='Store to upload image to.')
@utils.arg('--disk-format', metavar='<DISK_FORMAT>',
help='Disk format of image. ' + DISK_FORMATS)
@utils.arg('--container-format', metavar='<CONTAINER_FORMAT>',