Merge changes I02ddeb59,Ife231377

* changes:
  Change --protected to --is-protected in create
  Properly map boolean-like arguments to True/False
This commit is contained in:
Jenkins
2012-07-12 22:55:02 +00:00
committed by Gerrit Code Review

View File

@@ -102,7 +102,7 @@ def do_image_show(gc, args):
' store it in its configured image store.'))
@utils.arg('--public', action='store_true', default=False,
help='Make image accessible to the public.')
@utils.arg('--protected', action='store_true', default=False,
@utils.arg('--is-protected', type=utils.string_to_bool,
help='Prevent image from being deleted.')
@utils.arg('--property', metavar="<key=value>", action='append', default=[],
help=("Arbitrary property to associate with image. "
@@ -163,9 +163,9 @@ def do_image_create(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.'))
@utils.arg('--is-public', type=bool,
@utils.arg('--is-public', type=utils.string_to_bool,
help='Make image accessible to the public.')
@utils.arg('--is-protected', type=bool,
@utils.arg('--is-protected', type=utils.string_to_bool,
help='Prevent image from being deleted.')
@utils.arg('--property', metavar="<key=value>", action='append', default=[],
help=("Arbitrary property to associate with image. "