Add sample API content

This adds sample API content for versions and servers resources,
including the parameters.yaml that is needed in both of these cases.

It also makes a new tox.ini target 'api-ref' for building these docs,
which will be used as part of the publishing pipeline.

Change-Id: I310ed352dc5dd81d01f2fd5f1a2fab662c29f0dc
This commit is contained in:
Sean Dague 2016-03-29 11:56:21 -04:00
parent c467641455
commit 7c8112f63e

15
tox.ini
View File

@ -91,6 +91,7 @@ commands =
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
oslo-config-generator --config-file=etc/nova/nova-config-generator.conf
sphinx-build -W -b html api-guide/source api-guide/build/html
sphinx-build -b html api-ref/source api-ref/build/html
[testenv:api-guide]
# This environment is called from CI scripts to test and publish
@ -102,6 +103,20 @@ install_command = pip install -U --force-reinstall {opts} {packages}
commands =
sphinx-build -W -b html -d api-guide/build/doctrees api-guide/source api-guide/build/html
[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
# NOTE(sdague): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
#
# we do not used -W here because we are doing some slightly tricky
# things to build a single page document, and as such, we are ok
# ignoring the duplicate stanzas warning.
install_command = pip install -U --force-reinstall {opts} {packages}
commands =
sphinx-build -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:bandit]
commands = bandit -c bandit.yaml -r nova -n 5 -ll