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
===================================================
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::
: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
another performance data. So two different approaches can be used for it:
- Comparison of one part of code with some custom changes
(see :ref:`check_performance_or_detect_regression`)
- Comparison of two different code parts
(see :ref:`compare_output_API_performance`)
- Comparison of one part of code with some custom changes
(see :ref:`check_performance_or_detect_regression`)
- Comparison of two different code parts
(see :ref:`compare_output_API_performance`)
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
may be presented as follow list of steps:
- add to task list (``heat-fakevirt.yaml``) existing or new tasks.
- wait a result of this execution.
- upload patchset with changes (new feature) and launch the same test again.
- compare performance results.
- add to task list (``heat-fakevirt.yaml``) existing or new tasks.
- wait a result of this execution.
- upload patchset with changes (new feature) and launch the same test again.
- compare performance results.
.. _compare_output_API_performance:

View File

@ -33,7 +33,7 @@ Newer versions of OpenStack require enabling heat services in devstack
#Enable heat services
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`::
[[local|localrc]]

View File

@ -24,8 +24,8 @@ Heat's purpose and vision
application by executing appropriate :term:`OpenStack` API calls to generate
running cloud applications.
* 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
control tools.
files which are readable and writable by humans, and can be managed by
version control tools.
* Templates specify the relationships between resources (e.g. this
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
@ -36,8 +36,8 @@ Heat's purpose and vision
functionality such as instance high availability, instance autoscaling, and
nested stacks.
* Heat primarily manages infrastructure, but the templates
integrate well with software configuration management tools such as Puppet and
Ansible.
integrate well with software configuration management tools such as Puppet
and Ansible.
* Operators can customise the capabilities of Heat by installing plugins.
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:
.. code-block:: none
.. code-block:: ini
[database]
...
@ -339,7 +339,7 @@ Install and configure components
* In the ``[DEFAULT]`` section,
configure ``RabbitMQ`` message queue access:
.. code-block:: none
.. code-block:: ini
[DEFAULT]
...
@ -352,7 +352,7 @@ Install and configure components
and ``[clients_keystone]`` sections,
configure Identity service access:
.. code-block:: none
.. code-block:: ini
[keystone_authtoken]
...
@ -384,7 +384,7 @@ Install and configure components
* In the ``[DEFAULT]`` section, configure the metadata and
wait condition URLs:
.. code-block:: none
.. code-block:: ini
[DEFAULT]
...
@ -394,7 +394,7 @@ Install and configure components
* In the ``[DEFAULT]`` section, configure the stack domain and
administrative credentials:
.. code-block:: none
.. code-block:: ini
[DEFAULT]
...

View File

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

View File

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

View File

@ -30,7 +30,7 @@ OPTIONS
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
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.
.. cmdoption:: --version

View File

@ -30,7 +30,7 @@ OPTIONS
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
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.
.. cmdoption:: --version

View File

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

View File

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

View File

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

View File

@ -1,13 +1,17 @@
This directory contains rally benchmark scenarios to be run by OpenStack CI.
Structure:
* heat.yaml is rally task that will be run in gates
* 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.
* 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/*
* more about rally: https://wiki.openstack.org/wiki/Rally
* 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

View File

@ -18,5 +18,7 @@ testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
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
tempest>=17.1.0 # Apache-2.0

View File

@ -45,6 +45,7 @@ commands =
# B603: Test for use of subprocess with shell equals true
# 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
doc8 {posargs}
[testenv:venv]
basepython = python3
@ -115,6 +116,10 @@ show-source = true
exclude=.*,dist,*lib/python*,*egg,build,*convergence/scenarios/*
max-complexity=20
[doc8]
ignore = D001
ignore-path = .venv,.git,.tox,.tmp,*heat/locale*,*lib/python*,heat.egg*,doc/build,releasenotes/*
[hacking]
import_exceptions = heat.common.i18n
local-check-factory = heat.hacking.checks.factory