cinder/doc
scottda 6b11d276d1 cinder-api-microversions code
Many changes to the Cinder REST API require changes to the consumers of the API.
For example, If we need to add a required parameter to a method that is called
 by Nova, we'd need both the Nova calling code and the cinderclient that
Nova uses to change. But newer Cinder versions with the change must work with
older Nova versions, and there is no mechanism for this at the moment. Adding
microversions will solve this problem.
With microversions, the highest supported version will be negotiated by a field
in the HTTP header that is sent to the Cinder API. In the case where the field
'versions' is not sent (i.e. clients and scripts that pre-date this change),
then the lowest supported version would be used. In order to ensure that the
API consumer is explicitly asking for a microversioned API, a new endpoint v3
is added, which is identical to API version v2. This means that our new
Cinder API v3 would be the default, and consumers of the API that wished to
use a newer version could do so by using that endpoint and a microversion in
the HTTP header.
New tests for microversioned API features on endpoint /v3 should be added to
cinder/tests/unit/api/v3/ directory. Existing functionality will be tested via
the .../v2/ unit tests.

DocImpact
APIImpact
Implements: https://blueprints.launchpad.net/cinder/+spec/cinder-api-microversions
Change-Id: I48cdbbc900c2805e59ee9aebc3b1c64aed3212ae
2016-02-24 06:50:54 -07:00
..
ext Replace xrange() with six.moves.range() 2015-06-16 10:46:40 +02:00
source cinder-api-microversions code 2016-02-24 06:50:54 -07:00
.gitignore Initial fork out of Nova. 2012-05-03 10:48:26 -07:00
Makefile Initial fork out of Nova. 2012-05-03 10:48:26 -07:00
README.rst Complete the doc/README.rst instructions to build docs 2015-04-16 08:13:04 +00:00
find_autodoc_modules.sh Fixes a small issue in find_autodoc_modules.sh 2015-01-23 14:38:44 +08:00
generate_autodoc_index.sh Initial fork out of Nova. 2012-05-03 10:48:26 -07:00

README.rst

Building the docs

Dependencies

Sphinx

You'll need sphinx (the python one) and if you are using the virtualenv you'll need to install it in the virtualenv specifically so that it can load the cinder modules.

pip install Sphinx
Graphviz

Some of the diagrams are generated using the dot language from Graphviz.

sudo apt-get install graphviz

Use make

Just type make:

% make

Look in the Makefile for more targets.

Manually

  1. Generate the code.rst file so that Sphinx will pull in our docstrings:

    % ./generate_autodoc_index.sh > source/code.rst
  2. Run `sphinx_build`:

    % sphinx-build -b html source build/html

Use tox

The easiest way to build the docs and avoid dealing with all dependencies is to let tox prepare a virtualenv and run the build_sphinx target inside the virtualenv:

% cd ..
% tox -e docs

The docs have been built

Check out the build directory to find them. Yay!