Merge "Add API version 2.8"
This commit is contained in:
commit
671cfed406
@ -1,5 +1,15 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"id": "v2.8",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://glance.openstack.example.org/v2/",
|
||||
"rel": "self"
|
||||
}
|
||||
],
|
||||
"status": "EXPERIMENTAL"
|
||||
},
|
||||
{
|
||||
"id": "v2.7",
|
||||
"links": [
|
||||
|
@ -82,6 +82,8 @@ class VersionNegotiationFilter(wsgi.Middleware):
|
||||
allowed_versions['v2.5'] = 2
|
||||
allowed_versions['v2.6'] = 2
|
||||
allowed_versions['v2.7'] = 2
|
||||
if CONF.enabled_backends:
|
||||
allowed_versions['v2.8'] = 2
|
||||
return allowed_versions
|
||||
|
||||
def _match_version_string(self, subject):
|
||||
|
@ -73,6 +73,10 @@ class Controller(object):
|
||||
|
||||
version_objs = []
|
||||
if CONF.enable_v2_api:
|
||||
if CONF.enabled_backends:
|
||||
version_objs.extend([
|
||||
build_version_object(2.8, 'v2', 'EXPERIMENTAL')
|
||||
])
|
||||
version_objs.extend([
|
||||
build_version_object(2.7, 'v2', 'CURRENT'),
|
||||
build_version_object(2.6, 'v2', 'SUPPORTED'),
|
||||
|
@ -181,8 +181,8 @@ class VersionNegotiationTest(base.IsolatedUnitTest):
|
||||
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')
|
||||
def test_request_url_v2_9_unsupported(self):
|
||||
request = webob.Request.blank('/v2.9/images')
|
||||
resp = self.middleware.process_request(request)
|
||||
self.assertIsInstance(resp, versions.Controller)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user