[placement] Make placement_api_docs.py failing
If there is no api reference for some placement API method tox -e placement-api-ref will fail now. Change-Id: Ifefedcd51f1f8d5e741ef6d02b7a0879a185e05f
This commit is contained in:
parent
d0af9820e1
commit
fa5749727f
@ -18,6 +18,7 @@ from nova.api.openstack.placement import handler
|
|||||||
|
|
||||||
# A humane ordering of HTTP methods for sorted output.
|
# A humane ordering of HTTP methods for sorted output.
|
||||||
ORDERED_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']
|
ORDERED_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']
|
||||||
|
DEPRECATED_METHODS = [('POST', '/resource_providers/{uuid}/inventories')]
|
||||||
|
|
||||||
|
|
||||||
def _header_line(map_entry):
|
def _header_line(map_entry):
|
||||||
@ -41,6 +42,7 @@ def inspect_doc(doc_files):
|
|||||||
|
|
||||||
header_lines = []
|
header_lines = []
|
||||||
for map_entry in routes:
|
for map_entry in routes:
|
||||||
|
if map_entry not in DEPRECATED_METHODS:
|
||||||
header_lines.append(_header_line(map_entry))
|
header_lines.append(_header_line(map_entry))
|
||||||
|
|
||||||
content_lines = []
|
content_lines = []
|
||||||
|
5
tox.ini
5
tox.ini
@ -145,10 +145,7 @@ commands =
|
|||||||
# the Placement API Ref to developer.openstack.org.
|
# the Placement API Ref to developer.openstack.org.
|
||||||
commands =
|
commands =
|
||||||
# Check that all placement api routes are in the documentation
|
# Check that all placement api routes are in the documentation
|
||||||
# TODO(cdent): Get rid of the leading '-' after all the existing
|
python tools/placement_api_docs.py placement-api-ref/source/
|
||||||
# routes have been documented. It causes the non-zero exit code to
|
|
||||||
# ignored.
|
|
||||||
- python tools/placement_api_docs.py placement-api-ref/source/
|
|
||||||
rm -rf placement-api-ref/build
|
rm -rf placement-api-ref/build
|
||||||
sphinx-build -W -b html -d placement-api-ref/build/doctrees placement-api-ref/source placement-api-ref/build/html
|
sphinx-build -W -b html -d placement-api-ref/build/doctrees placement-api-ref/source placement-api-ref/build/html
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user