Browse code

Update docs building

Switch to "modern" way of building docs using sphinx-build directly,
remove now unsed parts from setup.cfg.

Upgrade to openstackdocstheme 1.20 and remove obsolete variables from
conf.py.

Convert external links to internal RST links so that Sphinx can verify
that they are correct.

Replace redirected links with new targets.

Use opendev.org instead of github.com where appropriate.

Change-Id: Iedcc008b170821aa74acefc02ec6a243a0dc307c

Andreas Jaeger authored on 2019/08/11 23:00:12
Showing 13 changed files
... ...
@@ -189,7 +189,7 @@ to enforce basic guidelines, similar to pep8 and flake8 tools for Python. The
189 189
 list below is not complete for what bashate checks, nor is it all checked
190 190
 by bashate.  So many lines of code, so little time.
191 191
 
192
-.. _bashate: https://pypi.python.org/pypi/bashate
192
+.. _bashate: https://pypi.org/project/bashate/
193 193
 
194 194
 Whitespace Rules
195 195
 ----------------
... ...
@@ -3,7 +3,7 @@ pbr>=2.0.0,!=2.1.0
3 3
 Pygments
4 4
 docutils
5 5
 sphinx>=1.6.2
6
-openstackdocstheme>=1.11.0
6
+openstackdocstheme>=1.20.0
7 7
 nwdiag
8 8
 blockdiag
9 9
 sphinxcontrib-blockdiag
... ...
@@ -11,9 +11,6 @@
11 11
 # All configuration values have a default; values that are commented out
12 12
 # serve to show the default.
13 13
 
14
-import sys
15
-import os
16
-
17 14
 # If extensions (or modules to document with autodoc) are in another directory,
18 15
 # add these directories to sys.path here. If the directory is relative to the
19 16
 # documentation root, use os.path.abspath to make it absolute, like shown here.
... ...
@@ -26,13 +23,16 @@ import os
26 26
 
27 27
 # Add any Sphinx extension module names here, as strings. They can be extensions
28 28
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
29
-extensions = [ 'sphinx.ext.autodoc', 'zuul_sphinx', 'openstackdocstheme', 'sphinxcontrib.blockdiag', 'sphinxcontrib.nwdiag' ]
29
+extensions = [ 'sphinx.ext.autodoc',
30
+               'zuul_sphinx',
31
+               'openstackdocstheme',
32
+               'sphinxcontrib.blockdiag',
33
+               'sphinxcontrib.nwdiag' ]
30 34
 
31 35
 # openstackdocstheme options
32 36
 repository_name = 'openstack-dev/devstack'
33 37
 bug_project = 'devstack'
34 38
 bug_tag = ''
35
-html_last_updated_fmt = '%Y-%m-%d %H:%M'
36 39
 
37 40
 todo_include_todos = True
38 41
 
... ...
@@ -119,11 +119,6 @@ html_theme = 'openstackdocs'
119 119
 # pixels large.
120 120
 #html_favicon = None
121 121
 
122
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
123
-# using the given strftime format.
124
-git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1"
125
-html_last_updated_fmt = os.popen(git_cmd).read()
126
-
127 122
 # If true, SmartyPants will be used to convert quotes and dashes to
128 123
 # typographically correct entities.
129 124
 #html_use_smartypants = True
... ...
@@ -167,17 +162,6 @@ htmlhelp_basename = 'DevStack-doc'
167 167
 
168 168
 # -- Options for LaTeX output --------------------------------------------------
169 169
 
170
-latex_elements = {
171
-# The paper size ('letterpaper' or 'a4paper').
172
-#'papersize': 'letterpaper',
173
-
174
-# The font size ('10pt', '11pt' or '12pt').
175
-#'pointsize': '10pt',
176
-
177
-# Additional stuff for the LaTeX preamble.
178
-#'preamble': '',
179
-}
180
-
181 170
 # Grouping the document tree into LaTeX files. List of tuples
182 171
 # (source start file, target name, title, author, documentclass [howto/manual]).
183 172
 latex_documents = [
... ...
@@ -259,6 +259,8 @@ changed from the default value.
259 259
 Logging
260 260
 -------
261 261
 
262
+.. _enable_logging:
263
+
262 264
 Enable Logging
263 265
 ~~~~~~~~~~~~~~
264 266
 
... ...
@@ -495,7 +497,7 @@ should be specified in the configuration file so Tempest selects the
495 495
 default flavors instead.
496 496
 
497 497
 KVM on Power with QEMU 2.4 requires 512 MB to load the firmware -
498
-`QEMU 2.4 - PowerPC <http://wiki.qemu.org/ChangeLog/2.4>`__ so users
498
+`QEMU 2.4 - PowerPC <https://wiki.qemu.org/ChangeLog/2.4>`__ so users
499 499
 running instances on ppc64/ppc64le can choose one of the default
500 500
 created flavors as follows:
501 501
 
... ...
@@ -39,7 +39,7 @@ Edit your ``/opt/stack/devstack/local.conf`` to look like
39 39
     # If you are enabling horizon, include the octavia dashboard
40 40
     # enable_plugin octavia-dashboard https://opendev.org/openstack/octavia-dashboard.git
41 41
     # If you are enabling barbican for TLS offload in Octavia, include it here.
42
-    # enable_plugin barbican https://github.com/openstack/barbican.git
42
+    # enable_plugin barbican https://opendev.org/openstack/barbican
43 43
 
44 44
     # If you have python3 available:
45 45
     # USE_PYTHON3=True
... ...
@@ -10,7 +10,7 @@ nova-serialproxy
10 10
 ================
11 11
 
12 12
 In Juno, nova implemented a `spec
13
-<http://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/serial-ports.html>`_
13
+<https://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/serial-ports.html>`_
14 14
 to allow read/write access to the serial console of an instance via
15 15
 `nova-serialproxy
16 16
 <https://docs.openstack.org/nova/latest/cli/nova-serialproxy.html>`_.
... ...
@@ -63,7 +63,7 @@ The service can be enabled by adding ``n-sproxy`` to
63 63
 Enabling the service is enough to be functional for a single machine DevStack.
64 64
 
65 65
 These config options are defined in `nova.conf.serial_console
66
-<https://github.com/openstack/nova/blob/master/nova/conf/serial_console.py>`_.
66
+<https://opendev.org/openstack/nova/src/master/nova/conf/serial_console.py>`_.
67 67
 
68 68
 For more information on OpenStack configuration see the `OpenStack
69 69
 Compute Service Configuration Reference
... ...
@@ -78,7 +78,7 @@ As DevStack will refuse to run as root, this configures ``cloud-init``
78 78
 to create a non-root user and run the ``start.sh`` script as that user.
79 79
 
80 80
 If you are using cloud-init and you have not
81
-`enabled custom logging <../configuration.html#enable-logging>`_ of the stack
81
+:ref:`enabled custom logging <enable_logging>` of the stack
82 82
 output, then the stack output can be found in
83 83
 ``/var/log/cloud-init-output.log`` by default.
84 84
 
... ...
@@ -332,6 +332,6 @@ See Also
332 332
 ========
333 333
 
334 334
 For additional inspiration on devstack plugins you can check out the
335
-`Plugin Registry <plugin-registry.html>`_.
335
+:doc:`Plugin Registry <plugin-registry>`.
336 336
 
337 337
 .. _service types authority: https://specs.openstack.org/openstack/service-types-authority/
... ...
@@ -194,7 +194,7 @@ Telnet to that port to enter the pdb session::
194 194
 
195 195
 See the `remote-pdb`_ home page for more options.
196 196
 
197
-.. _`remote-pdb`: https://pypi.python.org/pypi/remote-pdb
197
+.. _`remote-pdb`: https://pypi.org/project/remote-pdb/
198 198
 
199 199
 Known Issues
200 200
 ============
... ...
@@ -190,7 +190,7 @@ DEVSTACK_GATE_NET_OVERLAY                       zuul-jobs     A bridge called
190 190
                                                               br-infra is set up for
191 191
                                                               all jobs that inherit
192 192
                                                               from multinode with
193
-                                                              a dedicated `bridge role <https://docs.openstack.org/infra/zuul-jobs/roles.html#role-multi-node-bridge>`_.
193
+                                                              a dedicated `bridge role <https://zuul-ci.org/docs/zuul-jobs/general-roles.html#role-multi-node-bridge>`_.
194 194
 DEVSTACK_GATE_FEATURE_MATRIX                    devstack-gate ``test_matrix_features``
195 195
                                                               variable of the
196 196
                                                               test-matrix role in
... ...
@@ -11,14 +11,5 @@ classifier =
11 11
     License :: OSI Approved :: Apache Software License
12 12
     Operating System :: POSIX :: Linux
13 13
 
14
-[build_sphinx]
15
-all_files = 1
16
-build-dir = doc/build
17
-source-dir = doc/source
18
-warning-is-error = 1
19
-
20
-[pbr]
21
-warnerrors = True
22
-
23 14
 [wheel]
24 15
 universal = 1
... ...
@@ -1,3 +1,3 @@
1 1
 Note: XenServer relative tools have been moved to `os-xenapi`_ and be maintained there.
2 2
 
3
-.. _os-xenapi: https://github.com/openstack/os-xenapi/
3
+.. _os-xenapi: https://opendev.org/x/os-xenapi/
... ...
@@ -41,7 +41,8 @@ whitelist_externals = bash
41 41
 setenv =
42 42
   TOP_DIR={toxinidir}
43 43
 commands =
44
-  python setup.py build_sphinx
44
+  sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
45
+
45 46
 
46 47
 [testenv:venv]
47 48
 basepython = python3