placement/nova/tests/functional/api_sample_tests
Jay Pipes 8b4fd32e7b Return uuid attribute for aggregates
Adds a Compute API microversion that triggers returning an aggregate's UUID
field. This field is necessary for scripts that must populate the placement API
with resource provider to aggregate relationships, which rely on UUIDs for
global identification.

APIImpact
blueprint: return-uuid-from-os-aggregates-api
Change-Id: I4112ccd508eb85403933fec8b52efd468e866772
Closes-bug: #1652642
2017-01-05 14:32:43 -05:00
..
api_samples/os-aggregates Return uuid attribute for aggregates 2017-01-05 14:32:43 -05:00
README.rst add api-samples tox target 2015-12-03 22:43:26 +00:00
test_aggregates.py Return uuid attribute for aggregates 2017-01-05 14:32:43 -05: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.