diff options
author | Dean Troyer <dtroyer@gmail.com> | 2013-08-19 19:04:17 +0000 |
---|---|---|
committer | Dean Troyer <dtroyer@gmail.com> | 2013-08-19 14:46:28 -0500 |
commit | 53d3a0e129d085b3cb21e8827b321132f3b5f48e (patch) | |
tree | 60febcce8e0564befc63d046c45b8cb374ee9253 | |
parent | 20bd548d71097ca96d4e9f841ff68547e477323d (diff) | |
download | python-glanceclient-53d3a0e129d085b3cb21e8827b321132f3b5f48e.tar.gz |
Revert "removed deprecated parameter --public"
While trunk devstack was updated for this, stable/folsom and stable/grizzly
are not and grenade is now broken. I'm not sure how long --public was
undocumented but it may be that certain cli args may need to remain deprecated
but supported for longer than we wish.
This reverts commit ce8636b6b3c4b606483cfb2bc405d86224f309bc
Change-Id: I91d4884e470c8fcc611dae62a30fa22d08dbec03
-rw-r--r-- | glanceclient/v1/shell.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/glanceclient/v1/shell.py b/glanceclient/v1/shell.py index 3da0431..31c507b 100644 --- a/glanceclient/v1/shell.py +++ b/glanceclient/v1/shell.py @@ -13,6 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. +import argparse import copy import os import sys @@ -210,6 +211,10 @@ def do_image_download(gc, args): help=('Similar to \'--location\' in usage, but this indicates that' ' the Glance server should immediately copy the data and' ' 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', type=utils.string_to_bool, metavar='[True|False]', help='Make image accessible to the public.') @utils.arg('--is-protected', type=utils.string_to_bool, metavar='[True|False]', @@ -226,7 +231,7 @@ def do_image_create(gc, args): # Filter out None values fields = dict(filter(lambda x: x[1] is not None, vars(args).items())) - fields['is_public'] = fields.get('is_public') + fields['is_public'] = fields.get('is_public') or fields.pop('public') if 'is_protected' in fields: fields['protected'] = fields.pop('is_protected') |