diff --git a/doc/source/devref/api_microversion_dev.rst b/doc/source/devref/api_microversion_dev.rst index 16d33015e4..6737cf48e7 100644 --- a/doc/source/devref/api_microversion_dev.rst +++ b/doc/source/devref/api_microversion_dev.rst @@ -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 `_ diff --git a/manila/api/openstack/wsgi.py b/manila/api/openstack/wsgi.py index f8a741a419..d21961b91b 100644 --- a/manila/api/openstack/wsgi.py +++ b/manila/api/openstack/wsgi.py @@ -222,23 +222,18 @@ 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) + self.api_version_request = api_version.APIVersionRequest( + hdr_string) - # Check that the version requested is within the global - # minimum/maximum of supported API versions - if not self.api_version_request.matches( - api_version.min_api_version(), - api_version.max_api_version()): - raise exception.InvalidGlobalAPIVersion( - req_ver=self.api_version_request.get_string(), - min_ver=api_version.min_api_version().get_string(), - max_ver=api_version.max_api_version().get_string()) + # Check that the version requested is within the global + # minimum/maximum of supported API versions + if not self.api_version_request.matches( + api_version.min_api_version(), + api_version.max_api_version()): + raise exception.InvalidGlobalAPIVersion( + req_ver=self.api_version_request.get_string(), + min_ver=api_version.min_api_version().get_string(), + max_ver=api_version.max_api_version().get_string()) else: self.api_version_request = api_version.APIVersionRequest(