Remove support for --link-check-limit

This was added after 2.27.0 and deprecated before 2.28.0; let's just
remove it.

Change-Id: Icb17346b70714cc318b216586326cd57ee27150d
This commit is contained in:
Tim Burke 2021-07-14 14:57:08 -07:00
parent a5fc6a8211
commit 02dd0187e9
2 changed files with 0 additions and 12 deletions

View File

@ -784,11 +784,6 @@ def main(args):
help='Set log file name. Ignored if using conf_file.')
parser.add_argument('--debug', default=False, action='store_true',
help='Enable debug mode')
# --link-check-limit is no longer used but allowed on the command line to
# avoid errors after upgrade
parser.add_argument('--link-check-limit', type=non_negative_int,
default=None, dest='link_check_limit',
help=argparse.SUPPRESS)
args = parser.parse_args(args)
hubs.use_hub(get_hub())
@ -812,9 +807,6 @@ def main(args):
filename=args.logfile)
logger = logging.getLogger()
if args.link_check_limit is not None:
logger.warning('--link-check-limit option is ignored, deprecated and '
'will be removed in a future version')
conf.update({
'swift_dir': args.swift_dir or conf.get('swift_dir', '/etc/swift'),
'devices': args.devices or conf.get('devices', '/srv/node'),

View File

@ -582,7 +582,6 @@ class TestRelinker(unittest.TestCase):
'--skip-mount-check', '--files-per-second', '2.2',
'--policy', '1', '--partition', '123',
'--partition', '123', '--partition', '456',
'--link-check-limit', '3', # allowed but ignored
'--workers', '2',
'--stats-interval', '222',
])
@ -600,9 +599,6 @@ class TestRelinker(unittest.TestCase):
'recon_cache_path': '/var/cache/swift-foo',
'stats_interval': 222.0,
}, mock.ANY, ['sdx'], do_cleanup=False)
self.assertIn('--link-check-limit option is ignored, deprecated and '
'will be removed in a future version',
logger.get_lines_for_level('warning'))
with mock.patch('swift.cli.relinker.Relinker') as mock_relinker, \
mock.patch('logging.basicConfig') as mock_logging_config: