summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2017-06-16 04:08:37 +0900
committerAkihiro Motoki <amotoki@gmail.com>2017-06-16 08:20:54 +0900
commit2a1b0b05234048fe0f29df459b984b87faea7505 (patch)
tree000bc184571ada014a636357d14ce4f00b31a087
parent2d752108d04767054d4f54a09eec35f1c612add9 (diff)
downloadneutron-2a1b0b05234048fe0f29df459b984b87faea7505.tar.gz
docs: switch to openstackdocstheme
The docs reorganization proposed in the docs-specs [1], we will migrate our sphinx theme to openstackdocsthems. This commit switches our docs theme to it, Also ajust title levels. openstackdocstheme assume one title (first level) per page. Second or later first-level titles are not shown. This changes title levels to match openstackdocsthem requirements. Note that oslosphinx is used by releasenotes build, so it is not dropped from test-requirements.txt. [1] https://review.openstack.org/#/c/472275/ Change-Id: I72d55c26401ae9bfd06626d1b1584a368bbd9f86
-rw-r--r--doc/source/conf.py19
-rw-r--r--doc/source/dashboards/index.rst7
-rw-r--r--doc/source/index.rst12
-rw-r--r--test-requirements.txt1
4 files changed, 27 insertions, 12 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 52b645dbf6..c3c7d0d4ee 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -31,6 +31,8 @@ import subprocess
import sys
import warnings
+import openstackdocstheme
+
# 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
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -48,7 +50,6 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.ifconfig',
'sphinx.ext.graphviz',
'sphinx.ext.todo',
- 'oslosphinx',
'support_matrix']
todo_include_todos = True
@@ -126,6 +127,7 @@ modindex_common_prefix = ['neutron.']
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
+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
@@ -134,6 +136,7 @@ modindex_common_prefix = ['neutron.']
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = ['_theme']
+html_theme_path = [openstackdocstheme.get_html_theme_path()]
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
@@ -159,14 +162,22 @@ html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
-git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local -",
- "n1"]
+git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1"
try:
- html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
+ html_last_updated_fmt = os.popen(git_cmd).read()
except Exception:
warnings.warn('Cannot get last updated time from git repository. '
'Not setting "html_last_updated_fmt".')
+gitsha = os.popen("/usr/bin/git rev-parse HEAD").read()
+giturl = u'https://git.openstack.org/cgit/openstack/neutron/tree/doc/source'
+# html_context allows us to pass arbitrary values into the html template
+html_context = {
+ "gitsha": gitsha,
+ "giturl": giturl,
+ "bug_project": "neutron",
+ "bug_tag": "doc",
+ }
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
diff --git a/doc/source/dashboards/index.rst b/doc/source/dashboards/index.rst
index 1202a033ca..a3bc33f7c1 100644
--- a/doc/source/dashboards/index.rst
+++ b/doc/source/dashboards/index.rst
@@ -1,5 +1,8 @@
+CI Status Dashboards
+====================
+
Gerrit Dashboards
-=================
+-----------------
- `Neutron master branch reviews <https://review.openstack.org/#/dashboard/?foreach=%28project%3Aopenstack%2Fneutron+OR+project%3Aopenstack%2Fpython%252Dneutronclient%29+status%3Aopen+NOT+owner%3Aself+NOT+label%3AWorkflow%3C%3D%252D1+label%3AVerified%3E%3D1%252cjenkins+NOT+label%3ACode%252DReview%3E%3D%252D2%252cself+branch%3Amaster&title=Neutron+Review+Inbox+%28master+branch+only%29&Needs+Feedback+%28Changes+older+than+5+days+that+have+not+been+reviewed+by+anyone%29=NOT+label%3ACode%252DReview%3C%3D2+age%3A5d&You+are+a+reviewer%252c+but+haven%27t+voted+in+the+current+revision=reviewer%3Aself&Needs+final+%2B2=label%3ACode%252DReview%3E%3D2+NOT%28reviewerin%3Aneutron%252Dcore+label%3ACode%252DReview%3C%3D%252D1%29+limit%3A50&Passed+Jenkins%252c+No+Negative+Core+Feedback=NOT+label%3ACode%252DReview%3E%3D2+NOT%28reviewerin%3Aneutron%252Dcore+label%3ACode%252DReview%3C%3D%252D1%29+limit%3A50&Wayward+Changes+%28Changes+with+no+code+review+in+the+last+2days%29=NOT+label%3ACode%252DReview%3C%3D2+age%3A2d>`_
- `Neutron subproject reviews (master branch) <https://review.openstack.org/#/dashboard/?foreach=%28project%3Aopenstack%2Fdragonflow+OR+project%3Aopenstack%2Fnetworking%252Darista+OR+project%3Aopenstack%2Fnetworking%252Dbagpipe%252Dl2+OR+project%3Aopenstack%2Fnetworking%252Dbgpvpn+OR+project%3Aopenstack%2Fnetworking%252Dcisco+OR+project%3Aopenstack%2Fnetworking%252Dl2gw+OR+project%3Aopenstack%2Fnetworking%252Dlenovo+OR+project%3Aopenstack%2Fnetworking%252Dmidonet+OR+project%3Aopenstack%2Fnetworking%252Dodl+OR+project%3Aopenstack%2Fnetworking%252Dofagent+OR+project%3Aopenstack%2Fnetworking%252Donos+OR+project%3Aopenstack%2Fnetworking%252Dovn+OR+project%3Aopenstack%2Fnetworking%252Dsfc+OR+project%3Aopenstack%2Foctavia+OR+project%3Aopenstack%2Fnetworking%252Dplumgrid+OR+project%3Aopenstack%2Fvmware%252Dnsx+OR+project%3Aopenstack%2Fnetworking%252Dvsphere%29+status%3Aopen+NOT+owner%3Aself+NOT+label%3AWorkflow%3C%3D%252D1+label%3AVerified%3E%3D1%252cjenkins+NOT+label%3ACode%252DReview%3E%3D%252D2%252cself+branch%3Amaster&title=Neutron+Sub+Projects+Review+Inbox&Needs+Feedback+%28Changes+older+than+5+days+that+have+not+been+reviewed+by+anyone%29=NOT+label%3ACode%252DReview%3C%3D2+age%3A5d&You+are+a+reviewer%252c+but+haven%27t+voted+in+the+current+revision=reviewer%3Aself&Needs+final+%2B2=label%3ACode%252DReview%3E%3D2+NOT%28reviewerin%3Aneutron%252Dcore+label%3ACode%252DReview%3C%3D%252D1%29+limit%3A50&Passed+Jenkins%252c+No+Negative+Core+Feedback=NOT+label%3ACode%252DReview%3E%3D2+NOT%28reviewerin%3Aneutron%252Dcore+label%3ACode%252DReview%3C%3D%252D1%29+limit%3A50&Wayward+Changes+%28Changes+with+no+code+review+in+the+last+2days%29=NOT+label%3ACode%252DReview%3C%3D2+age%3A2d>`_
@@ -12,7 +15,7 @@ Useful dashboard definitions are found in ``dashboards`` directory.
.. _Gerrit Dashboard Creator: https://github.com/openstack/gerrit-dash-creator
Grafana Dashboards
-==================
+------------------
Look for neutron and networking-* dashboard by names by going to the following link:
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 0a243853da..f5805c64c9 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -40,7 +40,7 @@ The `Neutron Development wiki`_ is also a good resource for new contributors.
Enjoy!
Neutron Policies
-================
+----------------
.. toctree::
:maxdepth: 2
@@ -48,7 +48,7 @@ Neutron Policies
policies/index
Neutron Stadium
-===============
+----------------
.. toctree::
:maxdepth: 2
@@ -56,7 +56,7 @@ Neutron Stadium
stadium/index
Neutron Feature Classification
-==============================
+------------------------------
.. toctree::
:maxdepth: 3
@@ -64,7 +64,7 @@ Neutron Feature Classification
feature_classification/index
Developer Docs
-==============
+--------------
.. toctree::
:maxdepth: 3
@@ -72,7 +72,7 @@ Developer Docs
devref/index
Dashboards
-==========
+----------
There is a collection of dashboards to help developers and reviewers
located here.
@@ -83,6 +83,6 @@ located here.
dashboards/index
API Extensions
-==============
+--------------
Go to http://api.openstack.org for information about OpenStack Network API extensions.
diff --git a/test-requirements.txt b/test-requirements.txt
index f9c92cc96f..1419ab9a96 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -8,6 +8,7 @@ fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0 # BSD
python-subunit>=0.0.18 # Apache-2.0/BSD
sphinx!=1.6.1,>=1.5.1 # BSD
+openstackdocstheme>=1.5.0 # Apache-2.0
oslosphinx>=4.7.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=1.4.0 # MIT