From e76e10c0bac9cf87c564a7f0201df189f7cd8b52 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Tue, 23 Oct 2018 11:34:07 -0500 Subject: Remove deprecated volume commands and args The following were deprecated over two years ago and can now be removed: * Remove ``backup`` commands in favor of ``volume backup`` * Remove ``snapshot`` commands in favor of ``volume snapshot`` * Remove ``volume create`` options ``--project``, ``--user`` and ``--multi-attach`` * Use of an auth-key positional argument in volume transfers * ``volume transfer request`` no longer accepts 'auth_key' as a positional arg, ``--auth-key`` is now required Internal (non-user-visible) * Rename backup.py to volume_backup.py for Volume v1 and v2, update tests These are backwards incompatible changes and will require a major version bump after they are merged. Change-Id: I94aa7a9824e44f9585ffb45e5e7637b9588539b4 Signed-off-by: Sean McGinnis Signed-off-by: Dean Troyer --- .../volume/v2/volume_transfer_request.py | 23 +--------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'openstackclient/volume/v2/volume_transfer_request.py') diff --git a/openstackclient/volume/v2/volume_transfer_request.py b/openstackclient/volume/v2/volume_transfer_request.py index 2f531dc8..4c4741bc 100644 --- a/openstackclient/volume/v2/volume_transfer_request.py +++ b/openstackclient/volume/v2/volume_transfer_request.py @@ -14,7 +14,6 @@ """Volume v2 transfer action implementations""" -import argparse import logging from osc_lib.command import command @@ -38,15 +37,10 @@ class AcceptTransferRequest(command.ShowOne): metavar="", help=_('Volume transfer request to accept (ID only)'), ) - parser.add_argument( - 'old_auth_key', - metavar="", - nargs="?", - help=argparse.SUPPRESS, - ) parser.add_argument( '--auth-key', metavar="", + required=True, help=_('Volume transfer request authentication key'), ) return parser @@ -64,21 +58,6 @@ class AcceptTransferRequest(command.ShowOne): # move on and attempt with the user-supplied information transfer_request_id = parsed_args.transfer_request - # Remain backward-compatible for the previous command layout - # TODO(dtroyer): Remove this back-compat in 4.0 or Oct 2017 - if not parsed_args.auth_key: - if parsed_args.old_auth_key: - # Move the old one into the correct place - parsed_args.auth_key = parsed_args.old_auth_key - self.log.warning(_( - 'Specifying the auth-key as a positional argument ' - 'has been deprecated. Please use the --auth-key ' - 'option in the future.' - )) - else: - msg = _("argument --auth-key is required") - raise exceptions.CommandError(msg) - transfer_accept = volume_client.transfers.accept( transfer_request_id, parsed_args.auth_key, -- cgit v1.2.1