From 4baa108c04313f5922baa09d60579797afe0ac76 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 9 Jun 2025 10:01:50 +0100 Subject: [PATCH] api: Remove deprecated pipeline_factory This has been a no-op since 14.0.0 (Newton) nearly 10 years ago. Change-Id: I82715afe6a4d6db7505acdd4556776345681d034 Signed-off-by: Stephen Finucane --- nova/api/auth.py | 10 ---------- nova/tests/unit/api/test_auth.py | 8 -------- 2 files changed, 18 deletions(-) diff --git a/nova/api/auth.py b/nova/api/auth.py index 87c4a826dde0..31e625d394b5 100644 --- a/nova/api/auth.py +++ b/nova/api/auth.py @@ -41,16 +41,6 @@ def _load_pipeline(loader, pipeline): return app -def pipeline_factory(loader, global_conf, **local_conf): - """A paste pipeline replica that keys off of auth_strategy.""" - versionutils.report_deprecated_feature( - LOG, - "The legacy V2 API code tree has been removed in Newton. " - "Please remove legacy v2 API entry from api-paste.ini, and use " - "V2.1 API or V2.1 API compat mode instead" - ) - - def pipeline_factory_v21(loader, global_conf, **local_conf): """A paste pipeline replica that keys off of auth_strategy.""" auth_strategy = CONF.api.auth_strategy diff --git a/nova/tests/unit/api/test_auth.py b/nova/tests/unit/api/test_auth.py index 3bc5f51b04b6..01909a90c8e9 100644 --- a/nova/tests/unit/api/test_auth.py +++ b/nova/tests/unit/api/test_auth.py @@ -158,11 +158,3 @@ class TestPipeLineFactory(test.NoDBTestCase): TestPipeLineFactory.FakeLoader(), None, noauth2=fake_pipeline) self._test_pipeline(fake_pipeline, app) self.assertTrue(mock_report_deprecated.called) - - @mock.patch('oslo_log.versionutils.report_deprecated_feature') - def test_pipeline_factory_legacy_v2_deprecated(self, - mock_report_deprecated): - fake_pipeline = 'test1 test2 test3' - nova.api.auth.pipeline_factory(TestPipeLineFactory.FakeLoader(), - None, noauth2=fake_pipeline) - self.assertTrue(mock_report_deprecated.called)