Merge "Mark 'v1' API deprecated in the versions response"

This commit is contained in:
Jenkins 2017-01-28 22:26:46 +00:00 committed by Gerrit Code Review
commit 76742b9ea6
4 changed files with 16 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{
"versions": [
{
"status": "SUPPORTED",
"status": "DEPRECATED",
"updated": "2015-08-27T11:33:21Z",
"links": [
{

View File

@ -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',

View File

@ -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)

View File

@ -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.