[DOC] Add sample config and policy files to mogan docs

Change-Id: Ibdb5ae171943e933946267f0b3852e409108c8b2
This commit is contained in:
Zhenguo Niu 2017-06-07 16:31:38 +08:00
parent 062ab16ce3
commit b9359ed88c
5 changed files with 53 additions and 17 deletions

4
.gitignore vendored
View File

@ -42,8 +42,12 @@ nosetests.xml
output/*.html
output/*/index.html
etc/mogan/mogan.conf.sample
# Sphinx
doc/build
doc/source/_static/mogan.conf.sample
doc/source/_static/mogan.policy.yaml.sample
# pbr generates these
AUTHORS

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# 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
@ -22,10 +21,17 @@ sys.path.insert(0, os.path.abspath('../..'))
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
'oslosphinx'
'oslosphinx',
'oslo_config.sphinxconfiggen',
'oslo_policy.sphinxpolicygen',
]
config_generator_config_file = '../../tools/config/mogan-config-generator.conf'
sample_config_basename = '_static/mogan'
policy_generator_config_file = '../../tools/config/mogan-policy-generator.conf'
sample_policy_basename = '_static/mogan'
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable

View File

@ -53,18 +53,33 @@ project.
Developer Contribution Guide <dev/code-contribution-guide>
Setting Up Your Development Environment <dev/dev-quickstart>
Advanced testing and guides
----------------------------
.. toctree::
:maxdepth: 1
dev/gmr
Administrator's Guide
=====================
Configuration
-------------
Sample Configuration File
-------------------------
There are many aspects of the Bare Metal Compute service which are environment
specific. The following pages will be helpful in configuring specific aspects
of mogan that may or may not be suitable to every situation.
.. toctree::
:maxdepth: 1
You can use `tox -egenconfig` to generate the sample config file.
sample_config
Sample Policy file
------------------
.. toctree::
:maxdepth: 1
sample_policy
Command References
==================
@ -76,14 +91,6 @@ Here are references for commands not elsewhere documented.
cmds/mogan-dbsync
Advanced testing and guides
----------------------------
.. toctree::
:maxdepth: 1
dev/gmr
Indices and tables
==================

View File

@ -0,0 +1,10 @@
===========================
Mogan Configuration Options
===========================
The following is a sample Mogan configuration for adaptation and use. It is
auto-generated from Mogan when this documentation is built, so if you are
having issues with an option, please compare your version of Mogan with the
version of this documentation.
.. literalinclude:: _static/mogan.conf.sample

View File

@ -0,0 +1,9 @@
============
Mogan Policy
============
The following is a sample Mogan policy file, autogenerated from Mogan when this
documentation is built. To prevent conflicts, ensure your version of Mogan
aligns with the version of this documentation.
.. literalinclude:: _static/mogan.policy.yaml.sample