Enable warning-is-error in doc build

- Fix docstring warnings
- pbr warnerrors is no longer needed.
- pbr audodoc temporarily disabled

Co-authored-By: Nguyen Van Trung <trungnv@vn.fujitsu.com>
Change-Id: I37d5d78fc7895bd112a8555840c6c3b3eb294ad3
This commit is contained in:
rajat29 2017-07-07 10:48:25 +05:30 committed by Eric Kao
parent 579caeb8c1
commit 51bb08c2ea
23 changed files with 50 additions and 55 deletions

View File

@ -7,7 +7,6 @@ Team and repository tags
.. Change things from this point on .. Change things from this point on
.. include:: aliases.rst
.. _readme: .. _readme:

View File

@ -1,3 +0,0 @@
.. |ad| replace:: ActiveDirectory

View File

@ -1,4 +1,3 @@
.. include:: aliases.rst
.. _api: .. _api:
@ -35,6 +34,7 @@ and *action*. A policy has the following fields:
b) action, b) action,
c) database, c) database,
d) materialized d) materialized
The default is *nonrecursive* and unless you are writing action The default is *nonrecursive* and unless you are writing action
descriptions for use with ``simulate`` you should always use the descriptions for use with ``simulate`` you should always use the
default. default.

View File

@ -1,4 +1,3 @@
.. include:: aliases.rst
.. _concepts: .. _concepts:
@ -24,7 +23,7 @@ other cloud services that act as sources of information about the cloud::
A service is anything that manages cloud state. For example, A service is anything that manages cloud state. For example,
OpenStack components like Nova, Neutron, Cinder, Swift, Heat, and OpenStack components like Nova, Neutron, Cinder, Swift, Heat, and
Keystone are all services. Software like |ad|, inventory management Keystone are all services. Software like ActiveDirectory, inventory management
systems, anti-virus scanners, intrusion detection systems, and systems, anti-virus scanners, intrusion detection systems, and
relational databases are also services. relational databases are also services.

View File

@ -1,4 +1,3 @@
.. include:: aliases.rst
.. _cloudservices: .. _cloudservices:

View File

@ -1,5 +1,4 @@
.. include:: aliases.rst
.. _codeoverview: .. _codeoverview:

View File

@ -15,6 +15,8 @@ import os
import sys import sys
sys.path.insert(0, os.path.abspath('../..')) sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('./'))
# -- General configuration ---------------------------------------------------- # -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be

View File

@ -1,4 +1,3 @@
.. include:: aliases.rst
.. _deployment: .. _deployment:
@ -98,5 +97,12 @@ are specified in the [DEFAULT] section of the configuration file.
[DEFAULT] [DEFAULT]
transport_url = rabbit://<rabbit-userid>:<rabbit-password>@<rabbit-host-address>:<port> transport_url = rabbit://<rabbit-userid>:<rabbit-password>@<rabbit-host-address>:<port>
.. include:: ha-overview.rst =============
.. include:: ha-deployment.rst HA Deployment
=============
.. toctree::
:maxdepth: 2
ha-overview
ha-deployment

View File

@ -1,4 +1,3 @@
.. include:: aliases.rst
.. _enforcement: .. _enforcement:

View File

@ -1,14 +1,12 @@
.. include:: aliases.rst
.. _ha_deployment: .. _ha_deployment:
#############
-------------
HA Deployment HA Deployment
------------- #############
Overview Overview
================== ========
This section shows how to deploy Congress with High Availability (HA). For an This section shows how to deploy Congress with High Availability (HA). For an
architectural overview, please see the :ref:`HA Overview <ha_overview>`. architectural overview, please see the :ref:`HA Overview <ha_overview>`.
@ -26,7 +24,7 @@ The following sections describe each step in more detail.
Shared Services Shared Services
================== ===============
All the Congress nodes share a database backend. To setup a database backend All the Congress nodes share a database backend. To setup a database backend
for Congress, please follow the database portion of for Congress, please follow the database portion of
@ -48,7 +46,7 @@ __ http://docs.openstack.org/ha-guide/shared-messaging.html
Hosts Preparation Hosts Preparation
================== =================
Congress should be installed on each host expected to run a Congress node. Congress should be installed on each host expected to run a Congress node.
Please follow the directions in `separate install instructions`__ to install Please follow the directions in `separate install instructions`__ to install
@ -88,7 +86,7 @@ For example:
Datasource Drivers Node Datasource Drivers Node
======================== =======================
In this step, we deploy a single datasource-drivers node in warm-standby style. In this step, we deploy a single datasource-drivers node in warm-standby style.
@ -154,7 +152,7 @@ The RA has following configurable parameters.
Policy Engine Nodes Policy Engine Nodes
===================== ===================
In this step, we deploy N (at least 2) policy-engine nodes, each with an In this step, we deploy N (at least 2) policy-engine nodes, each with an
associated API server. This step should be done only after the associated API server. This step should be done only after the
@ -173,7 +171,7 @@ congress configuration file.
Load-balancer Load-balancer
============== =============
A load-balancer should be used to distribute incoming API requests to the N A load-balancer should be used to distribute incoming API requests to the N
policy-engine (and API service) nodes deployed in step 3. policy-engine (and API service) nodes deployed in step 3.

View File

@ -1,11 +1,9 @@
.. include:: aliases.rst
.. _ha_overview: .. _ha_overview:
----------- ###########
HA Overview HA Overview
----------- ###########
Some applications require Congress to be highly available. Some Some applications require Congress to be highly available. Some
applications require a Congress Policy Engine (PE) to handle a high volume of applications require a Congress Policy Engine (PE) to handle a high volume of
queries. This guide describes Congress support for High Availability (HA) queries. This guide describes Congress support for High Availability (HA)
@ -16,6 +14,7 @@ install and configure OpenStack for High Availability.
__ http://docs.openstack.org/ha-guide/index.html __ http://docs.openstack.org/ha-guide/index.html
HA Types HA Types
======== ========
@ -167,4 +166,4 @@ Cautions and Limitations
configuring the load balancer to make each user sticky to a particular PE configuring the load balancer to make each user sticky to a particular PE
instance. But if a user reaches a different PE instance (say because of load instance. But if a user reaches a different PE instance (say because of load
balancer configuration or because the original instance went down), the end balancer configuration or because the original instance went down), the end
user reaches a different instance and may experience out-of-sync artifacts. user reaches a different instance and may experience out-of-sync artifacts.

View File

@ -1 +0,0 @@
../aliases.rst

View File

@ -1,6 +1,4 @@
.. include:: aliases.rst
.. _introduction: .. _introduction:
Introduction Introduction

View File

@ -1,3 +1,4 @@
.. _other-enforcement: .. _other-enforcement:
Other Enforcement Techniques Other Enforcement Techniques

View File

@ -1,6 +1,5 @@
.. include:: aliases.rst
.. _policy-engine: .. _policy_engine:
Policy Engine Policy Engine
-------------- --------------

View File

@ -1,6 +1,4 @@
.. include:: aliases.rst
.. _relatedwork: .. _relatedwork:
============ ============
@ -9,10 +7,10 @@ Related Work
This page describes comparisons of Congress to other well-known systems. This page describes comparisons of Congress to other well-known systems.
1. |ad| 1. ActiveDirectory
======= ==================
In many ways Congress is similar to |ad| (AD). In many ways Congress is similar to ActiveDirectory (AD).
* Both Congress and AD are cloud services whose main responsibility is policy. * Both Congress and AD are cloud services whose main responsibility is policy.
* Both Congress and AD are concerned with providing a single touchpoint for * Both Congress and AD are concerned with providing a single touchpoint for
@ -22,7 +20,7 @@ In many ways Congress is similar to |ad| (AD).
like groups that make it easy to express policies over large numbers of like groups that make it easy to express policies over large numbers of
servers, networks, users, files, etc. servers, networks, users, files, etc.
Congress generalizes |ad| in several dimensions. Congress generalizes ActiveDirectory in several dimensions.
* AD is primarily used for managing a collection of servers. Congress is * AD is primarily used for managing a collection of servers. Congress is
designed to manage any collection of cloud services. Congress does not designed to manage any collection of cloud services. Congress does not

View File

@ -1,4 +1,3 @@
.. include:: aliases.rst
.. _policy: .. _policy:
@ -68,7 +67,7 @@ Neutron tables), or the tables may come from different cloud services (e.g.
some tables from Neutron, others from Nova). some tables from Neutron, others from Nova).
For example, if we have the following table schemas from Nova, Neutron, and For example, if we have the following table schemas from Nova, Neutron, and
|ad|, we could write a policy that says every network connected to a VM must ActiveDirectory, we could write a policy that says every network connected to a VM must
either be public or owned by someone in the same group as the VM owner.:: either be public or owned by someone in the same group as the VM owner.::
error(vm, network) :- error(vm, network) :-
@ -395,8 +394,8 @@ In previous releases, the *builtin:* prefix was unnecessary. You could referenc
builtin tables in their bare form, e.g. *lt(x,y)*. As of Ocata, bare references builtin tables in their bare form, e.g. *lt(x,y)*. As of Ocata, bare references
to builtins are deprecated. to builtins are deprecated.
**Bare builtin references are deprecated as of Ocata. They will be removed **Bare builtin references are deprecated as of Ocata.They will be removed
in the Q release.** in the Q release.**
Here is a list of the currently supported builtins. A builtin that has Here is a list of the currently supported builtins. A builtin that has
N inputs means that the leftmost N columns are the inputs, and the N inputs means that the leftmost N columns are the inputs, and the

View File

@ -1,4 +1,3 @@
.. include:: aliases.rst
.. _release: .. _release:

View File

@ -1,4 +1,3 @@
.. include:: aliases.rst
.. _troubleshooting: .. _troubleshooting:

View File

@ -29,13 +29,16 @@ packages =
setup-hooks = setup-hooks =
pbr.hooks.setup_hook pbr.hooks.setup_hook
[pbr] # FIXME: fix the docstrings to comply with format. Re-enable this module
autodoc_index_modules = True # when warning-errors resolved.
autodoc_exclude_modules = # [pbr]
congress.db.migration.alembic_migrations.* # autodoc_index_modules = True
congress_tempest_tests.* # autodoc_exclude_modules =
thirdparty.* # congress.db.migration.alembic_migrations.*
warnerrors = True # congress_tempest_tests.*
# thirdparty.*
# antlr3runtime.*
# warnerrors = True
[entry_points] [entry_points]
oslo.config.opts = oslo.config.opts =
@ -53,9 +56,10 @@ tempest.test_plugins =
[build_sphinx] [build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1 all_files = 1
build-dir = doc/build
source-dir = doc/source
warning-is-error = 1
[upload_sphinx] [upload_sphinx]
upload-dir = doc/build/html upload-dir = doc/build/html

View File

@ -8,6 +8,7 @@ usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages} install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages}
whitelist_externals = find whitelist_externals = find
rm
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8 LANG=en_US.UTF-8
@ -56,7 +57,8 @@ commands = {toxinidir}/tools/pip-install-single-req.sh requirements.txt oslo.con
[testenv:docs] [testenv:docs]
setenv = PYTHONHASHSEED=0 setenv = PYTHONHASHSEED=0
commands = python setup.py build_sphinx commands = rm -rf doc/build doc/source/api
python setup.py build_sphinx
[testenv:releasenotes] [testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html