[doc-migration] Add configuration folder for documentation

This patch does the following:
* Adds a configuration folder to contain automated generated config
files for Ironic.
* Adds `oslo_config.sphinxconfiggen` to the extensions list.
* Adds `oslo_policy.sphinxpolicygen` to the extensions list.
* Adds ironic-policy-generator.conf

This is important for Ironic to be included in the list of services
on https://docs.openstack.org/pike/configuration/

Change-Id: I51a7204ce00be2588e427c1951e8be7dc7a22647
Closes-bug: #1706176
This commit is contained in:
Madhuri Kumari 2017-07-25 13:30:59 +05:30 committed by Ruby Loo
parent 759ed5d2ea
commit adcbd324af
9 changed files with 58 additions and 4 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@
# Sphinx # Sphinx
_build _build
doc/source/contributor/api/ doc/source/contributor/api/
_static/ironic
# release notes build # release notes build
releasenotes/build releasenotes/build

View File

@ -39,9 +39,8 @@ of ironic that may or may not be suitable to every situation.
Auditing API Traffic <api-audit-support> Auditing API Traffic <api-audit-support>
Notifications <notifications> Notifications <notifications>
Ceph Object Gateway support <radosgw> Ceph Object Gateway support <radosgw>
Configuration Reference <http://docs.openstack.org/draft/config-reference/bare-metal.html> /configuration/sample-config
Sample configuration file <https://git.openstack.org/cgit/openstack/ironic/tree/etc/ironic/ironic.conf.sample> /configuration/sample-policy
Dashboard Integration Dashboard Integration
--------------------- ---------------------

View File

@ -21,6 +21,8 @@ extensions = ['sphinx.ext.autodoc',
'sphinxcontrib.pecanwsme.rest', 'sphinxcontrib.pecanwsme.rest',
'sphinxcontrib.seqdiag', 'sphinxcontrib.seqdiag',
'wsmeext.sphinxext', 'wsmeext.sphinxext',
'oslo_config.sphinxconfiggen',
'oslo_policy.sphinxpolicygen',
] ]
try: try:
@ -53,6 +55,12 @@ master_doc = 'index'
project = u'Ironic' project = u'Ironic'
copyright = u'OpenStack Foundation' copyright = u'OpenStack Foundation'
config_generator_config_file = '../../tools/config/ironic-config-generator.conf'
sample_config_basename = '_static/ironic'
policy_generator_config_file = '../../tools/policy/ironic-policy-generator.conf'
sample_policy_basename = '_static/ironic'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # built documents.

View File

@ -0,0 +1,10 @@
Configuration Guide
-------------------
Here are sample configuration files generated automatically for Ironic.
.. toctree::
:maxdepth: 1
sample-config
sample-policy

View File

@ -0,0 +1,13 @@
============================
Ironic Configuration Options
============================
The following is a sample Ironic configuration for adaptation and use. It is
auto-generated from Ironic when this documentation is built, so
if you find issues with an option, please compare your version of
Ironic with the version of this documentation.
The sample configuration can also be downloaded as a :download:`file
</_static/ironic.conf.sample>`.
.. literalinclude:: /_static/ironic.conf.sample

View File

@ -0,0 +1,12 @@
=============
Ironic Policy
=============
The following is a sample Ironic policy file, autogenerated from Ironic when
this documentation is built. To prevent conflicts, ensure your version of
Ironic aligns with the version of this documentation.
The sample policy can also be downloaded as a :download:`file
</_static/ironic.policy.yaml.sample>`.
.. literalinclude:: /_static/ironic.policy.yaml.sample

View File

@ -38,6 +38,14 @@ Administrator Guide
admin/index admin/index
Configuration Reference
=======================
.. toctree::
:maxdepth: 2
configuration/index
Driver References Driver References
================= =================

View File

@ -0,0 +1,3 @@
[DEFAULT]
output_file = etc/ironic/policy.json.sample
namespace = ironic.api

View File

@ -65,7 +65,7 @@ commands =
sitepackages = False sitepackages = False
envdir = {toxworkdir}/venv envdir = {toxworkdir}/venv
commands = commands =
oslopolicy-sample-generator --namespace=ironic.api --output-file=etc/ironic/policy.json.sample oslopolicy-sample-generator --config-file=tools/policy/ironic-policy-generator.conf
[testenv:debug] [testenv:debug]
commands = oslo_debug_helper -t ironic/tests/unit {posargs} commands = oslo_debug_helper -t ironic/tests/unit {posargs}