Merge "Bump minor API version"
This commit is contained in:
commit
b7c8936aa3
@ -24,6 +24,11 @@ Image Service Versions
|
||||
Version History
|
||||
***************
|
||||
|
||||
**Ocata changes**
|
||||
|
||||
- version 2.5 is CURRENT
|
||||
- version 2.4 is SUPPORTED
|
||||
|
||||
**Newton changes**
|
||||
|
||||
- version 2.4 is CURRENT
|
||||
|
@ -1,5 +1,15 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"id": "v2.5",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://glance.openstack.example.org/v2/",
|
||||
"rel": "self"
|
||||
}
|
||||
],
|
||||
"status": "CURRENT"
|
||||
},
|
||||
{
|
||||
"id": "v2.4",
|
||||
"links": [
|
||||
@ -8,7 +18,7 @@
|
||||
"rel": "self"
|
||||
}
|
||||
],
|
||||
"status": "CURRENT"
|
||||
"status": "SUPPORTED"
|
||||
},
|
||||
{
|
||||
"id": "v2.3",
|
||||
|
@ -84,6 +84,7 @@ class VersionNegotiationFilter(wsgi.Middleware):
|
||||
allowed_versions['v2.2'] = 2
|
||||
allowed_versions['v2.3'] = 2
|
||||
allowed_versions['v2.4'] = 2
|
||||
allowed_versions['v2.5'] = 2
|
||||
return allowed_versions
|
||||
|
||||
def _match_version_string(self, subject):
|
||||
|
@ -81,7 +81,8 @@ class Controller(object):
|
||||
version_objs = []
|
||||
if CONF.enable_v2_api:
|
||||
version_objs.extend([
|
||||
build_version_object(2.4, 'v2', 'CURRENT'),
|
||||
build_version_object(2.5, 'v2', 'CURRENT'),
|
||||
build_version_object(2.4, 'v2', 'SUPPORTED'),
|
||||
build_version_object(2.3, 'v2', 'SUPPORTED'),
|
||||
build_version_object(2.2, 'v2', 'SUPPORTED'),
|
||||
build_version_object(2.1, 'v2', 'SUPPORTED'),
|
||||
|
@ -33,10 +33,15 @@ class TestApiVersions(functional.FunctionalTest):
|
||||
url = 'http://127.0.0.1:%d/v%%s/' % self.api_port
|
||||
versions = {'versions': [
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'id': 'v2.5',
|
||||
'status': 'CURRENT',
|
||||
'links': [{'rel': 'self', 'href': url % '2'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'status': 'SUPPORTED',
|
||||
'links': [{'rel': 'self', 'href': url % '2'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.3',
|
||||
'status': 'SUPPORTED',
|
||||
@ -85,10 +90,15 @@ class TestApiVersions(functional.FunctionalTest):
|
||||
url = 'http://127.0.0.1:%d/v%%s/' % self.api_port
|
||||
versions = {'versions': [
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'id': 'v2.5',
|
||||
'status': 'CURRENT',
|
||||
'links': [{'rel': 'self', 'href': url % '2'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'status': 'SUPPORTED',
|
||||
'links': [{'rel': 'self', 'href': url % '2'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.3',
|
||||
'status': 'SUPPORTED',
|
||||
@ -155,10 +165,15 @@ class TestApiPaths(functional.FunctionalTest):
|
||||
url = 'http://127.0.0.1:%d/v%%s/' % self.api_port
|
||||
versions = {'versions': [
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'id': 'v2.5',
|
||||
'status': 'CURRENT',
|
||||
'links': [{'rel': 'self', 'href': url % '2'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'status': 'SUPPORTED',
|
||||
'links': [{'rel': 'self', 'href': url % '2'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.3',
|
||||
'status': 'SUPPORTED',
|
||||
|
@ -37,11 +37,17 @@ class VersionsTest(base.IsolatedUnitTest):
|
||||
results = jsonutils.loads(res.body)['versions']
|
||||
expected = [
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'id': 'v2.5',
|
||||
'status': 'CURRENT',
|
||||
'links': [{'rel': 'self',
|
||||
'href': 'http://127.0.0.1:9292/v2/'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'status': 'SUPPORTED',
|
||||
'links': [{'rel': 'self',
|
||||
'href': 'http://127.0.0.1:9292/v2/'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.3',
|
||||
'status': 'SUPPORTED',
|
||||
@ -92,11 +98,17 @@ class VersionsTest(base.IsolatedUnitTest):
|
||||
results = jsonutils.loads(res.body)['versions']
|
||||
expected = [
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'id': 'v2.5',
|
||||
'status': 'CURRENT',
|
||||
'links': [{'rel': 'self',
|
||||
'href': 'https://example.com:9292/v2/'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'status': 'SUPPORTED',
|
||||
'links': [{'rel': 'self',
|
||||
'href': 'https://example.com:9292/v2/'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.3',
|
||||
'status': 'SUPPORTED',
|
||||
@ -146,11 +158,17 @@ class VersionsTest(base.IsolatedUnitTest):
|
||||
results = jsonutils.loads(res.body)['versions']
|
||||
expected = [
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'id': 'v2.5',
|
||||
'status': 'CURRENT',
|
||||
'links': [{'rel': 'self',
|
||||
'href': 'http://localhost:9292/v2/'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'status': 'SUPPORTED',
|
||||
'links': [{'rel': 'self',
|
||||
'href': 'http://localhost:9292/v2/'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.3',
|
||||
'status': 'SUPPORTED',
|
||||
@ -201,11 +219,17 @@ class VersionsTest(base.IsolatedUnitTest):
|
||||
results = jsonutils.loads(res.body)['versions']
|
||||
expected = [
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'id': 'v2.5',
|
||||
'status': 'CURRENT',
|
||||
'links': [{'rel': 'self',
|
||||
'href': 'https://localhost:9292/v2/'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.4',
|
||||
'status': 'SUPPORTED',
|
||||
'links': [{'rel': 'self',
|
||||
'href': 'https://localhost:9292/v2/'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.3',
|
||||
'status': 'SUPPORTED',
|
||||
@ -303,8 +327,13 @@ class VersionNegotiationTest(base.IsolatedUnitTest):
|
||||
self.middleware.process_request(request)
|
||||
self.assertEqual('/v2/images', request.path_info)
|
||||
|
||||
def test_request_url_v2_5_unsupported(self):
|
||||
def test_request_url_v2_5(self):
|
||||
request = webob.Request.blank('/v2.5/images')
|
||||
self.middleware.process_request(request)
|
||||
self.assertEqual('/v2/images', request.path_info)
|
||||
|
||||
def test_request_url_v2_6_unsupported(self):
|
||||
request = webob.Request.blank('/v2.6/images')
|
||||
resp = self.middleware.process_request(request)
|
||||
self.assertIsInstance(resp, versions.Controller)
|
||||
|
||||
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
prelude: >
|
||||
- The *minor* version of the Images API v2 is bumped to **2.5**.
|
||||
upgrade:
|
||||
- |
|
||||
The **CURRENT** version of the version 2 Images API supplied
|
||||
by Glance is now **2.5**. Changes include:
|
||||
|
||||
* The 'visibility' enumeration has been increased from two values
|
||||
(``public``, ``private``) to four values (``public``, ``private``,
|
||||
``shared``, and ``community``).
|
||||
|
||||
* Formerly, it was possible to add members to an image whose
|
||||
visibility was ``private``, thereby creating a "shared" image.
|
||||
In this release, an image must have a visibility of ``shared``
|
||||
in order to accept member operations. Attempting to add a
|
||||
member to an image with a visibility of ``private`` will result
|
||||
in a 409 (Conflict) response.
|
Loading…
Reference in New Issue
Block a user