Improve api-ref docs generation

With os-api-ref recently bumped to version 0.4.0, it is moving towards
a better integration with openstackdocstheme.

Another problem fixed is the missing doc 'user/policy_types/index',
which is pretty straightforward.

Change-Id: Iea6586cb9f5dcc0e4b3f04806bcfafa53dcf9c8c
This commit is contained in:
tengqm 2016-08-07 21:55:46 -04:00
parent 5d2667e9c2
commit e4f22d379b
2 changed files with 45 additions and 2 deletions

View File

@ -28,6 +28,8 @@ import os
import subprocess import subprocess
import sys import sys
import openstackdocstheme
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
@ -42,9 +44,14 @@ sys.path.insert(0, os.path.abspath('./'))
extensions = [ extensions = [
'os_api_ref', 'os_api_ref',
'oslosphinx',
] ]
html_theme = 'openstackdocs'
html_theme_path = [openstackdocstheme.get_html_theme_path()]
html_theme_options = {
"sidebar_mode": "toc",
}
# The suffix of source filenames. # The suffix of source filenames.
source_suffix = '.rst' source_suffix = '.rst'
@ -63,7 +70,7 @@ copyright = u'2015-present, OpenStack Foundation'
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # built documents.
# #
from senlin.version import version_info # NOQA from senlin.version import version_info
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = version_info.release_string() release = version_info.release_string()
# The short X.Y version. # The short X.Y version.

View File

@ -0,0 +1,36 @@
..
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
.. _ref-index:
====================
Builtin Policy Types
====================
The senlin service is released with some builtin policy types that target some
most common use cases. You can develop and deploy your own policy types by
following the instructions in the
:doc:`developer guide <../../../developer/index>`.
The following is a list of builtin policy types that are shipped with the
service package.
.. toctree::
:maxdepth: 1
affinity
deletion
load_balancing
scaling
region_placement
zone_placement