From f25648a963800537d39c3019811ecc5485f8b33e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 13 Mar 2016 21:08:49 +0100 Subject: [PATCH] Error on API Guide warnings Error on warnings in building the API guide and fix any problem encountered: * tox.ini: Enable tread warnings as errors * index.rst: Add unreferenced file extra_specs_and_properties as hidden file so that it does not show up in index. It is still built and will be referenced from other files. * general_info.rst: Remove reference to non-existing file * server_concept: Add missing empty line after code directives Also fix a typo and remove extra EOL whitespace. Change-Id: Ie766f8d2f7d82b7b5b02541b342f9829ca4550a0 --- api-guide/source/general_info.rst | 3 ++- api-guide/source/index.rst | 5 +++++ api-guide/source/server_concepts.rst | 13 ++++++++++--- tox.ini | 4 ++-- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/api-guide/source/general_info.rst b/api-guide/source/general_info.rst index 2855f261f079..9f25030abf8c 100644 --- a/api-guide/source/general_info.rst +++ b/api-guide/source/general_info.rst @@ -249,7 +249,8 @@ on compute hosts rather than servers. - **Aggregates** - Please see :doc:`aggregates.rst` + See `Aggregates developer information + `_. - **Migrations** diff --git a/api-guide/source/index.rst b/api-guide/source/index.rst index 194bdc361c80..672cf0f547f9 100644 --- a/api-guide/source/index.rst +++ b/api-guide/source/index.rst @@ -87,3 +87,8 @@ Contents paginated_collections polling_changes-since_parameter request_and_response_formats + +.. toctree:: + :hidden: + + extra_specs_and_properties diff --git a/api-guide/source/server_concepts.rst b/api-guide/source/server_concepts.rst index 40ebecc038e1..dc9f5bb811ad 100644 --- a/api-guide/source/server_concepts.rst +++ b/api-guide/source/server_concepts.rst @@ -150,6 +150,7 @@ be used and interpreted by nova. and pagination. .. code:: + Precondition: there are 2 servers existing in cloud with following info: @@ -168,6 +169,7 @@ be used and interpreted by nova. **Example: General user query server with administrator only options** .. code:: + Request with non-administrator context: GET /servers/detail?locked=1 Note that 'locked' is not returned through API layer @@ -189,6 +191,7 @@ be used and interpreted by nova. **Example: Administrator query server with administrator only options** .. code:: + Request with administrator context: GET /servers/detail?locked=1 @@ -213,6 +216,7 @@ be used and interpreted by nova. **Example: User query server using exact matching on host** .. code:: + Precondition: Request with administrator context: GET /servers/detail @@ -248,10 +252,11 @@ be used and interpreted by nova. } ] } - + **Example: Query server using regex matching on name** .. code:: + Precondition: Request with administrator context: GET /servers/detail @@ -305,6 +310,7 @@ be used and interpreted by nova. regex matching on name** .. code:: + Precondition: Request with administrator context: GET /servers/detail @@ -346,7 +352,7 @@ be used and interpreted by nova. ] } -- **Speical keys are used to tweek the query** +- **Special keys are used to tweek the query** ``changes-since`` returns instances updated after the given time, ``deleted`` return (or exclude) deleted instances and ``soft_deleted`` modify behavior of 'deleted' to either include or exclude instances whose @@ -355,6 +361,7 @@ be used and interpreted by nova. **Example: User query server with special keys changes-since** .. code:: + Precondition: GET /servers/detail @@ -371,7 +378,7 @@ be used and interpreted by nova. "updated": "2015-12-17T15:55:52Z" ... } - } + } GET /servers/detail?changes-since='2015-12-16T15:55:52Z' diff --git a/tox.ini b/tox.ini index 8ba562da2472..b2d535849ed5 100644 --- a/tox.ini +++ b/tox.ini @@ -90,7 +90,7 @@ commands = python setup.py build_sphinx 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 -b html api-guide/source api-guide/build/html + sphinx-build -W -b html api-guide/source api-guide/build/html [testenv:api-guide] # This environment is called from CI scripts to test and publish @@ -100,7 +100,7 @@ commands = # drop the install_command. install_command = pip install -U --force-reinstall {opts} {packages} commands = - sphinx-build -b html -d api-guide/build/doctrees api-guide/source api-guide/build/html + sphinx-build -W -b html -d api-guide/build/doctrees api-guide/source api-guide/build/html [testenv:bandit] commands = bandit -c bandit.yaml -r nova -n 5 -ll