Adds doc8 check to pep8

This patch adds doc8 check for .rst files to pep8.
Files that fail doc8 check are also fixed.

Ignore D001 of doc8 check. This requires lot of changes and
should be done in a separated patch.

Change-Id: I7732abc55ec27026efbf56663ba02ff27e8ec847
This commit is contained in:
Dao Cong Tien 2018-07-12 15:16:10 +07:00
parent 315a0de97c
commit e8824a2c93
15 changed files with 93 additions and 80 deletions

View File

@ -2,7 +2,8 @@
Configuration options for the Orchestration service Configuration options for the Orchestration service
=================================================== ===================================================
The following options can be set in the ``/etc/heat/heat.conf`` config file. A :doc:`sample configuration file <sample_config>` is also available. The following options can be set in the ``/etc/heat/heat.conf`` config file.
A :doc:`sample configuration file <sample_config>` is also available.
.. show-options:: .. show-options::
:config-file: config-generator.conf :config-file: config-generator.conf

View File

@ -34,10 +34,10 @@ https://github.com/openstack/heat/blob/master/rally-scenarios/heat-fakevirt.yaml
Obviously performance analysis make sense, when it can be compared with some Obviously performance analysis make sense, when it can be compared with some
another performance data. So two different approaches can be used for it: another performance data. So two different approaches can be used for it:
- Comparison of one part of code with some custom changes - Comparison of one part of code with some custom changes
(see :ref:`check_performance_or_detect_regression`) (see :ref:`check_performance_or_detect_regression`)
- Comparison of two different code parts - Comparison of two different code parts
(see :ref:`compare_output_API_performance`) (see :ref:`compare_output_API_performance`)
Examples of using Rally Examples of using Rally
----------------------- -----------------------
@ -118,10 +118,10 @@ that caching works correct.
Also this approach may be used for detecting regressions. In this case workflow Also this approach may be used for detecting regressions. In this case workflow
may be presented as follow list of steps: may be presented as follow list of steps:
- add to task list (``heat-fakevirt.yaml``) existing or new tasks. - add to task list (``heat-fakevirt.yaml``) existing or new tasks.
- wait a result of this execution. - wait a result of this execution.
- upload patchset with changes (new feature) and launch the same test again. - upload patchset with changes (new feature) and launch the same test again.
- compare performance results. - compare performance results.
.. _compare_output_API_performance: .. _compare_output_API_performance:

View File

@ -33,7 +33,7 @@ Newer versions of OpenStack require enabling heat services in devstack
#Enable heat services #Enable heat services
enable_service h-eng h-api h-api-cfn h-api-cw enable_service h-eng h-api h-api-cfn h-api-cw
Since Newton release, heat is available as a devstack plugin. To enable the Since Newton release, heat is available as a devstack plugin. To enable the
plugin add the following to the `[[local|localrc]]` section of `local.conf`:: plugin add the following to the `[[local|localrc]]` section of `local.conf`::
[[local|localrc]] [[local|localrc]]

View File

@ -24,8 +24,8 @@ Heat's purpose and vision
application by executing appropriate :term:`OpenStack` API calls to generate application by executing appropriate :term:`OpenStack` API calls to generate
running cloud applications. running cloud applications.
* A Heat template describes the infrastructure for a cloud application in text * A Heat template describes the infrastructure for a cloud application in text
files which are readable and writable by humans, and can be managed by version files which are readable and writable by humans, and can be managed by
control tools. version control tools.
* Templates specify the relationships between resources (e.g. this * Templates specify the relationships between resources (e.g. this
volume is connected to this server). This enables Heat to call out to the volume is connected to this server). This enables Heat to call out to the
OpenStack APIs to create all of your infrastructure in the correct order to OpenStack APIs to create all of your infrastructure in the correct order to
@ -36,8 +36,8 @@ Heat's purpose and vision
functionality such as instance high availability, instance autoscaling, and functionality such as instance high availability, instance autoscaling, and
nested stacks. nested stacks.
* Heat primarily manages infrastructure, but the templates * Heat primarily manages infrastructure, but the templates
integrate well with software configuration management tools such as Puppet and integrate well with software configuration management tools such as Puppet
Ansible. and Ansible.
* Operators can customise the capabilities of Heat by installing plugins. * Operators can customise the capabilities of Heat by installing plugins.
This documentation offers information aimed at end-users, operators and This documentation offers information aimed at end-users, operators and

View File

@ -327,7 +327,7 @@ Install and configure components
* In the ``[database]`` section, configure database access: * In the ``[database]`` section, configure database access:
.. code-block:: none .. code-block:: ini
[database] [database]
... ...
@ -339,7 +339,7 @@ Install and configure components
* In the ``[DEFAULT]`` section, * In the ``[DEFAULT]`` section,
configure ``RabbitMQ`` message queue access: configure ``RabbitMQ`` message queue access:
.. code-block:: none .. code-block:: ini
[DEFAULT] [DEFAULT]
... ...
@ -352,7 +352,7 @@ Install and configure components
and ``[clients_keystone]`` sections, and ``[clients_keystone]`` sections,
configure Identity service access: configure Identity service access:
.. code-block:: none .. code-block:: ini
[keystone_authtoken] [keystone_authtoken]
... ...
@ -384,7 +384,7 @@ Install and configure components
* In the ``[DEFAULT]`` section, configure the metadata and * In the ``[DEFAULT]`` section, configure the metadata and
wait condition URLs: wait condition URLs:
.. code-block:: none .. code-block:: ini
[DEFAULT] [DEFAULT]
... ...
@ -394,7 +394,7 @@ Install and configure components
* In the ``[DEFAULT]`` section, configure the stack domain and * In the ``[DEFAULT]`` section, configure the stack domain and
administrative credentials: administrative credentials:
.. code-block:: none .. code-block:: ini
[DEFAULT] [DEFAULT]
... ...

View File

@ -327,7 +327,7 @@ Install and configure components
* In the ``[database]`` section, configure database access: * In the ``[database]`` section, configure database access:
.. code-block:: none .. code-block:: ini
[database] [database]
... ...
@ -339,7 +339,7 @@ Install and configure components
* In the ``[DEFAULT]`` section, * In the ``[DEFAULT]`` section,
configure ``RabbitMQ`` message queue access: configure ``RabbitMQ`` message queue access:
.. code-block:: none .. code-block:: ini
[DEFAULT] [DEFAULT]
... ...
@ -352,7 +352,7 @@ Install and configure components
and ``[clients_keystone]`` sections, and ``[clients_keystone]`` sections,
configure Identity service access: configure Identity service access:
.. code-block:: none .. code-block:: ini
[keystone_authtoken] [keystone_authtoken]
... ...
@ -384,7 +384,7 @@ Install and configure components
* In the ``[DEFAULT]`` section, configure the metadata and * In the ``[DEFAULT]`` section, configure the metadata and
wait condition URLs: wait condition URLs:
.. code-block:: none .. code-block:: ini
[DEFAULT] [DEFAULT]
... ...
@ -394,7 +394,7 @@ Install and configure components
* In the ``[DEFAULT]`` section, configure the stack domain and * In the ``[DEFAULT]`` section, configure the stack domain and
administrative credentials: administrative credentials:
.. code-block:: none .. code-block:: ini
[DEFAULT] [DEFAULT]
... ...

View File

@ -326,7 +326,7 @@ Install and configure components
* In the ``[database]`` section, configure database access: * In the ``[database]`` section, configure database access:
.. code-block:: none .. code-block:: ini
[database] [database]
... ...
@ -338,7 +338,7 @@ Install and configure components
* In the ``[DEFAULT]`` section, * In the ``[DEFAULT]`` section,
configure ``RabbitMQ`` message queue access: configure ``RabbitMQ`` message queue access:
.. code-block:: none .. code-block:: ini
[DEFAULT] [DEFAULT]
... ...
@ -351,7 +351,7 @@ Install and configure components
``[clients_keystone]`` sections, ``[clients_keystone]`` sections,
configure Identity service access: configure Identity service access:
.. code-block:: none .. code-block:: ini
[keystone_authtoken] [keystone_authtoken]
... ...
@ -383,7 +383,7 @@ Install and configure components
* In the ``[DEFAULT]`` section, configure the metadata and * In the ``[DEFAULT]`` section, configure the metadata and
wait condition URLs: wait condition URLs:
.. code-block:: none .. code-block:: ini
[DEFAULT] [DEFAULT]
... ...
@ -393,7 +393,7 @@ Install and configure components
* In the ``[DEFAULT]`` section, configure the stack domain and * In the ``[DEFAULT]`` section, configure the stack domain and
administrative credentials: administrative credentials:
.. code-block:: none .. code-block:: ini
[DEFAULT] [DEFAULT]
... ...

View File

@ -30,7 +30,7 @@ OPTIONS
Path to a config directory to pull .conf files from. This file set is Path to a config directory to pull .conf files from. This file set is
sorted, so as to provide a predictable parse order if individual options are sorted, so as to provide a predictable parse order if individual options are
over-ridden. The set is parsed after the file(s), if any, specified via over-ridden. The set is parsed after the file(s), if any, specified via
--config-file, hence over-ridden options in the directory take precedence. --config-file, hence over-ridden options in the directory take precedence.
.. cmdoption:: --version .. cmdoption:: --version

View File

@ -30,7 +30,7 @@ OPTIONS
Path to a config directory to pull .conf files from. This file set is Path to a config directory to pull .conf files from. This file set is
sorted, so as to provide a predictable parse order if individual options are sorted, so as to provide a predictable parse order if individual options are
over-ridden. The set is parsed after the file(s), if any, specified via over-ridden. The set is parsed after the file(s), if any, specified via
--config-file, hence over-ridden options in the directory take precedence. --config-file, hence over-ridden options in the directory take precedence.
.. cmdoption:: --version .. cmdoption:: --version

View File

@ -30,37 +30,37 @@ Parameters
---------- ----------
*KeyName* :mod:`(required)` *KeyName* :mod:`(required)`
*type* *type*
*string* *string*
*description* *description*
Name of an existing EC2 KeyPair to enable SSH access to the instance Name of an existing EC2 KeyPair to enable SSH access to the instance
*InstanceType* :mod:`(optional)` *InstanceType* :mod:`(optional)`
*type* *type*
*string* *string*
*description* *description*
The EC2 instance type The EC2 instance type
*DBName* :mod:`(optional)` *DBName* :mod:`(optional)`
*type* *type*
*string* *string*
*description* *description*
The WordPress database name The WordPress database name
*DBUsernameName* :mod:`(optional)` *DBUsernameName* :mod:`(optional)`
*type* *type*
*string* *string*
*description* *description*
The WordPress database admin account username The WordPress database admin account username
*DBPassword* :mod:`(optional)` *DBPassword* :mod:`(optional)`
*type* *type*
*string* *string*
*description* *description*
The WordPress database admin account password The WordPress database admin account password
*DBRootPassword* :mod:`(optional)` *DBRootPassword* :mod:`(optional)`
*type* *type*
*string* *string*
*description* *description*
Root password for MySQL Root password for MySQL
*LinuxDistribution* :mod:`(optional)` *LinuxDistribution* :mod:`(optional)`
*type* *type*
*string* *string*
*description* *description*
Linux distribution of choice Linux distribution of choice

View File

@ -28,27 +28,27 @@ Parameters
---------- ----------
*key_name* :mod:`(required)` *key_name* :mod:`(required)`
*type* *type*
*string* *string*
*description* *description*
Name of an existing key pair to use for the instance Name of an existing key pair to use for the instance
*flavor* :mod:`(optional)` *flavor* :mod:`(optional)`
*type* *type*
*string* *string*
*description* *description*
Flavor for the instance to be created Flavor for the instance to be created
*image* :mod:`(required)` *image* :mod:`(required)`
*type* *type*
*string* *string*
*description* *description*
Image *ID* or image name to use for the instance Image *ID* or image name to use for the instance
*admin_pass* :mod:`(required)` *admin_pass* :mod:`(required)`
*type* *type*
*string* *string*
*description* *description*
The admin password for the instance The admin password for the instance
*db_port* :mod:`(optional)` *db_port* :mod:`(optional)`
*type* *type*
*number* *number*
*description* *description*
The database port number The database port number

View File

@ -19,6 +19,7 @@ cryptography==2.1
debtcollector==1.19.0 debtcollector==1.19.0
decorator==4.2.1 decorator==4.2.1
deprecation==2.0 deprecation==2.0
doc8==0.6.0
docker-pycreds==0.2.2 docker-pycreds==0.2.2
docker==3.1.1 docker==3.1.1
dogpile.cache==0.6.5 dogpile.cache==0.6.5

View File

@ -1,13 +1,17 @@
This directory contains rally benchmark scenarios to be run by OpenStack CI. This directory contains rally benchmark scenarios to be run by OpenStack CI.
Structure: Structure:
* heat.yaml is rally task that will be run in gates * heat.yaml is rally task that will be run in gates
* plugins - directory where you can add rally plugins. So you don't need * plugins - directory where you can add rally plugins. So you don't need
to merge benchmark in scenarios in rally to be able to run them in heat. to merge benchmark in scenarios in rally to be able to run them in heat.
* extra - all files from this directory will be copied to gates, so you will * extra - all files from this directory will be copied to gates, so you will
be able to use absolute path in rally tasks. Files will be in ~/.rally/extra/* be able to use absolute path in rally tasks. Files will be in ~/.rally/extra/*
* more about rally: https://wiki.openstack.org/wiki/Rally * more about rally: https://wiki.openstack.org/wiki/Rally
* how to add rally-gates: https://wiki.openstack.org/wiki/Rally/RallyGates * how to add rally-gates: https://wiki.openstack.org/wiki/Rally/RallyGates
* how to write plugins https://rally.readthedocs.io/en/latest/plugins/#rally-plugins * how to write plugins https://rally.readthedocs.io/en/latest/plugins/#rally-plugins

View File

@ -18,5 +18,7 @@ testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT testtools>=2.2.0 # MIT
testresources>=2.0.0 # Apache-2.0/BSD testresources>=2.0.0 # Apache-2.0/BSD
doc8>=0.6.0 # Apache-2.0
Pygments>=2.2.0 # BSD license
# Next are used in integration tests only # Next are used in integration tests only
tempest>=17.1.0 # Apache-2.0 tempest>=17.1.0 # Apache-2.0

View File

@ -45,6 +45,7 @@ commands =
# B603: Test for use of subprocess with shell equals true # B603: Test for use of subprocess with shell equals true
# B607: Test for starting a process with a partial path # B607: Test for starting a process with a partial path
bandit -r heat -x tests --skip B101,B104,B107,B110,B310,B311,B404,B410,B504,B506,B603,B607 bandit -r heat -x tests --skip B101,B104,B107,B110,B310,B311,B404,B410,B504,B506,B603,B607
doc8 {posargs}
[testenv:venv] [testenv:venv]
basepython = python3 basepython = python3
@ -115,6 +116,10 @@ show-source = true
exclude=.*,dist,*lib/python*,*egg,build,*convergence/scenarios/* exclude=.*,dist,*lib/python*,*egg,build,*convergence/scenarios/*
max-complexity=20 max-complexity=20
[doc8]
ignore = D001
ignore-path = .venv,.git,.tox,.tmp,*heat/locale*,*lib/python*,heat.egg*,doc/build,releasenotes/*
[hacking] [hacking]
import_exceptions = heat.common.i18n import_exceptions = heat.common.i18n
local-check-factory = heat.hacking.checks.factory local-check-factory = heat.hacking.checks.factory