Merge "Remove support for --link-check-limit"

This commit is contained in:
Zuul 2021-07-20 08:45:36 +00:00 committed by Gerrit Code Review
commit c89ed5afe4
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: