Merge "clean up api_samples documentation"
This commit is contained in:
@@ -1,11 +1,21 @@
|
|||||||
Api Samples
|
Api Samples
|
||||||
===========
|
===========
|
||||||
|
|
||||||
Samples in this directory are automatically generated from the api samples
|
This part of the tree contains templates for API samples. The
|
||||||
integration tests. To regenerate the samples, simply set GENERATE_SAMPLES
|
documentation in doc/api_samples is completely autogenerated from the
|
||||||
in the environment before running the tests. For example:
|
tests in this directory.
|
||||||
|
|
||||||
|
To add a new api sample, add tests for the common passing and failing
|
||||||
|
cases in this directory for your extension, and modify test_samples.py
|
||||||
|
for your tests. There should be both JSON and XML tests included.
|
||||||
|
|
||||||
|
Then run the following command:
|
||||||
|
|
||||||
GENERATE_SAMPLES=True tox -epy27 nova.tests.integrated
|
GENERATE_SAMPLES=True tox -epy27 nova.tests.integrated
|
||||||
|
|
||||||
|
Which will create the files on doc/api_samples.
|
||||||
|
|
||||||
If new tests are added or the .tpl files are changed due to bug fixes, the
|
If new tests are added or the .tpl files are changed due to bug fixes, the
|
||||||
samples should be regenerated so they are in sync with the templates.
|
samples must be regenerated so they are in sync with the templates, as
|
||||||
|
there is an additional test which reloads the documentation and
|
||||||
|
ensures that it's in sync.
|
||||||
|
Reference in New Issue
Block a user