diff --git a/api-ref/source/samples/versions-index-response.json b/api-ref/source/samples/versions-index-response.json index 33c483fe..2c44512e 100644 --- a/api-ref/source/samples/versions-index-response.json +++ b/api-ref/source/samples/versions-index-response.json @@ -1,7 +1,7 @@ { "versions": [ { - "status": "SUPPORTED", + "status": "DEPRECATED", "updated": "2015-08-27T11:33:21Z", "links": [ { diff --git a/manila/api/versions.py b/manila/api/versions.py index 3bfdb726..e4238ba6 100644 --- a/manila/api/versions.py +++ b/manila/api/versions.py @@ -40,7 +40,7 @@ _MEDIA_TYPES = [{ _KNOWN_VERSIONS = { 'v1.0': { 'id': 'v1.0', - 'status': 'SUPPORTED', + 'status': 'DEPRECATED', 'version': '', 'min_version': '', 'updated': '2015-08-27T11:33:21Z', diff --git a/manila/tests/api/test_versions.py b/manila/tests/api/test_versions.py index c8b59a14..c36623f4 100644 --- a/manila/tests/api/test_versions.py +++ b/manila/tests/api/test_versions.py @@ -56,12 +56,14 @@ class VersionsControllerTestCase(test.TestCase): v1 = [v for v in version_list if v['id'] == 'v1.0'][0] self.assertEqual('', v1.get('min_version')) self.assertEqual('', v1.get('version')) + self.assertEqual('DEPRECATED', v1.get('status')) v2 = [v for v in version_list if v['id'] == 'v2.0'][0] self.assertEqual(api_version_request._MIN_API_VERSION, v2.get('min_version')) self.assertEqual(api_version_request._MAX_API_VERSION, v2.get('version')) + self.assertEqual('CURRENT', v2.get('status')) @ddt.data('1.0', '1.1', @@ -84,6 +86,7 @@ class VersionsControllerTestCase(test.TestCase): self.assertEqual(version_header_name, response.headers['Vary']) self.assertEqual('', version_list[0].get('min_version')) self.assertEqual('', version_list[0].get('version')) + self.assertEqual('DEPRECATED', version_list[0].get('status')) @ddt.data(api_version_request._MIN_API_VERSION, api_version_request._MAX_API_VERSION) diff --git a/releasenotes/notes/api-versions-mark-v1-deprecated-3540d39279fbd60e.yaml b/releasenotes/notes/api-versions-mark-v1-deprecated-3540d39279fbd60e.yaml new file mode 100644 index 00000000..c08b62bc --- /dev/null +++ b/releasenotes/notes/api-versions-mark-v1-deprecated-3540d39279fbd60e.yaml @@ -0,0 +1,11 @@ +--- +deprecations: + - Deprecation of the manila v1 API was announced in the mitaka release. + The versions response from the API has been fixed to state that this + version has been deprecated. If you are using v1 API, consider switching + to the v2 API to take advantage of newer features. v2 API has support for + 'microversions'. Any endpoint on the v2 API can be requested with the HTTP header + 'X-OpenStack-Manila-API-Version' and providing a value '2.x', where '2' is the + major version and 'x' is the minor (or 'micro') version. To continue exploiting + feature functionality that was part of the v1 API, you may use the v2 API with + the microverison '2.0', which is behaviourally identical to the v1 API.