Remove support for 'latest' microversion

Originally copied from the Nova implementation of microversions,
we have come to realize that being able to specify 'latest' for the
microversion is rarely useful and usually dangerous.

Allowing clients to request the "latest" microversion guarantees
undefined (and likely broken) behavior in every situation where a
client talks to a server that is newer than it.

Change-Id: I3a5ba0d45804e567aba710a20628539b0c284499
Closes-Bug: 1489583
This commit is contained in:
Clinton Knight 2015-08-28 19:25:54 -04:00
parent 5587df1f42
commit b97fa6b025
2 changed files with 11 additions and 20 deletions
doc/source/devref
manila/api/openstack

@ -18,10 +18,6 @@ the ``DEFAULT_API_VERSION`` as defined in
``manila/api/openstack/wsgi.py``. This value is currently ``1.0`` and
is expected to remain so for quite a long time.
There is a special value ``latest`` which can be specified, which will
allow a client to always receive the most recent version of API
responses from the server.
The Nova project was the first to implement microversions. For full
details please read Nova's `Kilo spec for microversions
<http://git.openstack.org/cgit/openstack/nova-specs/tree/specs/kilo/implemented/api-microversions.rst>`_

@ -222,11 +222,6 @@ class Request(webob.Request):
else:
if API_VERSION_REQUEST_HEADER in self.headers:
hdr_string = self.headers[API_VERSION_REQUEST_HEADER]
# 'latest' is a special keyword which is equivalent to
# requesting the maximum version of the API supported
if hdr_string == 'latest':
self.api_version_request = api_version.max_api_version()
else:
self.api_version_request = api_version.APIVersionRequest(
hdr_string)