'--public' ignored on image create

Currently, if '--public' is specified, an image is created but
it is not marked as public:

$ glance image-create --public --name minus-minus-public --disk-format raw \
 --container-format bare < /etc/fstab
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
.
.
.
| is_public        | False                                |
.
.
.
+------------------+--------------------------------------+

This is inconsistent.

'--public' has been deprecated for some time, and has
been removed from devstack (https://review.openstack.org/#/c/39323/),
so we can finally get rid of it.

We now raise the standard error for unsupported arguments.

Change-Id: I15d16f690f9bd92b4cefbc8ed36ed2d171ff22f3
Closes-bug: #1378844
This commit is contained in:
Stuart McLaren
2014-10-08 13:44:58 +00:00
parent a23a364e29
commit 597da8aa55

View File

@@ -15,7 +15,6 @@
from __future__ import print_function from __future__ import print_function
import argparse
import copy import copy
import six import six
import sys import sys
@@ -188,10 +187,6 @@ def do_image_download(gc, args):
help=('Similar to \'--location\' in usage, but this indicates that' help=('Similar to \'--location\' in usage, but this indicates that'
' the Glance server should immediately copy the data and' ' the Glance server should immediately copy the data and'
' store it in its configured image store.')) ' store it in its configured image store.'))
#NOTE(bcwaldon): This will be removed once devstack is updated
# to use --is-public
@utils.arg('--public', action='store_true', default=False,
help=argparse.SUPPRESS)
@utils.arg('--is-public', @utils.arg('--is-public',
type=strutils.bool_from_string, metavar='{True,False}', type=strutils.bool_from_string, metavar='{True,False}',
help='Make image accessible to the public.') help='Make image accessible to the public.')