Bump Imges API version to 2.7
This API version bump contains the extensions for hidden images and multihash feature support. Change-Id: I3d394b344492a1f06a4999a3f61cecf5ace30f23
This commit is contained in:
parent
0b24dbd620
commit
8e16e41f4d
|
@ -1,5 +1,15 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"id": "v2.7",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://glance.openstack.example.org/v2/",
|
||||
"rel": "self"
|
||||
}
|
||||
],
|
||||
"status": "CURRENT"
|
||||
},
|
||||
{
|
||||
"id": "v2.6",
|
||||
"links": [
|
||||
|
@ -8,7 +18,7 @@
|
|||
"rel": "self"
|
||||
}
|
||||
],
|
||||
"status": "CURRENT"
|
||||
"status": "SUPPORTED"
|
||||
},
|
||||
{
|
||||
"id": "v2.5",
|
||||
|
|
|
@ -81,6 +81,7 @@ class VersionNegotiationFilter(wsgi.Middleware):
|
|||
allowed_versions['v2.4'] = 2
|
||||
allowed_versions['v2.5'] = 2
|
||||
allowed_versions['v2.6'] = 2
|
||||
allowed_versions['v2.7'] = 2
|
||||
return allowed_versions
|
||||
|
||||
def _match_version_string(self, subject):
|
||||
|
|
|
@ -74,7 +74,8 @@ class Controller(object):
|
|||
version_objs = []
|
||||
if CONF.enable_v2_api:
|
||||
version_objs.extend([
|
||||
build_version_object(2.6, 'v2', 'CURRENT'),
|
||||
build_version_object(2.7, 'v2', 'CURRENT'),
|
||||
build_version_object(2.6, 'v2', 'SUPPORTED'),
|
||||
build_version_object(2.5, 'v2', 'SUPPORTED'),
|
||||
build_version_object(2.4, 'v2', 'SUPPORTED'),
|
||||
build_version_object(2.3, 'v2', 'SUPPORTED'),
|
||||
|
|
|
@ -27,10 +27,15 @@ def _generate_v2_versions(url):
|
|||
version_list = []
|
||||
version_list.extend([
|
||||
{
|
||||
'id': 'v2.6',
|
||||
'id': 'v2.7',
|
||||
'status': 'CURRENT',
|
||||
'links': [{'rel': 'self', 'href': url % '2'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.6',
|
||||
'status': 'SUPPORTED',
|
||||
'links': [{'rel': 'self', 'href': url % '2'}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.5',
|
||||
'status': 'SUPPORTED',
|
||||
|
|
|
@ -30,11 +30,17 @@ class VersionsTest(base.IsolatedUnitTest):
|
|||
def _get_versions_list(self, url):
|
||||
versions = [
|
||||
{
|
||||
'id': 'v2.6',
|
||||
'id': 'v2.7',
|
||||
'status': 'CURRENT',
|
||||
'links': [{'rel': 'self',
|
||||
'href': '%s/v2/' % url}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.6',
|
||||
'status': 'SUPPORTED',
|
||||
'links': [{'rel': 'self',
|
||||
'href': '%s/v2/' % url}],
|
||||
},
|
||||
{
|
||||
'id': 'v2.5',
|
||||
'status': 'SUPPORTED',
|
||||
|
@ -170,8 +176,13 @@ class VersionNegotiationTest(base.IsolatedUnitTest):
|
|||
self.middleware.process_request(request)
|
||||
self.assertEqual('/v2/images', request.path_info)
|
||||
|
||||
def test_request_url_v2_7_unsupported(self):
|
||||
def test_request_url_v2_7(self):
|
||||
request = webob.Request.blank('/v2.7/images')
|
||||
self.middleware.process_request(request)
|
||||
self.assertEqual('/v2/images', request.path_info)
|
||||
|
||||
def test_request_url_v2_8_unsupported(self):
|
||||
request = webob.Request.blank('/v2.8/images')
|
||||
resp = self.middleware.process_request(request)
|
||||
self.assertIsInstance(resp, versions.Controller)
|
||||
|
||||
|
|
Loading…
Reference in New Issue