diff --git a/cinderclient/v2/shell.py b/cinderclient/v2/shell.py index 16412d813..88c79d4a4 100644 --- a/cinderclient/v2/shell.py +++ b/cinderclient/v2/shell.py @@ -208,7 +208,7 @@ def do_show(cs, args): class CheckSizeArgForCreate(argparse.Action): def __call__(self, parser, args, values, option_string=None): - if ((args.snapshot_id or args.source_volid or args.source_replica) + if ((args.snapshot_id or args.source_volid) is None and values is None): if not hasattr(args, 'backup_id') or args.backup_id is None: parser.error('Size is a required parameter if snapshot ' @@ -240,10 +240,6 @@ class CheckSizeArgForCreate(argparse.Action): help='Creates volume from volume ID. Default=None.') @utils.arg('--source_volid', help=argparse.SUPPRESS) -@utils.arg('--source-replica', - metavar='', - default=None, - help='Creates volume from replicated volume ID. Default=None.') @utils.arg('--image-id', metavar='', default=None, @@ -343,7 +339,6 @@ def do_create(cs, args): imageRef=image_ref, metadata=volume_metadata, scheduler_hints=hints, - source_replica=args.source_replica, multiattach=args.multiattach) info = dict() diff --git a/cinderclient/v2/volumes.py b/cinderclient/v2/volumes.py index d8365dfcf..18a6e250a 100644 --- a/cinderclient/v2/volumes.py +++ b/cinderclient/v2/volumes.py @@ -242,7 +242,7 @@ class VolumeManager(base.ManagerWithFind): volume_type=None, user_id=None, project_id=None, availability_zone=None, metadata=None, imageRef=None, scheduler_hints=None, - source_replica=None, multiattach=False): + multiattach=False): """Create a volume. :param size: Size of volume in GB @@ -257,7 +257,6 @@ class VolumeManager(base.ManagerWithFind): :param metadata: Optional metadata to set on volume creation :param imageRef: reference to an image stored in glance :param source_volid: ID of source volume to clone from - :param source_replica: ID of source volume to clone replica :param scheduler_hints: (optional extension) arbitrary key-value pairs specified by the client to help boot an instance :param multiattach: Allow the volume to be attached to more than diff --git a/cinderclient/v3/shell.py b/cinderclient/v3/shell.py index 1d4e18a06..e52378210 100644 --- a/cinderclient/v3/shell.py +++ b/cinderclient/v3/shell.py @@ -505,10 +505,6 @@ def do_reset_state(cs, args): help='Creates volume from volume ID. Default=None.') @utils.arg('--source_volid', help=argparse.SUPPRESS) -@utils.arg('--source-replica', - metavar='', - default=None, - help='Creates volume from replicated volume ID. Default=None.') @utils.arg('--image-id', metavar='', default=None, @@ -625,7 +621,6 @@ def do_create(cs, args): imageRef=image_ref, metadata=volume_metadata, scheduler_hints=hints, - source_replica=args.source_replica, multiattach=args.multiattach, backup_id=backup_id) diff --git a/cinderclient/v3/volumes.py b/cinderclient/v3/volumes.py index 90cf06650..33850a316 100644 --- a/cinderclient/v3/volumes.py +++ b/cinderclient/v3/volumes.py @@ -77,7 +77,7 @@ class VolumeManager(volumes.VolumeManager): volume_type=None, user_id=None, project_id=None, availability_zone=None, metadata=None, imageRef=None, scheduler_hints=None, - source_replica=None, multiattach=False, backup_id=None): + multiattach=False, backup_id=None): """Create a volume. :param size: Size of volume in GB @@ -93,7 +93,6 @@ class VolumeManager(volumes.VolumeManager): :param metadata: Optional metadata to set on volume creation :param imageRef: reference to an image stored in glance :param source_volid: ID of source volume to clone from - :param source_replica: ID of source volume to clone replica :param scheduler_hints: (optional extension) arbitrary key-value pairs specified by the client to help boot an instance :param multiattach: Allow the volume to be attached to more than diff --git a/releasenotes/notes/remove-replv1-cabf2194edb9d963.yaml b/releasenotes/notes/remove-replv1-cabf2194edb9d963.yaml new file mode 100644 index 000000000..28ad29677 --- /dev/null +++ b/releasenotes/notes/remove-replv1-cabf2194edb9d963.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + The volume creation argument ``--source-replica`` on the command line and + the ``source_replica`` kwarg for the ``create()`` call when using the + cinderclient library were for the replication v1 support that was removed + in the Mitaka release. These options have now been removed.