Skip to content

Commit

Permalink
Remove replication v1 support
Browse files Browse the repository at this point in the history
The replication v1 implementation in Cinder was deprecated in the Mitaka
release in favor of the v2 "Cheesecake" version. Support was kept in the
client for backwards compatibility, but it has now been several releases
and these options should be removed.

Closes-bug: #1705470

Change-Id: I978a39a552fffc9ac7ba6e4726d1df2072fa45ba
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
  • Loading branch information
stmcginnis committed Jul 26, 2018
1 parent 8d56668 commit 32251f0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
7 changes: 1 addition & 6 deletions cinderclient/v2/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
Expand Down Expand Up @@ -240,10 +240,6 @@ def __call__(self, parser, args, values, option_string=None):
help='Creates volume from volume ID. Default=None.')
@utils.arg('--source_volid',
help=argparse.SUPPRESS)
@utils.arg('--source-replica',
metavar='<source-replica>',
default=None,
help='Creates volume from replicated volume ID. Default=None.')
@utils.arg('--image-id',
metavar='<image-id>',
default=None,
Expand Down Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions cinderclient/v2/volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def create(self, size, consistencygroup_id=None,
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
Expand All @@ -257,7 +257,6 @@ def create(self, size, consistencygroup_id=None,
: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
Expand Down
5 changes: 0 additions & 5 deletions cinderclient/v3/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='<source-replica>',
default=None,
help='Creates volume from replicated volume ID. Default=None.')
@utils.arg('--image-id',
metavar='<image-id>',
default=None,
Expand Down Expand Up @@ -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)

Expand Down
3 changes: 1 addition & 2 deletions cinderclient/v3/volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def create(self, size, consistencygroup_id=None,
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
Expand All @@ -93,7 +93,6 @@ def create(self, size, consistencygroup_id=None,
: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
Expand Down
7 changes: 7 additions & 0 deletions releasenotes/notes/remove-replv1-cabf2194edb9d963.yaml
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 32251f0

Please sign in to comment.