diff options
| author | Zuul <zuul@review.openstack.org> | 2018-08-07 14:45:27 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2018-08-07 14:45:27 +0000 |
| commit | 8e3eef2946f37e52d5d63cb5667b720ab4678a0d (patch) | |
| tree | 20a50554d9a17c22f79d6f18f0bda3cfc20448b6 /openstackclient/volume | |
| parent | 2b62b6e6ecb5fbb6d3078a3f7737364e13ec4e6c (diff) | |
| parent | def83a0e94de2f98e3bd68ee412c0f0a2c316f32 (diff) | |
| download | python-openstackclient-8e3eef2946f37e52d5d63cb5667b720ab4678a0d.tar.gz | |
Merge "Fix broken gate jobs"
Diffstat (limited to 'openstackclient/volume')
| -rw-r--r-- | openstackclient/volume/v2/volume.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/openstackclient/volume/v2/volume.py b/openstackclient/volume/v2/volume.py index ee3d2f20..fc648cef 100644 --- a/openstackclient/volume/v2/volume.py +++ b/openstackclient/volume/v2/volume.py @@ -14,6 +14,7 @@ """Volume V2 Volume action implementations""" +import argparse import copy import logging @@ -37,7 +38,7 @@ def _check_size_arg(args): volume is not specified. """ - if ((args.snapshot or args.source or args.source_replicated) + if ((args.snapshot or args.source) is None and args.size is None): msg = _("--size is a required option if snapshot " "or source volume is not specified.") @@ -59,7 +60,7 @@ class CreateVolume(command.ShowOne): metavar="<size>", type=int, help=_("Volume size in GB (Required unless --snapshot or " - "--source or --source-replicated is specified)"), + "--source is specified)"), ) parser.add_argument( "--type", @@ -85,7 +86,7 @@ class CreateVolume(command.ShowOne): source_group.add_argument( "--source-replicated", metavar="<replicated-volume>", - help=_("Replicated volume to clone (name or ID)"), + help=argparse.SUPPRESS, ) parser.add_argument( "--description", @@ -168,12 +169,6 @@ class CreateVolume(command.ShowOne): volume_client.volumes, parsed_args.source).id - replicated_source_volume = None - if parsed_args.source_replicated: - replicated_source_volume = utils.find_resource( - volume_client.volumes, - parsed_args.source_replicated).id - consistency_group = None if parsed_args.consistency_group: consistency_group = utils.find_resource( @@ -227,7 +222,6 @@ class CreateVolume(command.ShowOne): imageRef=image, source_volid=source_volume, consistencygroup_id=consistency_group, - source_replica=replicated_source_volume, multiattach=parsed_args.multi_attach, scheduler_hints=parsed_args.hint, ) |
