Remove duplicate do_upload_to_image() method def

In cinderclient/v2/shell.py line348 and line1107, you can find the
same method defination: def do_upload_to_image(). It doesn't make
sense. So remove one of them.

Change-Id: I0b5f2bd0c935d75d873720c9bd38f8cefe31bb30
This commit is contained in:
lihaijing
2017-03-20 15:05:29 +08:00
parent 29d29a7cd4
commit bb912dee14

View File

@@ -345,47 +345,6 @@ def do_create(cs, args):
utils.print_dict(info)
@utils.arg('volume',
metavar='<volume>',
help='Name or ID of volume to snapshot.')
@utils.arg('--force',
metavar='<True|False>',
const=True,
nargs='?',
default=False,
help='Enables or disables upload of '
'a volume that is attached to an instance. '
'Default=False. '
'This option may not be supported by your cloud.')
@utils.arg('--container-format',
metavar='<container-format>',
default='bare',
help='Container format type. '
'Default is bare.')
@utils.arg('--container_format',
help=argparse.SUPPRESS)
@utils.arg('--disk-format',
metavar='<disk-format>',
default='raw',
help='Disk format type. '
'Default is raw.')
@utils.arg('--disk_format',
help=argparse.SUPPRESS)
@utils.arg('image_name',
metavar='<image-name>',
help='The new image name.')
@utils.arg('--image_name',
help=argparse.SUPPRESS)
def do_upload_to_image(cs, args):
"""Uploads volume to Image Service as an image."""
volume = utils.find_volume(cs, args.volume)
shell_utils.print_volume_image(
volume.upload_to_image(args.force,
args.image_name,
args.container_format,
args.disk_format))
@utils.arg('--cascade',
action='store_true',
default=False,