From 947d828cdf6de29558b8689da476caefc30af733 Mon Sep 17 00:00:00 2001 From: Yumeng Bao Date: Wed, 20 Mar 2019 02:20:35 -0700 Subject: [PATCH] Initial commit for cyborg api-ref This is the first commit for add cyborg api-ref. Change-Id: Ida207606c3da704548f0ac032b203cad804b314f --- api-ref/source/conf.py | 90 ++++++++++++++++++++++++++++++ api-ref/source/index.rst | 11 ++++ api-ref/source/v1/accelerators.inc | 0 api-ref/source/v1/deployables.inc | 0 api-ref/source/v1/index.rst | 22 ++++++++ tox.ini | 9 +++ 6 files changed, 132 insertions(+) create mode 100644 api-ref/source/conf.py create mode 100644 api-ref/source/index.rst create mode 100644 api-ref/source/v1/accelerators.inc create mode 100644 api-ref/source/v1/deployables.inc create mode 100644 api-ref/source/v1/index.rst diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py new file mode 100644 index 00000000..efcd8192 --- /dev/null +++ b/api-ref/source/conf.py @@ -0,0 +1,90 @@ +# 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. +# +# cyborg documentation build configuration file, created by +# sphinx-quickstart on Sat May 1 15:17:47 2010. +# +# This file is execfile()d with the current directory set to +# its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +from cyborg.version import version_info + + +extensions = [ + 'openstackdocstheme', + 'os_api_ref', +] + +# -- General configuration ---------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. + +# The suffix of source filenames. +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Acceleration API Reference' +copyright = u'2016-present, OpenStack Foundation' + +# openstackdocstheme options +repository_name = 'openstack/cyborg' +bug_project = 'cyborg' +bug_tag = 'api-ref' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = version_info.release_string() +# The short X.Y version. +version = version_info.version_string() + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# -- Options for HTML output -------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme = 'openstackdocs' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +html_theme_options = { + "sidebar_mode": "toc", +} + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +html_last_updated_fmt = '%Y-%m-%d %H:%M' + +# -- Options for LaTeX output ------------------------------------------------- + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto/manual]). +latex_documents = [ + ('index', 'Cyborg.tex', u'OpenStack Acceleration API Documentation', + u'OpenStack Foundation', 'manual'), +] diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst new file mode 100644 index 00000000..812e7d58 --- /dev/null +++ b/api-ref/source/index.rst @@ -0,0 +1,11 @@ +=========================== +OpenStack Acceleration APIs +=========================== + +This is a reference for the OpenStack Acceleration API which is provided by +the Cyborg project. + +.. toctree:: + :maxdepth: 1 + + v1/index diff --git a/api-ref/source/v1/accelerators.inc b/api-ref/source/v1/accelerators.inc new file mode 100644 index 00000000..e69de29b diff --git a/api-ref/source/v1/deployables.inc b/api-ref/source/v1/deployables.inc new file mode 100644 index 00000000..e69de29b diff --git a/api-ref/source/v1/index.rst b/api-ref/source/v1/index.rst new file mode 100644 index 00000000..c99dcb73 --- /dev/null +++ b/api-ref/source/v1/index.rst @@ -0,0 +1,22 @@ +============================== +OpenStack Acceleration v1 APIs +============================== + +v1 APIs +####### + +This is a reference for the OpenStack Acceleration v1 API which is provided by +the Cyborg project. + +.. rest_expand_all:: + +.. include:: deployables.inc + +Deprecated v1 APIs +################## + +This section contains references for v1 APIs which are deprecated and usually +limited to some maximum microversion. + +.. include:: accelerators.inc + diff --git a/tox.ini b/tox.ini index 4a2411c8..3b7298ce 100644 --- a/tox.ini +++ b/tox.ini @@ -79,6 +79,15 @@ commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasen basepython = python3 commands = oslo_debug_helper -t cyborg/tests {posargs} +[testenv:api-ref] +# This environment is called from CI scripts to test and publish +# the API Ref to developer.openstack.org. +deps = -r{toxinidir}/doc/requirements.txt +commands = + rm -rf api-ref/build + sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html +whitelist_externals = rm + [pep8] # E123, E125 skipped as they are invalid PEP-8.