diff --git a/.gitignore b/.gitignore index bfaf43d0..331bf0e5 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/doc/source/conf.py b/doc/source/conf.py index e188c7d0..2fe56d7b 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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 diff --git a/doc/source/index.rst b/doc/source/index.rst index dafa9df6..8261c591 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -53,18 +53,33 @@ project. Developer Contribution Guide Setting Up Your Development Environment +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 ================== diff --git a/doc/source/sample_config.rst b/doc/source/sample_config.rst new file mode 100644 index 00000000..ccf97479 --- /dev/null +++ b/doc/source/sample_config.rst @@ -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 diff --git a/doc/source/sample_policy.rst b/doc/source/sample_policy.rst new file mode 100644 index 00000000..fcfcdca6 --- /dev/null +++ b/doc/source/sample_policy.rst @@ -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