Browse Source

[Doc] OpenStack API Reference Guide

Baseline changes to comply with OpenStack API documentation
from OpenStack Documentation Contributor Guide [0]:

- [1] How to document your OpenStack API service

[0] https://docs.openstack.org/doc-contrib-guide
[1] https://docs.openstack.org/doc-contrib-guide/api-guides.html

Story: 2002712
Task: 26515

Change-Id: I7294ee2fec53bce8381f85854fd9c22abe7c5b74
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
Abraham Arce 7 months ago
parent
commit
74c22d595c
6 changed files with 97 additions and 0 deletions
  1. 3
    0
      .gitignore
  2. 2
    0
      .zuul.yaml
  3. 75
    0
      api-ref/source/conf.py
  4. 8
    0
      api-ref/source/index.rst
  5. 1
    0
      doc/requirements.txt
  6. 8
    0
      tox.ini

+ 3
- 0
.gitignore View File

@@ -27,3 +27,6 @@ doc/build/
27 27
 
28 28
 # Release Notes documentation
29 29
 releasenotes/build
30
+
31
+# Api Ref documentation
32
+api-ref/build/

+ 2
- 0
.zuul.yaml View File

@@ -4,6 +4,7 @@
4 4
       - build-openstack-docs-pti
5 5
     check:
6 6
       jobs:
7
+        - build-openstack-api-ref
7 8
         - build-openstack-releasenotes
8 9
         - openstack-tox-linters
9 10
         - sysinv-tox-py27
@@ -14,6 +15,7 @@
14 15
         - configutilities-tox-flake8
15 16
     gate:
16 17
       jobs:
18
+        - build-openstack-api-ref
17 19
         - build-openstack-releasenotes
18 20
         - openstack-tox-linters
19 21
         - sysinv-tox-py27

+ 75
- 0
api-ref/source/conf.py View File

@@ -0,0 +1,75 @@
1
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
2
+# not use this file except in compliance with the License. You may obtain
3
+# a copy of the License at
4
+#
5
+#    http://www.apache.org/licenses/LICENSE-2.0
6
+#
7
+# Unless required by applicable law or agreed to in writing, software
8
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
+# License for the specific language governing permissions and limitations
11
+# under the License.
12
+#
13
+# stx-config API reference documentation build configuration file
14
+#
15
+# This file is execfile()d with the current directory set to
16
+# its containing dir.
17
+#
18
+# Note that not all possible configuration values are present in this
19
+# autogenerated file.
20
+#
21
+# All configuration values have a default; values that are commented out
22
+# serve to show the default.
23
+
24
+import os
25
+import sys
26
+
27
+extensions = [
28
+    'openstackdocstheme',
29
+    'os_api_ref',
30
+]
31
+
32
+html_theme = 'openstackdocs'
33
+
34
+html_theme_options = {
35
+    "sidebar_dropdown": "api_ref",
36
+    "sidebar_mode": "toc",
37
+}
38
+
39
+# If extensions (or modules to document with autodoc) are in another directory,
40
+# add these directories to sys.path here. If the directory is relative to the
41
+# documentation root, use os.path.abspath to make it absolute, like shown here.
42
+sys.path.insert(0, os.path.abspath('../../'))
43
+sys.path.insert(0, os.path.abspath('../'))
44
+sys.path.insert(0, os.path.abspath('./'))
45
+
46
+# The suffix of source filenames.
47
+source_suffix = '.rst'
48
+
49
+# The master toctree document.
50
+master_doc = 'index'
51
+
52
+# General information about the project.
53
+repository_name = 'openstack/stx-config'
54
+project = u'stx-config'
55
+bug_project = 'starlingx'
56
+bug_tag = 'stx.config'
57
+
58
+# If true, the current module name will be prepended to all description
59
+# unit titles (such as .. function::).
60
+add_module_names = False
61
+
62
+# If true, sectionauthor and moduleauthor directives will be shown in the
63
+# output. They are ignored by default.
64
+show_authors = False
65
+
66
+# The name of the Pygments (syntax highlighting) style to use.
67
+pygments_style = 'sphinx'
68
+
69
+# Grouping the document tree into LaTeX files. List of tuples
70
+# (source start file, target name, title, author, documentclass
71
+# [howto/manual]).
72
+latex_documents = [
73
+    ('index', 'stx-config.tex', u'stx-config API Documentation',
74
+     u'StarlingX', 'manual'),
75
+]

+ 8
- 0
api-ref/source/index.rst View File

@@ -0,0 +1,8 @@
1
+========================
2
+stx-config API Reference
3
+========================
4
+
5
+StarlingX System Configuration Management
6
+
7
+.. toctree::
8
+   :maxdepth: 2

+ 1
- 0
doc/requirements.txt View File

@@ -1,3 +1,4 @@
1 1
 openstackdocstheme>=1.19.0 # Apache-2.0
2
+os-api-ref>=1.4.0 # Apache-2.0
2 3
 reno>=0.1.1 # Apache2
3 4
 sphinx>=1.6.2

+ 8
- 0
tox.ini View File

@@ -48,6 +48,14 @@ description = Dummy environment to allow flake8 to be run in subdir tox
48 48
 [testenv:pylint]
49 49
 description = Dummy environment to allow pylint to be run in subdir tox
50 50
 
51
+[testenv:api-ref]
52
+basepython = python3
53
+deps = -r{toxinidir}/doc/requirements.txt
54
+commands =
55
+  rm -rf api-ref/build
56
+  sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
57
+whitelist_externals = rm
58
+
51 59
 [testenv:docs]
52 60
 basepython = python3
53 61
 deps = -r{toxinidir}/doc/requirements.txt

Loading…
Cancel
Save