
This is the start of an effort to both validate that drivers fully implement the expected minimum requirements as well as to create a clear place for driver developers to learn what needs to be implemented and get documentation explaining what is expected for each method. This also enables us to create tooling for documenting the available drivers and their capabilities, to some degree. A follow up patch will show some of what I'm thinking there, but it will make it possible to write scripts for different needs. This is somewhat a cleanup attempt to the ABC work that was started a while back. This does not aim to replace that effort, but give a mechanism for some of the things expected out of that effort that ended up not being possible with how it evolved. In most cases we do not really care if a driver is inherited from a certain base class, just that it conforms to the given interface. The interface/inheritance work really centers around two separate things: * Ensuring drivers conform to an expected interface * Allowing code reuse and common implementation This is really for the first item. Additional work is needed to complete the ABC work we've done, but that really focuses on the second item, and is out of scope for the intent of this patch. Change-Id: I4168225126fe88c31712d94f0a130e9e7ede3446
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
Generate the code.rst file so that Sphinx will pull in our docstrings:
% ./generate_autodoc_index.sh > source/code.rst
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!