diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py index acd0338cd7d3..bbaf74d20de0 100644 --- a/nova/api/openstack/auth.py +++ b/nova/api/openstack/auth.py @@ -74,7 +74,7 @@ class NoAuthMiddleware(NoAuthMiddlewareBase): return self.base_call(req, True, always_admin=False) -class NoAuthMiddlewareV2_17(NoAuthMiddlewareBase): +class NoAuthMiddlewareV2_18(NoAuthMiddlewareBase): """Return a fake token if one isn't specified. This provides a version of the middleware which does not add diff --git a/nova/tests/functional/api_paste_fixture.py b/nova/tests/functional/api_paste_fixture.py index 5dfa4848a2e7..3dd4d16061e3 100644 --- a/nova/tests/functional/api_paste_fixture.py +++ b/nova/tests/functional/api_paste_fixture.py @@ -63,5 +63,5 @@ class ApiPasteNoProjectId(ApiPasteV21Fixture): "paste.filter_factory = nova.api.openstack.auth:" "NoAuthMiddleware.factory", "paste.filter_factory = nova.api.openstack.auth:" - "NoAuthMiddlewareV2_17.factory") + "NoAuthMiddlewareV2_18.factory") target_file.write(line) diff --git a/nova/tests/functional/api_sample_tests/api_sample_base.py b/nova/tests/functional/api_sample_tests/api_sample_base.py index 92c6e2c597d6..d70a8ebbd9f5 100644 --- a/nova/tests/functional/api_sample_tests/api_sample_base.py +++ b/nova/tests/functional/api_sample_tests/api_sample_base.py @@ -84,7 +84,7 @@ class ApiSampleTestBaseV21(testscenarios.WithScenarios, '_legacy_v2_code': True, '_additional_fixtures': [ api_paste_fixture.ApiPasteLegacyV2Fixture]}), - # test v2.16 code without project id + # test v2.18 code without project id ('v2_1_noproject_id', { 'api_major_version': 'v2.1', '_project_id': False, diff --git a/nova/tests/unit/api/openstack/compute/test_auth.py b/nova/tests/unit/api/openstack/compute/test_auth.py index 928af29450e7..ae5c6552c42f 100644 --- a/nova/tests/unit/api/openstack/compute/test_auth.py +++ b/nova/tests/unit/api/openstack/compute/test_auth.py @@ -35,7 +35,7 @@ class TestNoAuthMiddleware(testscenarios.WithScenarios, test.NoDBTestCase): 'auth_middleware': auth.NoAuthMiddleware}), ('no_project_id', { 'expected_url': 'http://localhost/v2.1', - 'auth_middleware': auth.NoAuthMiddlewareV2_17}), + 'auth_middleware': auth.NoAuthMiddlewareV2_18}), ] def setUp(self): diff --git a/releasenotes/notes/optional_project_id-6aebf1cb394d498f.yaml b/releasenotes/notes/optional_project_id-6aebf1cb394d498f.yaml index 6bce851bb28e..94fb1335e556 100644 --- a/releasenotes/notes/optional_project_id-6aebf1cb394d498f.yaml +++ b/releasenotes/notes/optional_project_id-6aebf1cb394d498f.yaml @@ -1,7 +1,7 @@ --- features: - - Provides API 2.17, which makes the use of project_ids in API urls + - Provides API 2.18, which makes the use of project_ids in API urls optional. upgrade: