Files
deb-nova/nova/tests/functional/api_sample_tests
He Jie Xu 73eda1cb7d Remove the legacy v2 API test scenarios from API sample tests
This patches from the test scenarios for the legacy v2 from API
sample tests. There still have some codes for legacy v2 which should
be cleanup, but that can be done later patches. This patch just stop
the test on the legacy v2 API.

Partially implements blueprint remove-legacy-v2-api-code

Change-Id: I38626e5a4aa98cbfd7b65b5eb0edbcae96e5b3f2
2016-05-04 15:49:52 +08:00
..
2015-12-03 22:43:26 +00:00

Api Samples

This part of the tree contains templates for API samples. The documentation in doc/api_samples is completely autogenerated from the 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.

Then run the following command:

tox -e api-samples

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 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.

Debugging sample generation

If a .tpl is changed, its matching .json must be removed else the samples won't be generated. If an entirely new extension is added, a directory for it must be created before its samples will be generated.