Merge "Add configuration file"

This commit is contained in:
Jenkins 2017-03-21 07:41:17 +00:00 committed by Gerrit Code Review
commit c6e8ed061f
7 changed files with 64 additions and 15 deletions

View File

@ -12,14 +12,19 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
import oslosphinx
import sys
import shlex
# 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.
#sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../../..'))
sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('./'))
# -- General configuration ------------------------------------------------
@ -29,7 +34,14 @@ import shlex
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['oslosphinx']
extensions = [
'oslosphinx',
'oslo_config.sphinxconfiggen',
'sphinx.ext.autodoc',
]
config_generator_config_file = '../../etc/nova/nova-zvm-oslo-conf-generator.conf'
sample_config_basename = '_static/nova_zvm'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
@ -71,6 +83,9 @@ language = None
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
add_module_names = True
add_function_parentheses = True
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
@ -109,7 +124,10 @@ todo_include_todos = False
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#html_theme = 'alabaster'
html_theme = 'default'
#html_theme = 'default'
html_theme_path = [os.path.join(os.path.dirname(oslosphinx.__file__), 'theme')]
html_theme = 'openstack'
# 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
@ -138,7 +156,7 @@ html_theme = 'default'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['.static']
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
@ -223,8 +241,10 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'nova-zvm-virt-driver.tex', u'nova-zvm-virt-driver Documentation',
u'IBM', 'manual'),
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of

View File

@ -0,0 +1,18 @@
.. _configuration:
=============
Configuration
=============
The following is a sample ``nova_zvm.conf`` configuration file for the nova-zvm
driver, for adaptation and use.
It is auto-generated from the nova-zvm-virt-driver project when this
documentation is built, so if you are having issues with an option, please
compare your version of the ``nova-zvm-virt-driver`` Python package with the
version of this documentation.
The sample configuration can also be viewed in
`file form <_static/nova_zvm.conf.sample>`_.
.. literalinclude:: _static/nova_zvm.conf.sample

View File

@ -31,6 +31,8 @@ Using the driver
.. toctree::
:maxdepth: 2
configurations
Creating zVM Images
===================

View File

@ -1,4 +0,0 @@
[DEFAULT]
output_file = etc/nova-zvm.conf.sample
wrap_width = 79
namespace = nova.virt.zvm

View File

@ -0,0 +1,4 @@
[DEFAULT]
output_file = etc/nova_zvm.conf.sample
wrap_width = 79
namespace = nova_zvm

View File

@ -17,7 +17,8 @@ classifier =
Programming Language :: Python :: 2.7
[files]
packages = nova/virt/zvm
packages =
nova/virt/zvm
[build_sphinx]
source-dir = doc/source
@ -43,4 +44,4 @@ output_file = nova_zvm/locale/nova-zvm.pot
[entry_points]
oslo.config.opts =
nova.virt.zvm = nova.virt.zvm.opts:list_opts
nova_zvm = nova.virt.zvm.opts:list_opts

14
tox.ini
View File

@ -21,7 +21,8 @@ commands = /bin/cp -r {toxinidir}/nova/virt/zvm {toxinidir}/.tox/py27/src/nova/n
python setup.py testr --slowest --testr-args='{posargs}'
[testenv:venv]
commands = {posargs}
commands = /bin/cp -r {toxinidir}/nova/virt/zvm {toxinidir}/.tox/venv/src/nova/nova/virt/
{posargs}
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
@ -43,5 +44,12 @@ deps = bandit
commands = bandit -r nova/virt/zvm -n 5 -ll
[testenv:genconfig]
commands = /bin/cp -r {toxinidir}/nova/virt/zvm/ {toxinidir}/.tox/genconfig/src/nova/nova/virt/
oslo-config-generator --config-file=etc/nova-zvm-oslo-conf-generator.conf
commands =
/bin/cp -r {toxinidir}/nova/virt/zvm/ {toxinidir}/.tox/genconfig/src/nova/nova/virt/
oslo-config-generator --config-file=etc/nova/nova-zvm-oslo-conf-generator.conf
[testenv:docs]
commands =
/bin/cp -r {toxinidir}/nova/virt/zvm/ {toxinidir}/.tox/docs/src/nova/nova/virt/
python setup.py build_sphinx