Add sample config and policy to documentation

Change-Id: Ie21459821dbe654d5e097494efbfbd647c12044e
This commit is contained in:
Jeremy Liu 2018-01-24 17:03:54 +08:00
parent 48f50a0868
commit ed0bb3f5fb
8 changed files with 72 additions and 1 deletions

3
.gitignore vendored
View File

@ -80,3 +80,6 @@ releasenotes/build
# Files created by API build # Files created by API build
api-ref/build/ api-ref/build/
# Files created by doc build
doc/source/_static

View File

@ -22,9 +22,21 @@ sys.path.insert(0, os.path.abspath('../..'))
extensions = [ extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.autodoc',
# 'sphinx.ext.intersphinx', # 'sphinx.ext.intersphinx',
'openstackdocstheme' 'openstackdocstheme',
'oslo_config.sphinxext',
'oslo_config.sphinxconfiggen',
'oslo_policy.sphinxext',
'oslo_policy.sphinxpolicygen',
] ]
config_generator_config_file = [
('../../etc/oslo-config-generator/barbican.conf',
'_static/barbican'),
]
policy_generator_config_file = '../../etc/oslo-config-generator/policy.conf'
sample_policy_basename = '_static/barbican'
# autodoc generation is a bit aggressive and a nuisance when doing heavy # autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles. # text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable # execute "export SPHINX_DEBUG=1" in your terminal to disable

View File

@ -0,0 +1,8 @@
.. _barbican.conf:
-------------
barbican.conf
-------------
.. show-options::
:config-file: etc/oslo-config-generator/barbican.conf

View File

@ -9,3 +9,5 @@ Setting up Barbican
noauth.rst noauth.rst
audit.rst audit.rst
plugin_backends.rst plugin_backends.rst
config.rst
policy.rst

View File

@ -0,0 +1,14 @@
.. _barbican-policy-generator.conf:
====================
Policy configuration
====================
Configuration
~~~~~~~~~~~~~
The following is an overview of all available policies in Barbican. For a sample
configuration file.
.. show-policy::
:config-file: ../../etc/oslo-config-generator/policy.conf

View File

@ -27,6 +27,15 @@ API.
api/index.rst api/index.rst
Sample Files
============
.. toctree::
:maxdepth: 1
sample_config
sample_policy
Indices and tables Indices and tables

View File

@ -0,0 +1,8 @@
==================================
Barbican Sample Configuration File
==================================
Use the ``barbican.conf`` file to configure most Key Manager service
options:
.. literalinclude:: _static/barbican.conf.sample

View File

@ -0,0 +1,15 @@
======================
Barbican Sample Policy
======================
The following is a sample Barbican policy file that has been auto-generated
from default policy values in code. If you're using the default policies, then
the maintenance of this file is not necessary, and it should not be copied into
a deployment. Doing so will result in duplicate policy definitions. It is here
to help explain which policy operations protect specific Barbican APIs, but it
is not suggested to copy and paste into a deployment unless you're planning on
providing a different policy for an operation that is not the default.
The sample policy file can also be viewed in `file form <_static/barbican.policy.yaml.sample>`_.
.. literalinclude:: _static/barbican.policy.yaml.sample