nova/nova/tests/functional/api_sample_tests/legacy_v2
He Jie Xu 3024e16881 Move legacy v2 api smaple tests
This patch moves legacy v2 api sample tests under
'nova/tests/functional/api_sample_tests/legacy_v2'

Also create new API sample test base class for matching new
path in 'nova/tests/functional/api_sample_tests/legacy_v2/ -
api_samples_test_base.py'

Change-Id: Ib455d4fc9d1f9a2a7e9a744f7e63086b3cf49c5e
Partial-Bug: #1462901
2015-08-15 12:30:20 +10:00
..
OS-EXT-IPS Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
OS-EXT-IPS-MAC Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
OS-EXT-VIF-NET Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
all_extensions Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
flavors Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
limits Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
os-extended-floating-ips Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
os-extended-rescue-with-image Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
os-server-group-quotas Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
os-server-list-multi-status Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
os-used-limits Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
os-used-limits-for-admin Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
os-virtual-interfaces Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
servers Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
versions Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
README.rst Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
__init__.py Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
api_samples_test_base.py Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00
test_api_samples.py Move legacy v2 api smaple tests 2015-08-15 12:30:20 +10:00

README.rst

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. There should be both JSON and XML tests included.

Then run the following command:

GENERATE_SAMPLES=True tox -e functional

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.