Files
2ffdf2e9173ca2ad0f95ac7f565da64b8b62691f
nova /api-guide /source /microversions.rst

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

161 lines
6.3 KiB
ReStructuredText
Raw Normal View History

Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
can use microversions to discover the latest API microversion supported in
their cloud. A cloud that is upgraded to support newer microversions will still
support all older microversions to maintain the backward compatibility for
those users who depend on older microversions. Users can also discover new
features easily with microversions, so that they can benefit from all the
advantages and improvements of the current cloud.
There are multiple cases which you can resolve with microversions:
the minimum version of microversions to verify whether the cloud is
compatible with the old API. This prevents the old client from breaking with
backwards incompatible API changes.
user doesn't need to worry that their older client software will be broken
when their cloud is upgraded with new versions. And the cloud operator
doesn't need to worry that upgrading their cloud to newer versions will
break any user with older clients that don't expect these changes.
check the microversions firstly, and new features are only enabled when
clouds support. In this way, the user client can work with clouds that have
deployed different microversions simultaneously.
Version Discovery
=================
The Version API will return the minimum and maximum microversions. These values
are used by the client to discover the API's supported microversion(s).
{
"versions": [
{
"id": "v2.0",
"links": [
{
"href": "http://openstack.example.com/v2/",
"rel": "self"
}
],
"status": "SUPPORTED",
"version": "",
"min_version": "",
"updated": "2011年01月21日T11:33:21Z"
},
{
"id": "v2.1",
"links": [
{
"href": "http://openstack.example.com/v2.1/",
"rel": "self"
}
],
"status": "CURRENT",
"version": "2.14",
"min_version": "2.1",
"updated": "2013年07月23日T11:33:21Z"
}
]
}
support microversions; it is a legacy v2 API endpoint -- for example, the
``http://openstack.example.com/v2.1/`` supports microversions; the maximum
microversion is ``2.14``, and the minimum microversion is ``2.1``. The client
microversion to access the endpoint.
You can also obtain specific endpoint version information by performing a GET
Client Interaction
==================
A client specifies the microversion of the API they want by using the following
HTTP header::
X-OpenStack-Nova-API-Version: 2.4
OpenStack-API-Version: compute 2.27
.. note:: For more detail on this newer form see the `Microversion Specification
<http://specs.openstack.org/openstack/api-wg/guidelines/microversion_specification.html>`_.
of microversions supported, return 406 Not Acceptable.
following semver and therefore backward compatibility is not guaranteed.
acceptable to the microversion range that it understands at the time.
This means that out of the box, an old client without any knowledge of
microversions can work with an OpenStack installation with microversions
Vary: X-OpenStack-Nova-API-Version
The first header specifies the microversion number of the API which was
executed.
parameters. See :rfc:`2616` section 14.44 for details.
OpenStack-API-Version: compute microversion_number
Vary: OpenStack-API-Version