From 7047a329b5b638164ea0e95645b51c74353c7895 Mon Sep 17 00:00:00 2001 From: Nguyen Van Trung Date: Wed, 29 Nov 2017 13:09:58 +0700 Subject: [PATCH] Add doc8 into pep8 check to scan rst files This change will help fix pep8 issues of all *.rst files in the project and checking for new files. Change-Id: Ib06aeb7fa76bd387d76c23bc3f8ecca89332d989 Co-authored-By: Hoang Trung Hieu --- doc/source/install/index.rst | 3 ++- doc/source/install/offline-install.rst | 5 +++-- doc/source/user/dhcp.rst | 4 ++-- doc/source/user/howto.rst | 9 +++++---- doc/source/user/troubleshooting.rst | 12 ++++++------ test-requirements.txt | 1 + tox.ini | 1 + 7 files changed, 20 insertions(+), 15 deletions(-) diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst index beab4e7c0..200348f79 100644 --- a/doc/source/install/index.rst +++ b/doc/source/install/index.rst @@ -66,7 +66,8 @@ The output will look like this:: rhui-REGION-rhel-server-source-extras/7Server/x86_64 Red H disabled rhui-REGION-rhel-server-source-optional/7Server/x86_64 Red H disabled -Use the names of the repositories (minus the version and architecture) to enable them:: +Use the names of the repositories (minus the version and architecture) +to enable them:: sudo yum-config-manager --enable rhui-REGION-rhel-server-optional sudo yum-config-manager --enable rhui-REGION-rhel-server-extras diff --git a/doc/source/install/offline-install.rst b/doc/source/install/offline-install.rst index 1ba017280..3096b67cb 100644 --- a/doc/source/install/offline-install.rst +++ b/doc/source/install/offline-install.rst @@ -58,8 +58,9 @@ need to be fixed by looking for any URLs in the External Steps ^^^^^^^^^^^^^^ -Bifrost doesn't attempt to configure ``apt``, ``yum``, or ``pip``, so if you are -working in an offline mode, you'll need to make sure those work independently. +Bifrost doesn't attempt to configure ``apt``, ``yum``, or ``pip``, +so if you are working in an offline mode, you'll need to make sure +those work independently. ``pip`` in particular will be sensitive; Bifrost tends to use the most recent version of python modules, so you'll want to make sure your cache isn't stale. diff --git a/doc/source/user/dhcp.rst b/doc/source/user/dhcp.rst index 844c3e1bf..ded22ebe5 100644 --- a/doc/source/user/dhcp.rst +++ b/doc/source/user/dhcp.rst @@ -89,8 +89,8 @@ Internet Systems Consortium DHCPd:: Architecture ------------ -It should be emphasized that Ironic in standalone mode is intended to be used only -in a trusted environment. +It should be emphasized that Ironic in standalone mode is intended to be used +only in a trusted environment. :: diff --git a/doc/source/user/howto.rst b/doc/source/user/howto.rst index b8e6f851c..cfaa29251 100644 --- a/doc/source/user/howto.rst +++ b/doc/source/user/howto.rst @@ -208,10 +208,11 @@ http://docs.ansible.com/ansible/intro_dynamic_inventory.html#using-inventory-dir Note:: - Before running the above command, ensure that the value for `ssh_public_key_path` in - ``./playbooks/inventory/group_vars/baremetal`` refers to a valid public key file, - or set the ssh_public_key_path option on the ansible-playbook command line by - setting the variable. Example: "-e ssh_public_key_path=~/.ssh/id_rsa.pub" + Before running the above command, ensure that the value for + `ssh_public_key_path` in ``./playbooks/inventory/group_vars/baremetal`` + refers to a valid public key file, or set the ssh_public_key_path option + on the ansible-playbook command line by setting the variable. + Example: "-e ssh_public_key_path=~/.ssh/id_rsa.pub" If the hosts need to be re-deployed, the dynamic redeploy playbook may be used:: diff --git a/doc/source/user/troubleshooting.rst b/doc/source/user/troubleshooting.rst index 4cd5d177f..7f4fd4fd1 100644 --- a/doc/source/user/troubleshooting.rst +++ b/doc/source/user/troubleshooting.rst @@ -16,9 +16,9 @@ are being booted can connect to the following ports:: 6301/TCP for the ironic API 8080/TCP for HTTP File Downloads (iPXE, Ironic-Python-Agent) -If you encounter any additional issues, use of ``tcpdump`` is highly recommended -while attempting to deploy a single node in order to capture and review the -traffic exchange between the two nodes. +If you encounter any additional issues, use of ``tcpdump`` is highly +recommended while attempting to deploy a single node in order to capture +and review the traffic exchange between the two nodes. ***************** NodeLocked Errors @@ -211,6 +211,6 @@ or any other IPA image, you will need to take the following steps: respectively. #. Execute the installation playbook, and the set files will be automatically downloaded again. If the files are not removed prior to (re)installation, - then they will not be replaced. Alternatively, the files can just be directly - replaced on disk. The default where the kernel and ramdisk are located is in - ``/httboot/``. + then they will not be replaced. Alternatively, the files can just be + directly replaced on disk. The default where the kernel and ramdisk are + located is in ``/httboot/``. diff --git a/test-requirements.txt b/test-requirements.txt index 7123161f7..f2b5c2971 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,6 +5,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 +doc8>=0.6.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 sphinx>=1.6.2 # BSD openstackdocstheme>=1.17.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 3a199c37b..d9e7e1000 100644 --- a/tox.ini +++ b/tox.ini @@ -15,6 +15,7 @@ commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:pep8] commands = flake8 + doc8 doc/source releasenotes/source README.rst CONTRIBUTING.rst MISSION.rst HACKING.rst --ignore D000 [testenv:venv] commands = {posargs}